aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-05-30 23:24:21 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-05-30 23:24:21 +0000
commitc5722abb6a5cfdb83d8e2fcce271cba48dbd7281 (patch)
treed095210dd4f34c5f6d58e853a76b28594985a183
parente6e83842d9749824da4e2da42f13b89883e73858 (diff)
downloadports-c5722abb6a5cfdb83d8e2fcce271cba48dbd7281.tar.gz
ports-c5722abb6a5cfdb83d8e2fcce271cba48dbd7281.zip
devel/gdb: Fix build of GDB 12.1 on older aarch64 systems.
Backport a patch from GDB to fix the build on aarch64 systems that do not support hardware breakpoints/watchpoints. PR: 264095 Reviewed by: pizzamig (maintainer), mikael Differential Revision: https://reviews.freebsd.org/D35332
-rw-r--r--devel/gdb/Makefile3
-rw-r--r--devel/gdb/files/commit-b2fdd31b03e32
2 files changed, 34 insertions, 1 deletions
diff --git a/devel/gdb/Makefile b/devel/gdb/Makefile
index ec71f616457f..34d6cb9dc681 100644
--- a/devel/gdb/Makefile
+++ b/devel/gdb/Makefile
@@ -65,7 +65,8 @@ EXTRA_PATCHES= ${FILESDIR}/commit-711b0b6698f \
${FILESDIR}/commit-414d5848bb2 \
${FILESDIR}/commit-0a765c1a8e9 \
${FILESDIR}/commit-f9fbb7636a5 \
- ${FILESDIR}/commit-b7fe5463cf0
+ ${FILESDIR}/commit-b7fe5463cf0 \
+ ${FILESDIR}/commit-b2fdd31b03e
LIB_DEPENDS+= libexpat.so:textproc/expat2
VER= ${DISTVERSION:S/.//g}
diff --git a/devel/gdb/files/commit-b2fdd31b03e b/devel/gdb/files/commit-b2fdd31b03e
new file mode 100644
index 000000000000..2445c0f11a70
--- /dev/null
+++ b/devel/gdb/files/commit-b2fdd31b03e
@@ -0,0 +1,32 @@
+commit 7b45afa632e0484835a56cc60393d5e118c0f605
+Author: John Baldwin <jhb@FreeBSD.org>
+Date: Thu May 26 14:14:46 2022 -0700
+
+ aarch64-fbsd-nat: Move definition of debug_regs_probed under HAVE_DBREG.
+
+ This fixes the build on older FreeBSD systems without support for
+ hardware breakpoints/watchpoints.
+
+ (cherry picked from commit b2fdd31b03ef01a9a790ecb5d0dc0fea209b49ec)
+
+diff --git gdb/aarch64-fbsd-nat.c gdb/aarch64-fbsd-nat.c
+index 910bf5bb190..ab6ab36a39a 100644
+--- gdb/aarch64-fbsd-nat.c
++++ gdb/aarch64-fbsd-nat.c
+@@ -76,7 +76,6 @@ struct aarch64_fbsd_nat_target final : public fbsd_nat_target
+ };
+
+ static aarch64_fbsd_nat_target the_aarch64_fbsd_nat_target;
+-bool aarch64_fbsd_nat_target::debug_regs_probed;
+
+ /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
+ for all registers. */
+@@ -154,6 +153,8 @@ aarch64_fbsd_nat_target::read_description ()
+ }
+
+ #ifdef HAVE_DBREG
++bool aarch64_fbsd_nat_target::debug_regs_probed;
++
+ /* Set of threads which need to update debug registers on next resume. */
+
+ static std::unordered_set<lwpid_t> aarch64_debug_pending_threads;