public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: [aarch64] Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint
Date: Sat, 27 Jun 2026 23:57:43 GMT	[thread overview]
Message-ID: <178260466322.1.12311466850374255433.rpms-gdb-3f32311b4a6f@fedoraproject.org> (raw)

          A new commit has been pushed.

          Repo   : rpms/gdb
          Branch : gdb-17.2-rebase-f44
          Commit : 3f32311b4a6fe79de1a3da7bca5c08613eb3734e
          Author : Jan Kratochvil <jan.kratochvil@redhat.com>
          Date   : 2016-08-03T23:14:22+02:00
          Stats  : +84/-1 in 2 file(s)
          URL    : https://src.fedoraproject.org/rpms/gdb/c/3f32311b4a6fe79de1a3da7bca5c08613eb3734e?branch=gdb-17.2-rebase-f44

          Log:
          [aarch64] Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint

(Andrew Pinski, RH BZ 1363635).

---
diff --git a/gdb-rhbz1363635-aarch64-armv8182.patch b/gdb-rhbz1363635-aarch64-armv8182.patch
new file mode 100644
index 0000000..8eea565
--- /dev/null
+++ b/gdb-rhbz1363635-aarch64-armv8182.patch
@@ -0,0 +1,74 @@
+commit 49ecef2a7da2ee9df4ae675f99b70518fbf1bb23
+Author: Andrew Pinski <apinski@cavium.com>
+Date:   Sat Jul 23 09:56:44 2016 -0700
+
+    Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint
+    
+    The problem here is ARMv8.1 (and ARMv8.2) define a
+    different debug version than ARMv8 (7 and 8 respectively).
+    This fixes hw watchpoints and breakpoints by checking
+    for those debug versions too.
+    
+    Committed as obvious after a test on aarch64-linux-gnu
+    (on a ThunderX machine which has ARMv8.1 support enabled).
+    
+    ChangeLog:
+    	* nat/aarch64-linux-hw-point.c
+    	(aarch64_linux_get_debug_reg_capacity): Handle
+    	ARMv8.1 and ARMv8.2 debug versions.
+    	* nat/aarch64-linux-hw-point.h
+    	(AARCH64_DEBUG_ARCH_V8_1): New define.
+    	(AARCH64_DEBUG_ARCH_V8_2): New define.
+    
+    Signed-off-by: Andrew Pinski <apinski@cavium.com>
+
+### a/gdb/ChangeLog
+### b/gdb/ChangeLog
+## -1,3 +1,12 @@
++2016-07-23  Andrew Pinski  <apinski@cavium.com>
++
++	* nat/aarch64-linux-hw-point.c
++	(aarch64_linux_get_debug_reg_capacity): Handle
++	ARMv8.1 and ARMv8.2 debug versions.
++	* nat/aarch64-linux-hw-point.h
++	(AARCH64_DEBUG_ARCH_V8_1): New define.
++	(AARCH64_DEBUG_ARCH_V8_2): New define.
++
+ 2016-06-30  Руслан Ижбулатов  <lrn1986@gmail.com>
+ 
+ 	PR gdb/14529
+--- a/gdb/nat/aarch64-linux-hw-point.c
++++ b/gdb/nat/aarch64-linux-hw-point.c
+@@ -630,7 +630,9 @@ aarch64_linux_get_debug_reg_capacity (int tid)
+ 
+   /* Get hardware watchpoint register info.  */
+   if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_HW_WATCH, &iov) == 0
+-      && AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8)
++      && (AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8
++	  || AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_1
++	  || AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_2))
+     {
+       aarch64_num_wp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
+       if (aarch64_num_wp_regs > AARCH64_HWP_MAX_NUM)
+@@ -650,7 +652,9 @@ aarch64_linux_get_debug_reg_capacity (int tid)
+ 
+   /* Get hardware breakpoint register info.  */
+   if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_HW_BREAK, &iov) == 0
+-      && AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8)
++      && (AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8
++	  || AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_1
++	  || AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_2))
+     {
+       aarch64_num_bp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
+       if (aarch64_num_bp_regs > AARCH64_HBP_MAX_NUM)
+--- a/gdb/nat/aarch64-linux-hw-point.h
++++ b/gdb/nat/aarch64-linux-hw-point.h
+@@ -68,6 +68,8 @@
+ 
+ /* Macro for the expected version of the ARMv8-A debug architecture.  */
+ #define AARCH64_DEBUG_ARCH_V8 0x6
++#define AARCH64_DEBUG_ARCH_V8_1 0x7
++#define AARCH64_DEBUG_ARCH_V8_2 0x8
+ 
+ /* ptrace expects control registers to be formatted as follows:
+ 

diff --git a/gdb.spec b/gdb.spec
index 1dcfc22..3f68e51 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -27,7 +27,7 @@ Version: 7.11.1
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 76%{?dist}
+Release: 77%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
 Group: Development/Debuggers
@@ -574,6 +574,10 @@ Patch1123: gdb-rhbz1325795-framefilters-test.patch
 Patch1128: gdb-bare-DW_TAG_lexical_block-1of2.patch
 Patch1129: gdb-bare-DW_TAG_lexical_block-2of2.patch
 
+# [aarch64] Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint
+# (Andrew Pinski, RH BZ 1363635).
+Patch1141: gdb-rhbz1363635-aarch64-armv8182.patch
+
 %if 0%{!?rhel:1} || 0%{?rhel} > 6
 # RL_STATE_FEDORA_GDB would not be found for:
 # Patch642: gdb-readline62-ask-more-rh.patch
@@ -888,6 +892,7 @@ find -name "*.info*"|xargs rm -f
 %patch1123 -p1
 %patch1128 -p1
 %patch1129 -p1
+%patch1141 -p1
 
 %patch1075 -p1
 %if 0%{?rhel:1} && 0%{?rhel} <= 7
@@ -1407,6 +1412,10 @@ then
 fi
 
 %changelog
+* Wed Aug  3 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.1-77.fc24
+- [aarch64] Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint
+  (Andrew Pinski, RH BZ 1363635).
+
 * Mon Jun 27 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.1-76.fc24
 - Test 'info type-printers' Python error (RH BZ 1350436).
 

                 reply	other threads:[~2026-06-27 23:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260466322.1.12311466850374255433.rpms-gdb-3f32311b4a6f@fedoraproject.org \
    --to=jan.kratochvil@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox