2011-10-10 Pedro Alves <pedro@codesourcery.com>
gdb/ * linux-nat.c (linux_nat_wait_1): Copy the event lwp's last_resume_kind before clearing it, and use the copy instead to determine whether to report a SIGSTOP as TARGET_SIGNAL_0. Use resume_clear_callback in the non-stop path too.
This commit is contained in:
parent
3b421ab3bc
commit
4b60df3d63
2 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2011-10-10 Pedro Alves <pedro@codesourcery.com>
|
||||
|
||||
* linux-nat.c (linux_nat_wait_1): Copy the event lwp's
|
||||
last_resume_kind before clearing it, and use the copy instead to
|
||||
determine whether to report a SIGSTOP as TARGET_SIGNAL_0. Use
|
||||
resume_clear_callback in the non-stop path too.
|
||||
|
||||
2011-10-09 Yao Qi <yao@codesourcery.com>
|
||||
|
||||
* valprint.c (value_check_printable): Add one parameter OPTIONS.
|
||||
|
|
|
@ -3335,6 +3335,7 @@ linux_nat_wait_1 (struct target_ops *ops,
|
|||
int target_options)
|
||||
{
|
||||
static sigset_t prev_mask;
|
||||
enum resume_kind last_resume_kind;
|
||||
struct lwp_info *lp = NULL;
|
||||
int options = 0;
|
||||
int status = 0;
|
||||
|
@ -3747,14 +3748,20 @@ retry:
|
|||
why. */
|
||||
iterate_over_lwps (minus_one_ptid, cancel_breakpoints_callback, lp);
|
||||
|
||||
/* We'll need this to determine whether to report a SIGSTOP as
|
||||
TARGET_WAITKIND_0. Need to take a copy because
|
||||
resume_clear_callback clears it. */
|
||||
last_resume_kind = lp->last_resume_kind;
|
||||
|
||||
/* In all-stop, from the core's perspective, all LWPs are now
|
||||
stopped until a new resume action is sent over. */
|
||||
iterate_over_lwps (minus_one_ptid, resume_clear_callback, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
lp->resumed = 0;
|
||||
lp->last_resume_kind = resume_stop;
|
||||
/* See above. */
|
||||
last_resume_kind = lp->last_resume_kind;
|
||||
resume_clear_callback (lp, NULL);
|
||||
}
|
||||
|
||||
if (linux_nat_status_is_event (status))
|
||||
|
@ -3778,7 +3785,7 @@ retry:
|
|||
|
||||
restore_child_signals_mask (&prev_mask);
|
||||
|
||||
if (lp->last_resume_kind == resume_stop
|
||||
if (last_resume_kind == resume_stop
|
||||
&& ourstatus->kind == TARGET_WAITKIND_STOPPED
|
||||
&& WSTOPSIG (status) == SIGSTOP)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue