This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Use signal information to determine SIGTRAP type for FreeBSD.


*** TEST RESULTS FOR COMMIT 7efba073e2b83803a47fd89e701fe60b98f2debc ***

Author: John Baldwin <jhb@FreeBSD.org>
Branch: master
Commit: 7efba073e2b83803a47fd89e701fe60b98f2debc

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]