From 68088f65c66790c1a5920e67e7e34d9f77e5a20f Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Tue, 14 Sep 2021 21:31:38 +1200 Subject: gdb: Add gdb-11.1 Drop the uclibc-no-gettimeofday-clobber patch as it no longer applies. The arc patches are all upstream. Signed-off-by: Chris Packham diff --git a/config/debug/gdb.in.native b/config/debug/gdb.in.native index 917a770..d244790 100644 --- a/config/debug/gdb.in.native +++ b/config/debug/gdb.in.native @@ -10,6 +10,7 @@ config GDB_NATIVE select LIBC_UCLIBC_IPV6 if LIBC_UCLIBC && GDB_8_3_or_later select EXPAT_TARGET select NCURSES_TARGET + select GMP_TARGET if GDB_11_1_or_later help Build and install a native gdb for the target, to run on the target. diff --git a/packages/gdb/11.1/0000-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/11.1/0000-xtensa-make-sure-ar_base-is-initialized.patch new file mode 100644 index 0000000..d608922 --- /dev/null +++ b/packages/gdb/11.1/0000-xtensa-make-sure-ar_base-is-initialized.patch @@ -0,0 +1,30 @@ +From 208ea73d38c9c16cf983b6419f58050dbadcb6a9 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sun, 7 Jun 2015 22:43:49 +0300 +Subject: [PATCH 2/2] xtensa: make sure ar_base is initialized + +ar_base is uninitialized for cores w/o windowed registers as their +regmap doesn't have register 0x0100. +Check that ar_base is initialized and if not initialize it with a0_base. + +gdb/ + * xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is + initialized. + +Signed-off-by: Max Filippov +--- + gdb/xtensa-tdep.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/gdb/xtensa-tdep.c ++++ b/gdb/xtensa-tdep.c +@@ -3129,6 +3129,9 @@ + if (tdep->num_regs == 0) + tdep->num_regs = tdep->num_nopriv_regs; + ++ if (tdep->ar_base == -1) ++ tdep->ar_base = tdep->a0_base; ++ + /* Number of pseudo registers. */ + tdep->num_pseudo_regs = n - tdep->num_regs; + diff --git a/packages/gdb/11.1/0001-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/11.1/0001-WIP-end-of-prologue-detection-hack.patch new file mode 100644 index 0000000..5eec5d6 --- /dev/null +++ b/packages/gdb/11.1/0001-WIP-end-of-prologue-detection-hack.patch @@ -0,0 +1,26 @@ +From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sun, 7 Jun 2015 23:15:39 +0300 +Subject: [PATCH] WIP: *end of prologue* detection hack + +see + http://www.esp8266.com/viewtopic.php?p=18461#p18461 + http://www.esp8266.com/viewtopic.php?p=19026#p19026 + http://www.esp8266.com/viewtopic.php?p=19683#p19683 + +Signed-off-by: Max Filippov +--- + gdb/xtensa-tdep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/gdb/xtensa-tdep.c ++++ b/gdb/xtensa-tdep.c +@@ -2377,7 +2377,7 @@ + /* Find out, if we have an information about the prologue from DWARF. */ + prologue_sal = find_pc_line (start, 0); + if (prologue_sal.line != 0) /* Found debug info. */ +- body_pc = prologue_sal.end; ++ body_pc = prologue_sal.end + 40; + + /* If we are going to analyze the prologue in general without knowing about + the current PC, make the best assumption for the end of the prologue. */ diff --git a/packages/gdb/11.1/0002-allow-android.patch b/packages/gdb/11.1/0002-allow-android.patch new file mode 100644 index 0000000..d6c5869 --- /dev/null +++ b/packages/gdb/11.1/0002-allow-android.patch @@ -0,0 +1,45 @@ +--- + gdbserver/configure | 11 ----------- + gdbserver/configure.ac | 11 ----------- + 2 files changed, 22 deletions(-) + +--- a/gdbserver/configure ++++ b/gdbserver/configure +@@ -10028,17 +10028,6 @@ + + + case "${target}" in +- *-android*) +- # Starting with NDK version 9, actually includes definitions +- # of Elf32_auxv_t and Elf64_auxv_t. But sadly, includes +- # which defines some of the ELF types incorrectly, +- # leading to conflicts with the defintions from . +- # This makes it impossible for us to include both and +- # , which means that, in practice, we do not have +- # access to Elf32_auxv_t and Elf64_auxv_t on this platform. +- # Therefore, do not try to auto-detect availability, as it would +- # get it wrong on this platform. +- ;; + *) + ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include + +--- a/gdbserver/configure.ac ++++ b/gdbserver/configure.ac +@@ -171,17 +171,6 @@ + ]) + + case "${target}" in +- *-android*) +- # Starting with NDK version 9, actually includes definitions +- # of Elf32_auxv_t and Elf64_auxv_t. But sadly, includes +- # which defines some of the ELF types incorrectly, +- # leading to conflicts with the defintions from . +- # This makes it impossible for us to include both and +- # , which means that, in practice, we do not have +- # access to Elf32_auxv_t and Elf64_auxv_t on this platform. +- # Therefore, do not try to auto-detect availability, as it would +- # get it wrong on this platform. +- ;; + *) + AC_CHECK_TYPES([Elf32_auxv_t, Elf64_auxv_t], [], [], + #include diff --git a/packages/gdb/11.1/0003-xtensa-Fix-compilation-of-gdbserver.patch b/packages/gdb/11.1/0003-xtensa-Fix-compilation-of-gdbserver.patch new file mode 100644 index 0000000..7ccfa68 --- /dev/null +++ b/packages/gdb/11.1/0003-xtensa-Fix-compilation-of-gdbserver.patch @@ -0,0 +1,30 @@ +From 6f110500ed04148e3734f5b6a4fc573477c8398a Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Tue, 24 Aug 2021 12:29:18 -0700 +Subject: [PATCH] xtensa: Fix compilation of gdbserver + +Otherwise a lot of errors like the following happen: +--------------------------->8--------------------------------- +Error: .../gdb/xtensa-linux-nat.c:66:17: error: 'gdbarch_pc_regnum' was not declared in this scope +Error: .../gdb/xtensa-linux-nat.c:68:17: error: 'gdbarch_ps_regnum' was not declared in this scope +Error: .../gdb/xtensa-linux-nat.c:71:38: error: no matching function for call to 'gdbarch_tdep::gdbarch_tdep(gdbarch*&)' +... +--------------------------->8--------------------------------- + +Initially caught by https://github.com/crosstool-ng/crosstool-ng/pull/1573/checks?check_run_id=3361561567 + +Signed-off-by: Alexey Brodkin +--- + gdb/xtensa-linux-nat.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/gdb/xtensa-linux-nat.c ++++ b/gdb/xtensa-linux-nat.c +@@ -34,6 +34,7 @@ + #include "nat/gdb_ptrace.h" + #include + ++#include "gdbarch.h" + #include "gregset.h" + #include "xtensa-tdep.h" + diff --git a/packages/gdb/11.1/chksum b/packages/gdb/11.1/chksum new file mode 100644 index 0000000..f81f46d --- /dev/null +++ b/packages/gdb/11.1/chksum @@ -0,0 +1,8 @@ +md5 gdb-11.1.tar.xz 257cb0f67927f79acf636d8c01e19990 +sha1 gdb-11.1.tar.xz 6cb3361c7f2b22d6d2c25ab4992264aa41bc2471 +sha256 gdb-11.1.tar.xz cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94 +sha512 gdb-11.1.tar.xz c40bf970e2f7c2107b29c5aa6a7150daa709d75ddadb73ac20742419d4637d158e3063a4c6ff6e47fae8ca8e1d36253973f85ea15445d004be6d5d7a2dd9bd46 +md5 gdb-11.1.tar.gz eb6596d83bdccea06caa6d49d923e119 +sha1 gdb-11.1.tar.gz 71cf191c4409790f9f0b74e039145fbf61fd9916 +sha256 gdb-11.1.tar.gz cc2903474e965a43d09c3b263952d48ced39dd22ce2d01968f3aa181335fcb9c +sha512 gdb-11.1.tar.gz 79420671b7f9ae70a474ff0122417edd8746b050b8079b667a799c72853a6fdfbf8f9bc820ebaae7776005eaf41eb6d2c7f17d88a286d8269f133c70d146aca7 diff --git a/packages/gdb/11.1/version.desc b/packages/gdb/11.1/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/gdb/package.desc b/packages/gdb/package.desc index 73e4902..7793f4a 100644 --- a/packages/gdb/package.desc +++ b/packages/gdb/package.desc @@ -2,5 +2,5 @@ origin='GNU' repository='git git://sourceware.org/git/binutils-gdb.git' mirrors='$(CT_Mirrors GNU gdb) $(CT_Mirrors sourceware gdb/releases)' relevantpattern='*.*|[a-z.]' -milestones='7.0 7.2 7.12 8.0 8.3 10.2' +milestones='7.0 7.2 7.12 8.0 8.3 10.2 11.1' archive_formats='.tar.xz .tar.gz' -- cgit v0.10.2-6-g49f6