diff options
author | John Baldwin <jhb@FreeBSD.org> | 2020-09-16 11:40:05 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2020-09-16 11:40:05 -0700 |
commit | fe5ddfc3ee21789ec2bdffbe48f6b7cfe730dca7 (patch) | |
tree | d073005c502f89419a3039e9466172e186cae98a /gdb/fbsd-nat.c | |
parent | e911c6663bb8cff9e6968a885b81d5dd484de031 (diff) | |
download | gdb-fe5ddfc3ee21789ec2bdffbe48f6b7cfe730dca7.zip gdb-fe5ddfc3ee21789ec2bdffbe48f6b7cfe730dca7.tar.gz gdb-fe5ddfc3ee21789ec2bdffbe48f6b7cfe730dca7.tar.bz2 |
Assume FreeBSD kernels always report exec events.
FreeBSD kernels have reported exec events via the PL_FLAG_EXEC flag
since 8.2 release. The most recent release that did not support this
flag is 7.4 released in November of 2011.
Note that the FreeBSD native target already assumed that PL_FLAG_SCE
and PL_FLAG_SCX were always supported on systems supporting
PT_LWPINFO, but those flags were added at the same time as
PL_FLAG_EXEC. Building the native target on a system without
PL_FLAG_EXEC would have failed to build before this change already as
a result.
gdb/ChangeLog:
* fbsd-nat.c (fbsd_nat_target::wait): Always check for
PL_FLAG_EXEC.
(fbsd_nat_target::insert_exec_catchpoint)
(fbsd_nat_target::remove_exec_catchpoint): Always define.
* fbsd-nat.h (fbsd_nat_target::insert_exec_catchpoint)
(fbsd_nat_target::remove_exec_catchpoint): Always declare.
Diffstat (limited to 'gdb/fbsd-nat.c')
-rw-r--r-- | gdb/fbsd-nat.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index ac88fbc..0ab7f83 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -1335,7 +1335,6 @@ fbsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, #endif #endif -#ifdef PL_FLAG_EXEC if (pl.pl_flags & PL_FLAG_EXEC) { ourstatus->kind = TARGET_WAITKIND_EXECD; @@ -1343,7 +1342,6 @@ fbsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, = xstrdup (pid_to_exec_file (pid)); return wptid; } -#endif #ifdef USE_SIGTRAP_SIGINFO if (fbsd_handle_debug_trap (this, wptid, pl)) @@ -1508,9 +1506,7 @@ fbsd_nat_target::post_attach (int pid) fbsd_add_threads (this, pid); } -#ifdef PL_FLAG_EXEC -/* If the FreeBSD kernel supports PL_FLAG_EXEC, then traced processes - will always stop after exec. */ +/* Traced processes always stop after exec. */ int fbsd_nat_target::insert_exec_catchpoint (int pid) @@ -1523,7 +1519,6 @@ fbsd_nat_target::remove_exec_catchpoint (int pid) { return 0; } -#endif #ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE int |