diff options
author | Doug Evans <dje@google.com> | 2009-09-28 21:09:15 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2009-09-28 21:09:15 +0000 |
commit | 66d990c74963fb25d8448e4d081fa757b427a5bc (patch) | |
tree | 6538fa513bd38c630e121f14987e020839176085 /gdb/linux-nat.c | |
parent | 206aa7673dee72df37107f9fd05c179f13ac1442 (diff) | |
download | gdb-66d990c74963fb25d8448e4d081fa757b427a5bc.zip gdb-66d990c74963fb25d8448e4d081fa757b427a5bc.tar.gz gdb-66d990c74963fb25d8448e4d081fa757b427a5bc.tar.bz2 |
(TRAP_REMOVE_SYSCALL_FLAG): New macro.
(linux_nat_wait_1): Mask off is-syscall bit in wait status for
TRAP_IS_SYSCALL before passing value to caller.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 48affdb..9b8cf48 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -70,6 +70,7 @@ /* To be used when one needs to know wether a WSTOPSIG (status) is a syscall */ #define TRAP_IS_SYSCALL (SIGTRAP | 0x80) +#define TRAP_REMOVE_SYSCALL_FLAG(status) ((status) & ~(0x80 << 8)) /* This comment documents high-level logic of this file. @@ -3012,6 +3013,12 @@ retry: lp = linux_nat_filter_event (lwpid, status, options); + /* If this was a syscall trap, we no longer need or want + the 0x80 flag, remove it. */ + if (WIFSTOPPED (status) + && WSTOPSIG (status) == TRAP_IS_SYSCALL) + status = TRAP_REMOVE_SYSCALL_FLAG (status); + if (lp && ptid_is_pid (ptid) && ptid_get_pid (lp->ptid) != ptid_get_pid (ptid)) |