blob: c3efd54151f91367fd712e6002e8933d128d04e8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
commit 8a8b3a6ad25f6bd379f7cbd6cc1f9edcf076d940
Author: John Baldwin <jhb@FreeBSD.org>
Date: Tue Mar 22 12:05:43 2022 -0700
Remove USE_SIGTRAP_SIGINFO condition for FreeBSD/x86 debug regs support.
For BSD x86 targets, stopped_by_hw_breakpoint doesn't check siginfo_t
but inspects the DR6 register directly via PT_GETDBREGS.
(cherry picked from commit 711b0b6698ff6350b7c61710491c76c749945d4a)
diff --git a/gdb/amd64-fbsd-nat.c b/gdb/amd64-fbsd-nat.c
index 98a1af03a66..368f4c10786 100644
--- gdb/amd64-fbsd-nat.c
+++ gdb/amd64-fbsd-nat.c
@@ -46,7 +46,7 @@ class amd64_fbsd_nat_target final
const struct target_desc *read_description () override;
-#if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO)
+#if defined(HAVE_PT_GETDBREGS)
bool supports_stopped_by_hw_breakpoint () override;
#endif
};
@@ -348,7 +348,7 @@ amd64_fbsd_nat_target::read_description ()
return i386_target_description (X86_XSTATE_SSE_MASK, true);
}
-#if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO)
+#if defined(HAVE_PT_GETDBREGS)
/* Implement the supports_stopped_by_hw_breakpoints method. */
bool
diff --git a/gdb/i386-fbsd-nat.c b/gdb/i386-fbsd-nat.c
index a6ced66250c..023f24bab37 100644
--- gdb/i386-fbsd-nat.c
+++ gdb/i386-fbsd-nat.c
@@ -46,7 +46,7 @@ class i386_fbsd_nat_target final
void resume (ptid_t, int, enum gdb_signal) override;
-#if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO)
+#if defined(HAVE_PT_GETDBREGS)
bool supports_stopped_by_hw_breakpoint () override;
#endif
};
@@ -361,7 +361,7 @@ i386_fbsd_nat_target::read_description ()
return i386_target_description (X86_XSTATE_X87_MASK, true);
}
-#if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO)
+#if defined(HAVE_PT_GETDBREGS)
/* Implement the supports_stopped_by_hw_breakpoints method. */
bool
|