static int
get_pending_status (struct lwp_info *lp, int *status)
{
- enum gdb_signal signo = TARGET_SIGNAL_0;
+ enum gdb_signal signo = GDB_SIGNAL_0;
/* If we paused threads momentarily, we may have stored pending
events in lp->status or lp->waitstatus (see stop_wait_callback),
stop_signal make sense as a real signal to pass to the inferior.
Some catchpoint related events, like
TARGET_WAITKIND_(V)FORK|EXEC|SYSCALL, have their stop_signal set
- to TARGET_SIGNAL_SIGTRAP when the catchpoint triggers. But,
+ to GDB_SIGNAL_SIGTRAP when the catchpoint triggers. But,
those traps are debug API (ptrace in our case) related and
induced; the inferior wouldn't see them if it wasn't being
traced. Hence, we should never pass them to the inferior, even
this is really a corner case. */
if (lp->waitstatus.kind != TARGET_WAITKIND_IGNORE)
- signo = TARGET_SIGNAL_0; /* a pending ptrace event, not a real signal. */
+ signo = GDB_SIGNAL_0; /* a pending ptrace event, not a real signal. */
else if (lp->status)
signo = gdb_signal_from_host (WSTOPSIG (lp->status));
else if (non_stop && !is_executing (lp->ptid))
*status = 0;
- if (signo == TARGET_SIGNAL_0)
+ if (signo == GDB_SIGNAL_0)
{
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops,
pid_to_ptid (GET_LWP (lp->ptid)),
- step, TARGET_SIGNAL_0);
+ step, GDB_SIGNAL_0);
lp->stopped = 0;
lp->step = step;
memset (&lp->siginfo, 0, sizeof (lp->siginfo));
"LLR: Preparing to %s %s, %s, inferior_ptid %s\n",
step ? "step" : "resume",
target_pid_to_str (ptid),
- (signo != TARGET_SIGNAL_0
+ (signo != GDB_SIGNAL_0
? strsignal (gdb_signal_to_host (signo)) : "0"),
target_pid_to_str (inferior_ptid));
/* FIXME: What should we do if we are supposed to continue
this thread with a signal? */
- gdb_assert (signo == TARGET_SIGNAL_0);
+ gdb_assert (signo == GDB_SIGNAL_0);
signo = gdb_signal_from_host (WSTOPSIG (lp->status));
lp->status = 0;
}
{
/* FIXME: What should we do if we are supposed to continue
this thread with a signal? */
- gdb_assert (signo == TARGET_SIGNAL_0);
+ gdb_assert (signo == GDB_SIGNAL_0);
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LLR: %s %s, %s (resume event thread)\n",
step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
target_pid_to_str (ptid),
- (signo != TARGET_SIGNAL_0
+ (signo != GDB_SIGNAL_0
? strsignal (gdb_signal_to_host (signo)) : "0"));
restore_child_signals_mask (&prev_mask);
if (linux_nat_prepare_to_resume != NULL)
linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
- lp->step, TARGET_SIGNAL_0);
+ lp->step, GDB_SIGNAL_0);
return 1;
}
RT signal, it can only be queued once. We need to be
careful to not resume the LWP if we wanted it to
stop. In that case, we'll leave the SIGSTOP pending.
- It will later be reported as TARGET_SIGNAL_0. */
+ It will later be reported as GDB_SIGNAL_0. */
tp = find_thread_ptid (new_lp->ptid);
if (tp != NULL && tp->stop_requested)
new_lp->last_resume_kind = resume_stop;
if (linux_nat_prepare_to_resume != NULL)
linux_nat_prepare_to_resume (new_lp);
linux_ops->to_resume (linux_ops, pid_to_ptid (new_pid),
- 0, TARGET_SIGNAL_0);
+ 0, GDB_SIGNAL_0);
new_lp->stopped = 0;
}
}
if (linux_nat_prepare_to_resume != NULL)
linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
- 0, TARGET_SIGNAL_0);
+ 0, GDB_SIGNAL_0);
return 1;
}
if (linux_nat_prepare_to_resume != NULL)
linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
- lp->step, TARGET_SIGNAL_0);
+ lp->step, GDB_SIGNAL_0);
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LLW: %s %s, 0, 0 (discard SIGSTOP)\n",
if (linux_nat_prepare_to_resume != NULL)
linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
- lp->step, TARGET_SIGNAL_0);
+ lp->step, GDB_SIGNAL_0);
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LLW: %s %s, 0, 0 (discard SIGINT)\n",
if (linux_nat_prepare_to_resume != NULL)
linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
- lp->step, TARGET_SIGNAL_0);
+ lp->step, GDB_SIGNAL_0);
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LLW: %s %s, 0, 0 (expect SIGSTOP)\n",
lp->step ?
"PTRACE_SINGLESTEP" : "PTRACE_CONT",
target_pid_to_str (lp->ptid),
- (signo != TARGET_SIGNAL_0
+ (signo != GDB_SIGNAL_0
? strsignal (gdb_signal_to_host (signo))
: "0"));
lp->stopped = 0;
/* Only do the below in all-stop, as we currently use SIGINT
to implement target_stop (see linux_nat_stop) in
non-stop. */
- if (signo == TARGET_SIGNAL_INT && signal_pass_state (signo) == 0)
+ if (signo == GDB_SIGNAL_INT && signal_pass_state (signo) == 0)
{
/* If ^C/BREAK is typed at the tty/console, SIGINT gets
forwarded to the entire process group, that is, all LWPs
/* A thread that has been requested to stop by GDB with
target_stop, and it stopped cleanly, so report as SIG0. The
use of SIGSTOP is an implementation detail. */
- ourstatus->value.sig = TARGET_SIGNAL_0;
+ ourstatus->value.sig = GDB_SIGNAL_0;
}
if (ourstatus->kind == TARGET_WAITKIND_EXITED
if (linux_nat_prepare_to_resume != NULL)
linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
- lp->step, TARGET_SIGNAL_0);
+ lp->step, GDB_SIGNAL_0);
lp->stopped = 0;
memset (&lp->siginfo, 0, sizeof (lp->siginfo));
lp->stopped_by_watchpoint = 0;
gdb_assert (arg != NULL);
/* Unpause all */
- target_resume (*ptid, 0, TARGET_SIGNAL_0);
+ target_resume (*ptid, 0, GDB_SIGNAL_0);
}
static VEC(static_tracepoint_marker_p) *
return;
}
-/* Stop an LWP, and push a TARGET_SIGNAL_0 stop status if no other
+/* Stop an LWP, and push a GDB_SIGNAL_0 stop status if no other
event came out. */
static int