From e48b15666468b5d8b3164759e85e768c89ebb0ac Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 11 Sep 2020 16:37:09 -0500 Subject: gdb 9.2 support Signed-off-by: Kumar Gala diff --git a/packages/gdb/9.1/0000-musl_fix.patch b/packages/gdb/9.1/0000-musl_fix.patch deleted file mode 100644 index 85c09de..0000000 --- a/packages/gdb/9.1/0000-musl_fix.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- - gdb/linux-nat.c | 5 +++++ - gdb/stopcode.h | 4 ++++ - 2 files changed, 9 insertions(+) - ---- a/gdb/linux-nat.c -+++ b/gdb/linux-nat.c -@@ -17,6 +17,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -+#include "stopcode.h" - #include "defs.h" - #include "inferior.h" - #include "infrun.h" -@@ -69,6 +70,10 @@ - #include "gdbsupport/scope-exit.h" - #include "gdbsupport/gdb-sigmask.h" - -+#ifndef __SIGRTMIN -+#define __SIGRTMIN SIGRTMIN -+#endif -+ - /* This comment documents high-level logic of this file. - - Waiting for events in sync mode ---- /dev/null -+++ b/gdb/stopcode.h -@@ -0,0 +1,4 @@ -+#ifndef W_STOPCODE -+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) -+#endif -+ diff --git a/packages/gdb/9.1/0001-uclibc-no-gettimeofday-clobber.patch b/packages/gdb/9.1/0001-uclibc-no-gettimeofday-clobber.patch deleted file mode 100644 index 2a549dd..0000000 --- a/packages/gdb/9.1/0001-uclibc-no-gettimeofday-clobber.patch +++ /dev/null @@ -1,33 +0,0 @@ -Improve gnulib in gdb's guess work, gettimeofday() works in uClibcm promise. - -This patch helps building x86_64-unknown-linux-uclibc toolchains, the final -gdb-native step otherwise fails when linking the libinproctrace.so - -Signed-off-by: Joachim Nilsson -Signed-off-by: Alexey Neyman - ---- - gnulib/configure | 1 + - gnulib/import/m4/gettimeofday.m4 | 1 + - 2 files changed, 2 insertions(+) - ---- a/gnulib/configure -+++ b/gnulib/configure -@@ -20267,6 +20267,7 @@ - case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; -+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac ---- a/gnulib/import/m4/gettimeofday.m4 -+++ b/gnulib/import/m4/gettimeofday.m4 -@@ -111,6 +111,7 @@ - case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; -+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac diff --git a/packages/gdb/9.1/0002-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/9.1/0002-xtensa-make-sure-ar_base-is-initialized.patch deleted file mode 100644 index c0f364c..0000000 --- a/packages/gdb/9.1/0002-xtensa-make-sure-ar_base-is-initialized.patch +++ /dev/null @@ -1,30 +0,0 @@ -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 -@@ -3137,6 +3137,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/9.1/0003-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/9.1/0003-WIP-end-of-prologue-detection-hack.patch deleted file mode 100644 index 9622ae9..0000000 --- a/packages/gdb/9.1/0003-WIP-end-of-prologue-detection-hack.patch +++ /dev/null @@ -1,26 +0,0 @@ -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 -@@ -2385,7 +2385,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/9.1/0004-allow-android.patch b/packages/gdb/9.1/0004-allow-android.patch deleted file mode 100644 index 97f7a9f..0000000 --- a/packages/gdb/9.1/0004-allow-android.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- - gdb/gdbserver/configure | 11 ----------- - gdb/gdbserver/configure.ac | 11 ----------- - 2 files changed, 22 deletions(-) - ---- a/gdb/gdbserver/configure -+++ b/gdb/gdbserver/configure -@@ -8512,17 +8512,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/gdb/gdbserver/configure.ac -+++ b/gdb/gdbserver/configure.ac -@@ -176,17 +176,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/9.1/chksum b/packages/gdb/9.1/chksum deleted file mode 100644 index f0361e0..0000000 --- a/packages/gdb/9.1/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 gdb-9.1.tar.xz f7e9f6236c425097d9e5f18a6ac40655 -sha1 gdb-9.1.tar.xz a50e13e1eecea468ea28c4a23d8c5a84f4db25be -sha256 gdb-9.1.tar.xz 699e0ec832fdd2f21c8266171ea5bf44024bd05164fdf064e4d10cc4cf0d1737 -sha512 gdb-9.1.tar.xz 84cdd408d80a3fc5779de459c5b26154d31b329ebde7e3aa78799fb1eb245d8b64b8c8ee7242382a1dbd95b4e6f9d84fef41d12a0646aa75d3dee4709ea1f6e7 -md5 gdb-9.1.tar.gz b6f0807334c273c78fd17df0f9b1c13a -sha1 gdb-9.1.tar.gz c50a84d303afc9bea77cd5f129e83b4a4147a701 -sha256 gdb-9.1.tar.gz fcda54d4f35bc53fb24b50009a71ca98410d71ff2620942e3c829a7f5d614252 -sha512 gdb-9.1.tar.gz a51b1023e595b86db3d75edcd845739304b441eff4754a400241c6b45f2c38913a489776e67c5fa20e8d90a9e72e94f2f6b8495363d93c2350ddbade4839bcc3 diff --git a/packages/gdb/9.1/version.desc b/packages/gdb/9.1/version.desc deleted file mode 100644 index e69de29..0000000 diff --git a/packages/gdb/9.2/0000-musl_fix.patch b/packages/gdb/9.2/0000-musl_fix.patch new file mode 100644 index 0000000..85c09de --- /dev/null +++ b/packages/gdb/9.2/0000-musl_fix.patch @@ -0,0 +1,33 @@ +--- + gdb/linux-nat.c | 5 +++++ + gdb/stopcode.h | 4 ++++ + 2 files changed, 9 insertions(+) + +--- a/gdb/linux-nat.c ++++ b/gdb/linux-nat.c +@@ -17,6 +17,7 @@ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + ++#include "stopcode.h" + #include "defs.h" + #include "inferior.h" + #include "infrun.h" +@@ -69,6 +70,10 @@ + #include "gdbsupport/scope-exit.h" + #include "gdbsupport/gdb-sigmask.h" + ++#ifndef __SIGRTMIN ++#define __SIGRTMIN SIGRTMIN ++#endif ++ + /* This comment documents high-level logic of this file. + + Waiting for events in sync mode +--- /dev/null ++++ b/gdb/stopcode.h +@@ -0,0 +1,4 @@ ++#ifndef W_STOPCODE ++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) ++#endif ++ diff --git a/packages/gdb/9.2/0001-uclibc-no-gettimeofday-clobber.patch b/packages/gdb/9.2/0001-uclibc-no-gettimeofday-clobber.patch new file mode 100644 index 0000000..2a549dd --- /dev/null +++ b/packages/gdb/9.2/0001-uclibc-no-gettimeofday-clobber.patch @@ -0,0 +1,33 @@ +Improve gnulib in gdb's guess work, gettimeofday() works in uClibcm promise. + +This patch helps building x86_64-unknown-linux-uclibc toolchains, the final +gdb-native step otherwise fails when linking the libinproctrace.so + +Signed-off-by: Joachim Nilsson +Signed-off-by: Alexey Neyman + +--- + gnulib/configure | 1 + + gnulib/import/m4/gettimeofday.m4 | 1 + + 2 files changed, 2 insertions(+) + +--- a/gnulib/configure ++++ b/gnulib/configure +@@ -20267,6 +20267,7 @@ + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; ++ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + esac +--- a/gnulib/import/m4/gettimeofday.m4 ++++ b/gnulib/import/m4/gettimeofday.m4 +@@ -111,6 +111,7 @@ + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; ++ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + esac diff --git a/packages/gdb/9.2/0002-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/9.2/0002-xtensa-make-sure-ar_base-is-initialized.patch new file mode 100644 index 0000000..c0f364c --- /dev/null +++ b/packages/gdb/9.2/0002-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 +@@ -3137,6 +3137,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/9.2/0003-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/9.2/0003-WIP-end-of-prologue-detection-hack.patch new file mode 100644 index 0000000..9622ae9 --- /dev/null +++ b/packages/gdb/9.2/0003-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 +@@ -2385,7 +2385,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/9.2/0004-allow-android.patch b/packages/gdb/9.2/0004-allow-android.patch new file mode 100644 index 0000000..97f7a9f --- /dev/null +++ b/packages/gdb/9.2/0004-allow-android.patch @@ -0,0 +1,45 @@ +--- + gdb/gdbserver/configure | 11 ----------- + gdb/gdbserver/configure.ac | 11 ----------- + 2 files changed, 22 deletions(-) + +--- a/gdb/gdbserver/configure ++++ b/gdb/gdbserver/configure +@@ -8512,17 +8512,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/gdb/gdbserver/configure.ac ++++ b/gdb/gdbserver/configure.ac +@@ -176,17 +176,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/9.2/chksum b/packages/gdb/9.2/chksum new file mode 100644 index 0000000..1e70a64 --- /dev/null +++ b/packages/gdb/9.2/chksum @@ -0,0 +1,8 @@ +md5 gdb-9.2.tar.xz db95524e554870209ab7d9f8fd8dc557 +sha1 gdb-9.2.tar.xz 356ee474a24bfb2f133894730916557dfea9da2e +sha256 gdb-9.2.tar.xz 360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555 +sha512 gdb-9.2.tar.xz 73635f00f343117aa5e2436f1e1597099e2bfb31ef7bb162b273fa1ea282c3fa9b0f52762e70bfc7ad0334addb8d159e9ac7cbe5998ca4f755ea8cf90714d274 +md5 gdb-9.2.tar.gz 3899ef01c672b19ec63ced445b8abc42 +sha1 gdb-9.2.tar.gz 0df8ea589070310306290ec093df8d60755ee737 +sha256 gdb-9.2.tar.gz 38ef247d41ba7cc3f6f93a612a78bab9484de9accecbe3b0150a3c0391a3faf0 +sha512 gdb-9.2.tar.gz 0ccd3a2a24963c848976848ba890f99a458569ff10da4d2bb6dd4782852662ab2df7fb9b3525dd4fd04f95070cea07e1bae6dbe2969e321cbb4004a033845d1c diff --git a/packages/gdb/9.2/version.desc b/packages/gdb/9.2/version.desc new file mode 100644 index 0000000..e69de29 -- cgit v0.10.2-6-g49f6