fbsd-nat: Use correct constant for target_waitstatus::sig.
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 27 Mar 2023 19:51:02 +0000 (12:51 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 27 Mar 2023 19:51:02 +0000 (12:51 -0700)
Use GDB_SIGNAL_TRAP instead of SIGTRAP.  This is a no-op since the
value of SIGTRAP on FreeBSD matches the value of GDB_SIGNAL_TRAP, but
it is more correct.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/fbsd-nat.c

index 2f5b512fb3397b844b171753a2b58ff4ebb6dac0..04d67fc5278d2861e1a36aa3e5be86f87ddeaf78 100644 (file)
@@ -1439,7 +1439,7 @@ fbsd_nat_target::wait_1 (ptid_t ptid, struct target_waitstatus *ourstatus,
             SIGTRAP, so only treat SIGTRAP events as system call
             entry/exit events.  */
          if (pl.pl_flags & (PL_FLAG_SCE | PL_FLAG_SCX)
-             && ourstatus->sig () == SIGTRAP)
+             && ourstatus->sig () == GDB_SIGNAL_TRAP)
            {
 #ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE
              if (catch_syscall_enabled ())