(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.
This commit is contained in:
parent
206aa7673d
commit
66d990c749
|
@ -1,6 +1,9 @@
|
||||||
2009-09-28 Doug Evans <dje@google.com>
|
2009-09-28 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* linux-nat.c (status_to_str): Handle TRAP_IS_SYSCALL.
|
* linux-nat.c (status_to_str): Handle TRAP_IS_SYSCALL.
|
||||||
|
(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.
|
||||||
|
|
||||||
2009-09-28 Ulrich Weigand <uweigand@de.ibm.com>
|
2009-09-28 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
/* To be used when one needs to know wether a
|
/* To be used when one needs to know wether a
|
||||||
WSTOPSIG (status) is a syscall */
|
WSTOPSIG (status) is a syscall */
|
||||||
#define TRAP_IS_SYSCALL (SIGTRAP | 0x80)
|
#define TRAP_IS_SYSCALL (SIGTRAP | 0x80)
|
||||||
|
#define TRAP_REMOVE_SYSCALL_FLAG(status) ((status) & ~(0x80 << 8))
|
||||||
|
|
||||||
/* This comment documents high-level logic of this file.
|
/* This comment documents high-level logic of this file.
|
||||||
|
|
||||||
|
@ -3012,6 +3013,12 @@ retry:
|
||||||
|
|
||||||
lp = linux_nat_filter_event (lwpid, status, options);
|
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
|
if (lp
|
||||||
&& ptid_is_pid (ptid)
|
&& ptid_is_pid (ptid)
|
||||||
&& ptid_get_pid (lp->ptid) != ptid_get_pid (ptid))
|
&& ptid_get_pid (lp->ptid) != ptid_get_pid (ptid))
|
||||||
|
|
Loading…
Reference in New Issue