diff options
author | John Baldwin <jhb@FreeBSD.org> | 2018-03-03 21:25:33 -0800 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2018-03-03 21:25:33 -0800 |
commit | 7efba073e2b83803a47fd89e701fe60b98f2debc (patch) | |
tree | c1ae1f2acffd1e992077ef2e03bd549f0690c73d /gdb/ChangeLog | |
parent | 386a86761838df16c1459275d465ed21a1c35d9f (diff) | |
download | gdb-7efba073e2b83803a47fd89e701fe60b98f2debc.zip gdb-7efba073e2b83803a47fd89e701fe60b98f2debc.tar.gz gdb-7efba073e2b83803a47fd89e701fe60b98f2debc.tar.bz2 |
Use signal information to determine SIGTRAP type for FreeBSD.
Use the signal code from siginfo_t to distinguish SIGTRAP events due
to trace traps (TRAP_TRACE) and software breakpoints (TRAP_BRKPT).
For software breakpoints, adjust the PC when the event is reported as
part of the API when supplying "stopped_by_sw_breakpoint". Currently
FreeBSD only supports hardware watchpoints and breakpoints on x86
which are reported as trace traps. Signal information is not used on
MIPS and sparc64 kernels which do not reliably report TRAP_BRKPT for
software breakpoints.
gdb/ChangeLog:
* fbsd-nat.c: Include "inf-ptrace.h".
(USE_SIGTRAP_SIGINFO): Conditionally define.
[USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
(fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
[USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
function.
[USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
Likewise.
[USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
Likewise.
(fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
"stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
"supports_stopped_by_hw_breakpoint" target methods.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9a12a5e..1190e0f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,21 @@ 2018-03-04 John Baldwin <jhb@FreeBSD.org> + * fbsd-nat.c: Include "inf-ptrace.h". + (USE_SIGTRAP_SIGINFO): Conditionally define. + [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function. + (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap". + [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New + function. + [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint): + Likewise. + [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint): + Likewise. + (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set + "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint", + "supports_stopped_by_hw_breakpoint" target methods. + +2018-03-04 John Baldwin <jhb@FreeBSD.org> + * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat". * fbsd-nat.c (debug_fbsd_nat): New variable. (show_fbsd_nat_debug): New function. |