From ebedc1511dc0a24f86186bb847b32868bf2ae04a Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Fri, 17 May 2019 16:53:08 -0700 Subject: gdb: Upgrade from 8.2.1 to 8.3 Bump GDB and change the oeqa selftest expression to allow ptests to pass. (From OE-Core rev: f31986ed9f82c48834b2f25979c93697228acbf7) Signed-off-by: Alistair Francis Signed-off-by: Richard Purdie --- meta/recipes-devtools/gdb/gdb-8.2.1.inc | 25 ------ meta/recipes-devtools/gdb/gdb-8.3.inc | 21 +++++ meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 1 - .../gdb/gdb-cross-canadian_8.2.1.bb | 3 - .../recipes-devtools/gdb/gdb-cross-canadian_8.3.bb | 3 + meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb | 2 - meta/recipes-devtools/gdb/gdb-cross_8.3.bb | 2 + .../0001-Fix-build-with-latest-GCC-9.0-tree.patch | 50 ----------- .../gdb/gdb/0001-gdbserver-ctrl-c-handling.patch | 26 ++++++ ...Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 23 +++-- .../0008-Use-exorted-definitions-of-SIGRTMIN.patch | 16 ++-- ...-AArch64-Fix-the-gdb-build-with-musl-libc.patch | 52 ------------ meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch | 99 ---------------------- .../gdb/gdb/gdbserver-ctrl-c-handling.patch | 26 ------ meta/recipes-devtools/gdb/gdb_8.2.1.bb | 29 ------- meta/recipes-devtools/gdb/gdb_8.3.bb | 29 +++++++ 16 files changed, 98 insertions(+), 309 deletions(-) delete mode 100644 meta/recipes-devtools/gdb/gdb-8.2.1.inc create mode 100644 meta/recipes-devtools/gdb/gdb-8.3.inc delete mode 100644 meta/recipes-devtools/gdb/gdb-cross-canadian_8.2.1.bb create mode 100644 meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.bb delete mode 100644 meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb create mode 100644 meta/recipes-devtools/gdb/gdb-cross_8.3.bb delete mode 100644 meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch create mode 100644 meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch delete mode 100644 meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch delete mode 100644 meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch delete mode 100644 meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch delete mode 100644 meta/recipes-devtools/gdb/gdb_8.2.1.bb create mode 100644 meta/recipes-devtools/gdb/gdb_8.3.bb (limited to 'meta/recipes-devtools/gdb') diff --git a/meta/recipes-devtools/gdb/gdb-8.2.1.inc b/meta/recipes-devtools/gdb/gdb-8.2.1.inc deleted file mode 100644 index f28b57439c..0000000000 --- a/meta/recipes-devtools/gdb/gdb-8.2.1.inc +++ /dev/null @@ -1,25 +0,0 @@ -LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" - -SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ - file://0002-make-man-install-relative-to-DESTDIR.patch \ - file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ - file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ - file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \ - file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \ - file://0007-use-asm-sgidefs.h.patch \ - file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \ - file://0009-Change-order-of-CFLAGS.patch \ - file://0010-resolve-restrict-keyword-conflict.patch \ - file://0011-Fix-invalid-sigprocmask-call.patch \ - file://gdbserver-ctrl-c-handling.patch \ - file://0001-Fix-build-with-latest-GCC-9.0-tree.patch \ - file://CVE-2017-9778.patch \ - file://0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch \ -" -SRC_URI[md5sum] = "f8b2562e830a4098dd5b5ea9e9296c70" -SRC_URI[sha256sum] = "0a6a432907a03c5c8eaad3c3cffd50c00a40c3a5e3c4039440624bae703f2202" - diff --git a/meta/recipes-devtools/gdb/gdb-8.3.inc b/meta/recipes-devtools/gdb/gdb-8.3.inc new file mode 100644 index 0000000000..db8d5f349f --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb-8.3.inc @@ -0,0 +1,21 @@ +LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" + +SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ + file://0001-gdbserver-ctrl-c-handling.patch \ + file://0002-make-man-install-relative-to-DESTDIR.patch \ + file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ + file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ + file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \ + file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \ + file://0007-use-asm-sgidefs.h.patch \ + file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \ + file://0009-Change-order-of-CFLAGS.patch \ + file://0010-resolve-restrict-keyword-conflict.patch \ + file://0011-Fix-invalid-sigprocmask-call.patch \ + " +SRC_URI[md5sum] = "bbd95b2f9b34621ad7a19a3965476314" +SRC_URI[sha256sum] = "802f7ee309dcc547d65a68d61ebd6526762d26c3051f52caebe2189ac1ffd72e" diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc index 475e4f08ef..c9daf25a41 100644 --- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc @@ -40,4 +40,3 @@ do_install_append() { rm -rf ${D}${exec_prefix}/lib cross_canadian_bindirlinks } - diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_8.2.1.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_8.2.1.bb deleted file mode 100644 index 301035940c..0000000000 --- a/meta/recipes-devtools/gdb/gdb-cross-canadian_8.2.1.bb +++ /dev/null @@ -1,3 +0,0 @@ -require gdb-common.inc -require gdb-cross-canadian.inc -require gdb-${PV}.inc diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.bb new file mode 100644 index 0000000000..301035940c --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.bb @@ -0,0 +1,3 @@ +require gdb-common.inc +require gdb-cross-canadian.inc +require gdb-${PV}.inc diff --git a/meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb b/meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb deleted file mode 100644 index 50cf159fdb..0000000000 --- a/meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb +++ /dev/null @@ -1,2 +0,0 @@ -require gdb-cross.inc -require gdb-${PV}.inc diff --git a/meta/recipes-devtools/gdb/gdb-cross_8.3.bb b/meta/recipes-devtools/gdb/gdb-cross_8.3.bb new file mode 100644 index 0000000000..50cf159fdb --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb-cross_8.3.bb @@ -0,0 +1,2 @@ +require gdb-cross.inc +require gdb-${PV}.inc diff --git a/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch b/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch deleted file mode 100644 index 2a962929d7..0000000000 --- a/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 7406a50077773e78282a495cb32ef5b8179f6a33 Mon Sep 17 00:00:00 2001 -From: Dimitar Dimitrov -Date: Mon, 17 Dec 2018 21:30:52 +0200 -Subject: [PATCH] Fix build with latest GCC 9.0 tree - -A recent patch [1] to fix a GCC PR [2] actually broke the GDB build. -To fix, remove the stack pointer clobber. GCC will ignore the clobber -marker, and will not save or restore the stack pointer. - -I ran "make check-gdb" on x86_64 to ensure there are no regressions. - -gdb/ChangeLog: - -2018-12-17 Dimitar Dimitrov - - * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove sp clobbers. - -[1] https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00532.html -[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813 - -Upstream-Status: Backport -Signed-off-by: Dimitar Dimitrov ---- - gdb/ChangeLog | 5 +++++ - gdb/nat/linux-ptrace.c | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c -index d4c1b8f9fd..187cfeb9bc 100644 ---- a/gdb/nat/linux-ptrace.c -+++ b/gdb/nat/linux-ptrace.c -@@ -161,14 +161,14 @@ linux_ptrace_test_ret_to_nx (void) - ".globl linux_ptrace_test_ret_to_nx_instr;" - "linux_ptrace_test_ret_to_nx_instr:" - "ret" -- : : "r" (return_address) : "%esp", "memory"); -+ : : "r" (return_address) : "memory"); - #elif defined __x86_64__ - asm volatile ("pushq %0;" - ".globl linux_ptrace_test_ret_to_nx_instr;" - "linux_ptrace_test_ret_to_nx_instr:" - "ret" - : : "r" ((uint64_t) (uintptr_t) return_address) -- : "%rsp", "memory"); -+ : "memory"); - #else - # error "!__i386__ && !__x86_64__" - #endif --- -2.20.1 diff --git a/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch b/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch new file mode 100644 index 0000000000..71fe7f83b6 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch @@ -0,0 +1,26 @@ +This problem was created by the upstream commit 78708b7c8c +After applying the commit, it will send SIGINT to the process group(-signal_pid). +But if we use gdbserver send SIGINT, and the attached process is not a process +group leader, then the "kill (-signal_pid, SIGINT)" returns error and fails to +interrupt the attached process. + +Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=18945] + +Author: Josh Gao +Signed-off-by: Zhixiong Chi + +Index: gdb-8.2/gdb/gdbserver/linux-low.c +=================================================================== +--- gdb-8.2.orig/gdb/gdbserver/linux-low.c ++++ gdb-8.2/gdb/gdbserver/linux-low.c +@@ -5940,9 +5940,7 @@ linux_look_up_symbols (void) + static void + linux_request_interrupt (void) + { +- /* Send a SIGINT to the process group. This acts just like the user +- typed a ^C on the controlling terminal. */ +- kill (-signal_pid, SIGINT); ++ kill (signal_pid, SIGINT); + } + + /* Copy LEN bytes from inferior's auxiliary vector starting at OFFSET diff --git a/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch index bbe0020bf3..170d512ef7 100644 --- a/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch +++ b/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch @@ -1,24 +1,24 @@ -From 1dd5c44474b01d84de60faded960fef4a0a87e41 Mon Sep 17 00:00:00 2001 +From da30370c1e3ff7728a857e119e0529a9f097086e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 30 Apr 2016 18:32:14 -0700 -Subject: [PATCH 04/11] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC - systems +Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems Upstream-Status: Pending Signed-off-by: Khem Raj + --- gdb/gdbserver/linux-ppc-low.c | 6 ++++++ gdb/nat/ppc-linux.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c -index 47428c1529..841a5e02b9 100644 +index 1b695e53..1978347c 100644 --- a/gdb/gdbserver/linux-ppc-low.c +++ b/gdb/gdbserver/linux-ppc-low.c -@@ -21,7 +21,13 @@ - #include "linux-low.h" - +@@ -23,7 +23,13 @@ + #include "elf/common.h" + #include #include +#if !defined(__GLIBC__) +# define pt_regs uapi_pt_regs @@ -31,12 +31,12 @@ index 47428c1529..841a5e02b9 100644 #include "arch/ppc-linux-common.h" #include "arch/ppc-linux-tdesc.h" diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h -index 3d4d4fdc56..5b93af8d3a 100644 +index f1561b3b..40399361 100644 --- a/gdb/nat/ppc-linux.h +++ b/gdb/nat/ppc-linux.h @@ -18,7 +18,13 @@ - #ifndef PPC_LINUX_H - #define PPC_LINUX_H 1 + #ifndef NAT_PPC_LINUX_H + #define NAT_PPC_LINUX_H +#if !defined(__GLIBC__) +# define pt_regs uapi_pt_regs @@ -48,6 +48,3 @@ index 3d4d4fdc56..5b93af8d3a 100644 #include /* This sometimes isn't defined. */ --- -2.18.0 - diff --git a/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch b/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch index d32352b813..95bec5fd60 100644 --- a/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch +++ b/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch @@ -1,7 +1,7 @@ -From d97878b272bd7c4993f4205983ae8b7ecddbcf82 Mon Sep 17 00:00:00 2001 +From bab0b34672727c50313eb98b8522355cbe1bde36 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 30 Apr 2016 15:31:40 -0700 -Subject: [PATCH 08/11] Use exorted definitions of SIGRTMIN +Subject: [PATCH] Use exorted definitions of SIGRTMIN Define W_STOPCODE if not defined already @@ -14,16 +14,17 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=13012 Upstream-Status: Submitted Signed-off-by: Khem Raj + --- gdb/linux-nat.c | 4 ++-- gdb/nat/linux-nat.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c -index 64015e7520..acf950c38b 100644 +index 063afe26..fb1d2d5d 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c -@@ -4724,6 +4724,6 @@ lin_thread_get_thread_signals (sigset_t *set) +@@ -4713,6 +4713,6 @@ lin_thread_get_thread_signals (sigset_t *set) /* NPTL reserves the first two RT signals, but does not provide any way for the debugger to query the signal numbers - fortunately they don't change. */ @@ -33,7 +34,7 @@ index 64015e7520..acf950c38b 100644 + sigaddset (set, SIGRTMIN + 1); } diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h -index a90a124d3a..4f3e681962 100644 +index 1e32dd9e..b886305d 100644 --- a/gdb/nat/linux-nat.h +++ b/gdb/nat/linux-nat.h @@ -90,4 +90,8 @@ extern void linux_stop_lwp (struct lwp_info *lwp); @@ -44,7 +45,4 @@ index a90a124d3a..4f3e681962 100644 +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) +#endif + - #endif /* LINUX_NAT_H */ --- -2.18.0 - + #endif /* NAT_LINUX_NAT_H */ diff --git a/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch b/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch deleted file mode 100644 index f35033c122..0000000000 --- a/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch +++ /dev/null @@ -1,52 +0,0 @@ -From cbbf1a8ba7f037ba3b83f090829edcbab542c285 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy -Date: Thu, 13 Dec 2018 17:47:17 +0000 -Subject: [PATCH] AArch64: Fix the gdb build with musl libc - -Including asm/sigcontext.h together with libc headers is not valid. In -general linux headers may not work with libc headers, so mixing them -should be avoided, especially when the linux header defines types that -are also exposed in libc headers. - -In case of asm/sigcontext.h glibc happens to work because glibc signal.h -directly includes it, but e.g. in musl libc signal.h replicates the -sigcontext.h definitions in an abi compatible way which are in conflict -with the linux definitions when both headers are included. - -Since old linux headers or old libc headers may not have the necessary -definitions, gdb has to replicate the definitions it relies on anyway. -Which is fine since all definitions must be ABI stable. For linux apis -that are not available via libc headers, replicating the definitions in -gdb is the most reliable way to use them. - -Note: asm/ptrace.h includes asm/sigcontext.h in some versions of linux -headers, which is just as problematic and should be fixed in linux. - -gdb/ChangeLog: - - * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of - asm/sigcontext.h. - -[ChangeLog entry stripped so that patch applies cleanly] -Upstream-Status: Backport -Signed-off-by: Paul Barker ---- - gdb/nat/aarch64-sve-linux-ptrace.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h -index 029e753ffe..172ae39432 100644 ---- a/gdb/nat/aarch64-sve-linux-ptrace.h -+++ b/gdb/nat/aarch64-sve-linux-ptrace.h -@@ -20,7 +20,7 @@ - #ifndef AARCH64_SVE_LINUX_PTRACE_H - #define AARCH64_SVE_LINUX_PTRACE_H - --#include -+#include - #include - #include - #include --- -2.17.1 - diff --git a/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch b/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch deleted file mode 100644 index 935f2661fe..0000000000 --- a/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch +++ /dev/null @@ -1,99 +0,0 @@ -From a608b79f30ab3f670095e14ba3d3b5b24a19fe68 Mon Sep 17 00:00:00 2001 -From: Sandra Loosemore -Date: Thu, 25 Apr 2019 07:27:02 -0700 -Subject: [PATCH] Detect invalid length field in debug frame FDE header. - -GDB was failing to catch cases where a corrupt ELF or core file -contained an invalid length value in a Dwarf debug frame FDE header. -It was checking for buffer overflow but not cases where the length was -negative or caused pointer wrap-around. - -In addition to the additional validity check, this patch cleans up the -multiple signed/unsigned conversions on the length field so that an -unsigned representation is used consistently throughout. - -This patch fixes CVE-2017-9778 and PR gdb/21600. - -2019-04-25 Sandra Loosemore - Kang Li - - PR gdb/21600 - - * dwarf2-frame.c (read_initial_length): Be consistent about using - unsigned representation of length. - (decode_frame_entry_1): Likewise. Check for wraparound of - end pointer as well as buffer overflow. - -Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=723adb650a31859d7cc45832cb8adca0206455ed] -CVE: CVE-2017-9778 -Signed-off-by: Anuj Mittal ---- - gdb/ChangeLog | 11 +++++++++++ - gdb/dwarf2-frame.c | 14 +++++++------- - 2 files changed, 18 insertions(+), 7 deletions(-) - -diff --git a/gdb/ChangeLog b/gdb/ChangeLog -index 3711dc7..0a9720b 100644 ---- a/gdb/ChangeLog -+++ b/gdb/ChangeLog -@@ -1,3 +1,14 @@ -+2019-04-25 Sandra Loosemore -+ Kang Li -+ -+ PR gdb/21600 -+ -+ * dwarf2-frame.c (read_initial_length): Be consistent about using -+ unsigned representation of length. -+ (decode_frame_entry_1): Likewise. Check for wraparound of -+ end pointer as well as buffer overflow. -+ -+ - 2018-12-23 Joel Brobecker - - * version.in: Set GDB version number to 8.2.1. -diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c -index 91e16cf..a7b99fd 100644 ---- a/gdb/dwarf2-frame.c -+++ b/gdb/dwarf2-frame.c -@@ -1477,7 +1477,7 @@ static ULONGEST - read_initial_length (bfd *abfd, const gdb_byte *buf, - unsigned int *bytes_read_ptr) - { -- LONGEST result; -+ ULONGEST result; - - result = bfd_get_32 (abfd, buf); - if (result == 0xffffffff) -@@ -1780,7 +1780,7 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, - { - struct gdbarch *gdbarch = get_objfile_arch (unit->objfile); - const gdb_byte *buf, *end; -- LONGEST length; -+ ULONGEST length; - unsigned int bytes_read; - int dwarf64_p; - ULONGEST cie_id; -@@ -1791,15 +1791,15 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, - buf = start; - length = read_initial_length (unit->abfd, buf, &bytes_read); - buf += bytes_read; -- end = buf + length; -- -- /* Are we still within the section? */ -- if (end > unit->dwarf_frame_buffer + unit->dwarf_frame_size) -- return NULL; -+ end = buf + (size_t) length; - - if (length == 0) - return end; - -+ /* Are we still within the section? */ -+ if (end <= buf || end > unit->dwarf_frame_buffer + unit->dwarf_frame_size) -+ return NULL; -+ - /* Distinguish between 32 and 64-bit encoded frame info. */ - dwarf64_p = (bytes_read == 12); - --- -2.7.4 - diff --git a/meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch b/meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch deleted file mode 100644 index 71fe7f83b6..0000000000 --- a/meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch +++ /dev/null @@ -1,26 +0,0 @@ -This problem was created by the upstream commit 78708b7c8c -After applying the commit, it will send SIGINT to the process group(-signal_pid). -But if we use gdbserver send SIGINT, and the attached process is not a process -group leader, then the "kill (-signal_pid, SIGINT)" returns error and fails to -interrupt the attached process. - -Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=18945] - -Author: Josh Gao -Signed-off-by: Zhixiong Chi - -Index: gdb-8.2/gdb/gdbserver/linux-low.c -=================================================================== ---- gdb-8.2.orig/gdb/gdbserver/linux-low.c -+++ gdb-8.2/gdb/gdbserver/linux-low.c -@@ -5940,9 +5940,7 @@ linux_look_up_symbols (void) - static void - linux_request_interrupt (void) - { -- /* Send a SIGINT to the process group. This acts just like the user -- typed a ^C on the controlling terminal. */ -- kill (-signal_pid, SIGINT); -+ kill (signal_pid, SIGINT); - } - - /* Copy LEN bytes from inferior's auxiliary vector starting at OFFSET diff --git a/meta/recipes-devtools/gdb/gdb_8.2.1.bb b/meta/recipes-devtools/gdb/gdb_8.2.1.bb deleted file mode 100644 index c6eac84dd8..0000000000 --- a/meta/recipes-devtools/gdb/gdb_8.2.1.bb +++ /dev/null @@ -1,29 +0,0 @@ -require gdb.inc -require gdb-${PV}.inc - -inherit python3-dir - -EXTRA_OEMAKE_append_libc-musl = "\ - gt_cv_func_gnugettext1_libc=yes \ - gt_cv_func_gnugettext2_libc=yes \ - gl_cv_func_working_strerror=yes \ - gl_cv_func_strerror_0_works=yes \ - gl_cv_func_gettimeofday_clobber=no \ - " - -do_configure_prepend() { - if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then - cat > ${WORKDIR}/python << EOF -#!/bin/sh -case "\$2" in - --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; - --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; - --exec-prefix) echo "${exec_prefix}" ;; - *) exit 1 ;; -esac -exit 0 -EOF - chmod +x ${WORKDIR}/python - fi -} -CPPFLAGS_append_libc-musl = " -Drpl_gettimeofday=gettimeofday -Drpl_stat=stat" diff --git a/meta/recipes-devtools/gdb/gdb_8.3.bb b/meta/recipes-devtools/gdb/gdb_8.3.bb new file mode 100644 index 0000000000..c6eac84dd8 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb_8.3.bb @@ -0,0 +1,29 @@ +require gdb.inc +require gdb-${PV}.inc + +inherit python3-dir + +EXTRA_OEMAKE_append_libc-musl = "\ + gt_cv_func_gnugettext1_libc=yes \ + gt_cv_func_gnugettext2_libc=yes \ + gl_cv_func_working_strerror=yes \ + gl_cv_func_strerror_0_works=yes \ + gl_cv_func_gettimeofday_clobber=no \ + " + +do_configure_prepend() { + if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then + cat > ${WORKDIR}/python << EOF +#!/bin/sh +case "\$2" in + --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; + --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; + --exec-prefix) echo "${exec_prefix}" ;; + *) exit 1 ;; +esac +exit 0 +EOF + chmod +x ${WORKDIR}/python + fi +} +CPPFLAGS_append_libc-musl = " -Drpl_gettimeofday=gettimeofday -Drpl_stat=stat" -- cgit v1.2.3-54-g00ecf