aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2018-12-21 10:18:11 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2018-12-21 10:18:11 -0800
commit6d78332e7748754d4a77a31e692fb8760c8c12ff (patch)
tree3fd77afffc3b40e7033ced60ccba5d26ac7bd990 /ld
parentd00a27c5addfb6b7350a39215b48f4aaffa5960c (diff)
downloadbinutils-6d78332e7748754d4a77a31e692fb8760c8c12ff.zip
binutils-6d78332e7748754d4a77a31e692fb8760c8c12ff.tar.gz
binutils-6d78332e7748754d4a77a31e692fb8760c8c12ff.tar.bz2
Workaround a FreeBSD kernel bug resulting in spurious SIGTRAP events.
The ptrace command PT_LWPINFO to request detailed information about a stopped thread can return stale signal information from an earlier stop. Events which are reporting an intercepted signal will always report the correct information, but signal stops for some other events such as system call enter/exit events might include stale siginfo from an earlier signal. In particular, if a thread reports a system call entry or exit event after previously reporting a single-step or breakpoint event via SIGTRAP, fbsd_handle_debug_trap believed the system call event was the previous event and claimed it resulting in a spurious SIGTRAP event. True breakpoint and single-step events will never report another event in the pl_flags member of struct ptrace_lwpinfo. Use this to detect stale siginfo by requiring pl_flags to have only the PL_FLAG_SI flag and no other flags before treating a SIGTRAP as a single-step or breakpoint trap. gdb/ChangeLog: * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to equal PL_FLAG_SI. (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
Diffstat (limited to 'ld')
0 files changed, 0 insertions, 0 deletions