+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.
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;
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))
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)
{