summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christian Noren Egtvedt <hegtvedt@cisco.com>2022-02-07 12:53:07 (GMT)
committerChris Packham <judge.packham@gmail.com>2022-02-08 07:52:48 (GMT)
commit803f9b84f6ab4aa10f39139fb35add4de8e42455 (patch)
tree02090e78cdd9dbc2edf631f91bd20b9d8f642967
parent5a4c95d658eddaf7e7cd3b4c2951875a8e427e2e (diff)
packages/gdb: add gdb-11.2
Forward port patches from gdb-11.1, as they still apply clean, hence still assumed to be relevant. Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
-rw-r--r--packages/gdb/11.2/0000-xtensa-make-sure-ar_base-is-initialized.patch30
-rw-r--r--packages/gdb/11.2/0001-WIP-end-of-prologue-detection-hack.patch26
-rw-r--r--packages/gdb/11.2/0002-allow-android.patch45
-rw-r--r--packages/gdb/11.2/0003-xtensa-Fix-compilation-of-gdbserver.patch30
-rw-r--r--packages/gdb/11.2/chksum8
-rw-r--r--packages/gdb/11.2/version.desc0
6 files changed, 139 insertions, 0 deletions
diff --git a/packages/gdb/11.2/0000-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/11.2/0000-xtensa-make-sure-ar_base-is-initialized.patch
new file mode 100644
index 0000000..d608922
--- /dev/null
+++ b/packages/gdb/11.2/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 <jcmvbkbc@gmail.com>
+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 <jcmvbkbc@gmail.com>
+---
+ 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.2/0001-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/11.2/0001-WIP-end-of-prologue-detection-hack.patch
new file mode 100644
index 0000000..5eec5d6
--- /dev/null
+++ b/packages/gdb/11.2/0001-WIP-end-of-prologue-detection-hack.patch
@@ -0,0 +1,26 @@
+From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001
+From: Max Filippov <jcmvbkbc@gmail.com>
+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 <jcmvbkbc@gmail.com>
+---
+ 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.2/0002-allow-android.patch b/packages/gdb/11.2/0002-allow-android.patch
new file mode 100644
index 0000000..d6c5869
--- /dev/null
+++ b/packages/gdb/11.2/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, <elf.h> actually includes definitions
+- # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
+- # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
+- # leading to conflicts with the defintions from <linux/elf.h>.
+- # This makes it impossible for us to include both <elf.h> and
+- # <linux/elf.h>, 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 <elf.h>
+
+--- a/gdbserver/configure.ac
++++ b/gdbserver/configure.ac
+@@ -171,17 +171,6 @@
+ ])
+
+ case "${target}" in
+- *-android*)
+- # Starting with NDK version 9, <elf.h> actually includes definitions
+- # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
+- # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
+- # leading to conflicts with the defintions from <linux/elf.h>.
+- # This makes it impossible for us to include both <elf.h> and
+- # <linux/elf.h>, 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 <elf.h>
diff --git a/packages/gdb/11.2/0003-xtensa-Fix-compilation-of-gdbserver.patch b/packages/gdb/11.2/0003-xtensa-Fix-compilation-of-gdbserver.patch
new file mode 100644
index 0000000..7ccfa68
--- /dev/null
+++ b/packages/gdb/11.2/0003-xtensa-Fix-compilation-of-gdbserver.patch
@@ -0,0 +1,30 @@
+From 6f110500ed04148e3734f5b6a4fc573477c8398a Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <abrodkin@synopsys.com>
+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 <abrodkin@synopsys.com>
+---
+ 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 <asm/ptrace.h>
+
++#include "gdbarch.h"
+ #include "gregset.h"
+ #include "xtensa-tdep.h"
+
diff --git a/packages/gdb/11.2/chksum b/packages/gdb/11.2/chksum
new file mode 100644
index 0000000..ec620f8
--- /dev/null
+++ b/packages/gdb/11.2/chksum
@@ -0,0 +1,8 @@
+md5 gdb-11.2.tar.gz b5674bef1fbd6beead889f80afa6f269
+sha1 gdb-11.2.tar.gz 4b80f1006730e45930956aca7e85c41c8ad09922
+sha256 gdb-11.2.tar.gz b558b66084835e43b6361f60d60d314c487447419cdf53adf83a87020c367290
+sha512 gdb-11.2.tar.gz e1fdcc8207fb479ff761bfb75fbb380757495e8e74b51b593acf425ffad80ee205692775111bdc9ba8f50a38e53deb156bb0d377078607c3d15afa46e8c30913
+md5 gdb-11.2.tar.xz 433bd0904caa31c247b1b1867f2f911d
+sha1 gdb-11.2.tar.xz 7c72b1d4a38bb6e155aaad29f4c1abf818b4595d
+sha256 gdb-11.2.tar.xz 1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32
+sha512 gdb-11.2.tar.xz 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127
diff --git a/packages/gdb/11.2/version.desc b/packages/gdb/11.2/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gdb/11.2/version.desc