This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/3] Use signal information to determine SIGTRAP type on FreeBSD
- From: John Baldwin <jhb at FreeBSD dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 27 Feb 2018 17:46:53 -0800
- Subject: [PATCH 0/3] Use signal information to determine SIGTRAP type on FreeBSD
- Authentication-results: sourceware.org; auth=none
Use the signal information for a SIGTRAP signal to determine when an
event in a child process is a breakpoint event versus another event.
FreeBSD currently doesn't have a TRAP_HWBKPT (though I'm working on
fixing that), so this patchset queries the x86 debug registers on x86
platforms for a SIGTRAP signal a TRAP_TRACE signal code. (TRAP_TRACE is
currently used in FreeBSD for any DB# exception on x86 including a single
step trap or a watchpoint trigger.)
This fixed 27 previously failing tests in the testsuite for me on
FreeBSD/amd64.
John Baldwin (3):
Implement "to_stopped_by_hw_breakpoint" for x86 debug registers.
Add a new debug knob for the FreeBSD native target.
Use signal information to determine SIGTRAP type for FreeBSD.
gdb/ChangeLog | 32 ++++++++++++
gdb/NEWS | 6 +++
gdb/doc/ChangeLog | 5 ++
gdb/doc/gdb.texinfo | 5 ++
gdb/fbsd-nat.c | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++
gdb/nat/x86-dregs.c | 45 +++++++++++++++++
gdb/nat/x86-dregs.h | 4 ++
gdb/x86-nat.c | 13 +++++
8 files changed, 249 insertions(+)
--
2.15.1