From dd4cf6dde01c5cf1cf7fc4d9af952ef0e4a85ba2 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 19 Feb 2017 09:36:14 -0800 Subject: Upgrade GDB 7.11 -> 7.11.1 Signed-off-by: Alexey Neyman diff --git a/config/debug/gdb.in b/config/debug/gdb.in index 2ba259d..c8652ca 100644 --- a/config/debug/gdb.in +++ b/config/debug/gdb.in @@ -72,9 +72,9 @@ config GDB_V_7_12_1 prompt "7.12.1" select GDB_7_12_or_later -config GDB_V_7_11 +config GDB_V_7_11_1 bool - prompt "7.11" + prompt "7.11.1" select GDB_7_2_or_later config GDB_V_7_10_1 @@ -279,7 +279,7 @@ config GDB_VERSION # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW default "7.12.1" if GDB_V_7_12_1 - default "7.11" if GDB_V_7_11 + default "7.11.1" if GDB_V_7_11_1 default "7.10.1" if GDB_V_7_10_1 default "7.10" if GDB_V_7_10 default "7.9.1" if GDB_V_7_9_1 diff --git a/patches/gdb/7.11.1/100-musl_fix.patch b/patches/gdb/7.11.1/100-musl_fix.patch new file mode 100644 index 0000000..c0c1e0a --- /dev/null +++ b/patches/gdb/7.11.1/100-musl_fix.patch @@ -0,0 +1,28 @@ +--- 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" +@@ -73,6 +74,10 @@ + #define SPUFS_MAGIC 0x23c9b64e + #endif + ++#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/patches/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch b/patches/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch new file mode 100644 index 0000000..ff59907 --- /dev/null +++ b/patches/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch @@ -0,0 +1,20 @@ +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 + +--- a/gdb/gnulib/configure 2016-02-25 18:17:04.145903807 +0100 ++++ b/gdb/gnulib/configure 2016-02-25 18:17:28.545903821 +0100 +@@ -13520,8 +13520,9 @@ + if test "$cross_compiling" = yes; then : + # When cross-compiling: + case "$host_os" in +- # Guess all is fine on glibc systems. ++ # Guess all is fine on glibc/uclibc 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/patches/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch b/patches/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch new file mode 100644 index 0000000..982bd7f --- /dev/null +++ b/patches/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch @@ -0,0 +1,35 @@ +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(+) + +diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c +index 55e7d98..41f5ec1 100644 +--- a/gdb/xtensa-tdep.c ++++ b/gdb/xtensa-tdep.c +@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep) + tdep->num_regs = n; + } + ++ if (tdep->ar_base == -1) ++ tdep->ar_base = tdep->a0_base; ++ + /* Number of pseudo registers. */ + tdep->num_pseudo_regs = n - tdep->num_regs; + +-- +1.8.1.4 + diff --git a/patches/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch b/patches/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch new file mode 100644 index 0000000..506a57c --- /dev/null +++ b/patches/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch @@ -0,0 +1,31 @@ +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(-) + +diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c +index 41f5ec1..6a7dba7 100644 +--- a/gdb/xtensa-tdep.c ++++ b/gdb/xtensa-tdep.c +@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch, + /* 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 assumtion for the end of the prologue. */ +-- +1.8.1.4 + diff --git a/patches/gdb/7.11/100-musl_fix.patch b/patches/gdb/7.11/100-musl_fix.patch deleted file mode 100644 index c0c1e0a..0000000 --- a/patches/gdb/7.11/100-musl_fix.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- 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" -@@ -73,6 +74,10 @@ - #define SPUFS_MAGIC 0x23c9b64e - #endif - -+#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/patches/gdb/7.11/101-uclibc-no-gettimeofday-clobber.patch b/patches/gdb/7.11/101-uclibc-no-gettimeofday-clobber.patch deleted file mode 100644 index ff59907..0000000 --- a/patches/gdb/7.11/101-uclibc-no-gettimeofday-clobber.patch +++ /dev/null @@ -1,20 +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 - ---- a/gdb/gnulib/configure 2016-02-25 18:17:04.145903807 +0100 -+++ b/gdb/gnulib/configure 2016-02-25 18:17:28.545903821 +0100 -@@ -13520,8 +13520,9 @@ - if test "$cross_compiling" = yes; then : - # When cross-compiling: - case "$host_os" in -- # Guess all is fine on glibc systems. -+ # Guess all is fine on glibc/uclibc 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/patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch b/patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch deleted file mode 100644 index 982bd7f..0000000 --- a/patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch +++ /dev/null @@ -1,35 +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(+) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 55e7d98..41f5ec1 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep) - tdep->num_regs = n; - } - -+ if (tdep->ar_base == -1) -+ tdep->ar_base = tdep->a0_base; -+ - /* Number of pseudo registers. */ - tdep->num_pseudo_regs = n - tdep->num_regs; - --- -1.8.1.4 - diff --git a/patches/gdb/7.11/112-WIP-end-of-prologue-detection-hack.patch b/patches/gdb/7.11/112-WIP-end-of-prologue-detection-hack.patch deleted file mode 100644 index 506a57c..0000000 --- a/patches/gdb/7.11/112-WIP-end-of-prologue-detection-hack.patch +++ /dev/null @@ -1,31 +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(-) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 41f5ec1..6a7dba7 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch, - /* 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 assumtion for the end of the prologue. */ --- -1.8.1.4 - -- cgit v0.10.2-6-g49f6