+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
/* Check whether libpthdebug might be ready to be initialized. */
if (!pd_active && status->kind == TARGET_WAITKIND_STOPPED
- && status->value.sig == TARGET_SIGNAL_TRAP)
+ && status->value.sig == GDB_SIGNAL_TRAP)
{
struct regcache *regcache = get_thread_regcache (ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
const struct target_waitstatus *ws)
{
if (ws->kind != TARGET_WAITKIND_STOPPED
- || ws->value.sig != TARGET_SIGNAL_TRAP)
+ || ws->value.sig != GDB_SIGNAL_TRAP)
return 0;
return breakpoint_address_match_range (bl->pspace->aspace, bl->address,
stack_frame_id, bp_until);
make_cleanup_delete_breakpoint (breakpoint);
- proceed (-1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed (-1, GDB_SIGNAL_DEFAULT, 0);
/* If we are running asynchronously, and proceed call above has
actually managed to start the target, arrange for breakpoints to
struct breakpoint *b = bl->owner;
if (ws->kind != TARGET_WAITKIND_STOPPED
- || ws->value.sig != TARGET_SIGNAL_TRAP)
+ || ws->value.sig != GDB_SIGNAL_TRAP)
return 0;
if (!breakpoint_address_match (bl->pspace->aspace, bl->address,
resume_info.thread = ptid;
resume_info.kind = resume_continue;
- resume_info.sig = TARGET_SIGNAL_0;
+ resume_info.sig = GDB_SIGNAL_0;
(*the_target->resume) (&resume_info, 1);
}
#else
- target_resume (ptid, 0, TARGET_SIGNAL_0);
+ target_resume (ptid, 0, GDB_SIGNAL_0);
#endif
fd = gdb_connect_sync_socket (pid);
resume_info.thread = ptid;
resume_info.kind = resume_stop;
- resume_info.sig = TARGET_SIGNAL_0;
+ resume_info.sig = GDB_SIGNAL_0;
(*the_target->resume) (&resume_info, 1);
}
const char *
gdb_signal_to_string (enum gdb_signal sig)
{
- if ((int) sig >= TARGET_SIGNAL_FIRST && (int) sig <= TARGET_SIGNAL_LAST)
+ if ((int) sig >= GDB_SIGNAL_FIRST && (int) sig <= GDB_SIGNAL_LAST)
return signals[sig].string;
else
- return signals[TARGET_SIGNAL_UNKNOWN].string;
+ return signals[GDB_SIGNAL_UNKNOWN].string;
}
/* Return the name for a signal. */
const char *
gdb_signal_to_name (enum gdb_signal sig)
{
- if ((int) sig >= TARGET_SIGNAL_FIRST && (int) sig <= TARGET_SIGNAL_LAST
+ if ((int) sig >= GDB_SIGNAL_FIRST && (int) sig <= GDB_SIGNAL_LAST
&& signals[sig].name != NULL)
return signals[sig].name;
else
enum gdb_signal sig;
/* It's possible we also should allow "SIGCLD" as well as "SIGCHLD"
- for TARGET_SIGNAL_SIGCHLD. SIGIOT, on the other hand, is more
+ for GDB_SIGNAL_SIGCHLD. SIGIOT, on the other hand, is more
questionable; seems like by now people should call it SIGABRT
instead. */
/* This ugly cast brought to you by the native VAX compiler. */
- for (sig = TARGET_SIGNAL_HUP;
- sig < TARGET_SIGNAL_LAST;
+ for (sig = GDB_SIGNAL_HUP;
+ sig < GDB_SIGNAL_LAST;
sig = (enum gdb_signal) ((int) sig + 1))
if (signals[sig].name != NULL
&& strcmp (name, signals[sig].name) == 0)
return sig;
- return TARGET_SIGNAL_UNKNOWN;
+ return GDB_SIGNAL_UNKNOWN;
}
\f
/* The following functions are to help certain targets deal
to deal with the cases where more than one signal has the same number. */
if (hostsig == 0)
- return TARGET_SIGNAL_0;
+ return GDB_SIGNAL_0;
#if defined (SIGHUP)
if (hostsig == SIGHUP)
- return TARGET_SIGNAL_HUP;
+ return GDB_SIGNAL_HUP;
#endif
#if defined (SIGINT)
if (hostsig == SIGINT)
- return TARGET_SIGNAL_INT;
+ return GDB_SIGNAL_INT;
#endif
#if defined (SIGQUIT)
if (hostsig == SIGQUIT)
- return TARGET_SIGNAL_QUIT;
+ return GDB_SIGNAL_QUIT;
#endif
#if defined (SIGILL)
if (hostsig == SIGILL)
- return TARGET_SIGNAL_ILL;
+ return GDB_SIGNAL_ILL;
#endif
#if defined (SIGTRAP)
if (hostsig == SIGTRAP)
- return TARGET_SIGNAL_TRAP;
+ return GDB_SIGNAL_TRAP;
#endif
#if defined (SIGABRT)
if (hostsig == SIGABRT)
- return TARGET_SIGNAL_ABRT;
+ return GDB_SIGNAL_ABRT;
#endif
#if defined (SIGEMT)
if (hostsig == SIGEMT)
- return TARGET_SIGNAL_EMT;
+ return GDB_SIGNAL_EMT;
#endif
#if defined (SIGFPE)
if (hostsig == SIGFPE)
- return TARGET_SIGNAL_FPE;
+ return GDB_SIGNAL_FPE;
#endif
#if defined (SIGKILL)
if (hostsig == SIGKILL)
- return TARGET_SIGNAL_KILL;
+ return GDB_SIGNAL_KILL;
#endif
#if defined (SIGBUS)
if (hostsig == SIGBUS)
- return TARGET_SIGNAL_BUS;
+ return GDB_SIGNAL_BUS;
#endif
#if defined (SIGSEGV)
if (hostsig == SIGSEGV)
- return TARGET_SIGNAL_SEGV;
+ return GDB_SIGNAL_SEGV;
#endif
#if defined (SIGSYS)
if (hostsig == SIGSYS)
- return TARGET_SIGNAL_SYS;
+ return GDB_SIGNAL_SYS;
#endif
#if defined (SIGPIPE)
if (hostsig == SIGPIPE)
- return TARGET_SIGNAL_PIPE;
+ return GDB_SIGNAL_PIPE;
#endif
#if defined (SIGALRM)
if (hostsig == SIGALRM)
- return TARGET_SIGNAL_ALRM;
+ return GDB_SIGNAL_ALRM;
#endif
#if defined (SIGTERM)
if (hostsig == SIGTERM)
- return TARGET_SIGNAL_TERM;
+ return GDB_SIGNAL_TERM;
#endif
#if defined (SIGUSR1)
if (hostsig == SIGUSR1)
- return TARGET_SIGNAL_USR1;
+ return GDB_SIGNAL_USR1;
#endif
#if defined (SIGUSR2)
if (hostsig == SIGUSR2)
- return TARGET_SIGNAL_USR2;
+ return GDB_SIGNAL_USR2;
#endif
#if defined (SIGCLD)
if (hostsig == SIGCLD)
- return TARGET_SIGNAL_CHLD;
+ return GDB_SIGNAL_CHLD;
#endif
#if defined (SIGCHLD)
if (hostsig == SIGCHLD)
- return TARGET_SIGNAL_CHLD;
+ return GDB_SIGNAL_CHLD;
#endif
#if defined (SIGPWR)
if (hostsig == SIGPWR)
- return TARGET_SIGNAL_PWR;
+ return GDB_SIGNAL_PWR;
#endif
#if defined (SIGWINCH)
if (hostsig == SIGWINCH)
- return TARGET_SIGNAL_WINCH;
+ return GDB_SIGNAL_WINCH;
#endif
#if defined (SIGURG)
if (hostsig == SIGURG)
- return TARGET_SIGNAL_URG;
+ return GDB_SIGNAL_URG;
#endif
#if defined (SIGIO)
if (hostsig == SIGIO)
- return TARGET_SIGNAL_IO;
+ return GDB_SIGNAL_IO;
#endif
#if defined (SIGPOLL)
if (hostsig == SIGPOLL)
- return TARGET_SIGNAL_POLL;
+ return GDB_SIGNAL_POLL;
#endif
#if defined (SIGSTOP)
if (hostsig == SIGSTOP)
- return TARGET_SIGNAL_STOP;
+ return GDB_SIGNAL_STOP;
#endif
#if defined (SIGTSTP)
if (hostsig == SIGTSTP)
- return TARGET_SIGNAL_TSTP;
+ return GDB_SIGNAL_TSTP;
#endif
#if defined (SIGCONT)
if (hostsig == SIGCONT)
- return TARGET_SIGNAL_CONT;
+ return GDB_SIGNAL_CONT;
#endif
#if defined (SIGTTIN)
if (hostsig == SIGTTIN)
- return TARGET_SIGNAL_TTIN;
+ return GDB_SIGNAL_TTIN;
#endif
#if defined (SIGTTOU)
if (hostsig == SIGTTOU)
- return TARGET_SIGNAL_TTOU;
+ return GDB_SIGNAL_TTOU;
#endif
#if defined (SIGVTALRM)
if (hostsig == SIGVTALRM)
- return TARGET_SIGNAL_VTALRM;
+ return GDB_SIGNAL_VTALRM;
#endif
#if defined (SIGPROF)
if (hostsig == SIGPROF)
- return TARGET_SIGNAL_PROF;
+ return GDB_SIGNAL_PROF;
#endif
#if defined (SIGXCPU)
if (hostsig == SIGXCPU)
- return TARGET_SIGNAL_XCPU;
+ return GDB_SIGNAL_XCPU;
#endif
#if defined (SIGXFSZ)
if (hostsig == SIGXFSZ)
- return TARGET_SIGNAL_XFSZ;
+ return GDB_SIGNAL_XFSZ;
#endif
#if defined (SIGWIND)
if (hostsig == SIGWIND)
- return TARGET_SIGNAL_WIND;
+ return GDB_SIGNAL_WIND;
#endif
#if defined (SIGPHONE)
if (hostsig == SIGPHONE)
- return TARGET_SIGNAL_PHONE;
+ return GDB_SIGNAL_PHONE;
#endif
#if defined (SIGLOST)
if (hostsig == SIGLOST)
- return TARGET_SIGNAL_LOST;
+ return GDB_SIGNAL_LOST;
#endif
#if defined (SIGWAITING)
if (hostsig == SIGWAITING)
- return TARGET_SIGNAL_WAITING;
+ return GDB_SIGNAL_WAITING;
#endif
#if defined (SIGCANCEL)
if (hostsig == SIGCANCEL)
- return TARGET_SIGNAL_CANCEL;
+ return GDB_SIGNAL_CANCEL;
#endif
#if defined (SIGLWP)
if (hostsig == SIGLWP)
- return TARGET_SIGNAL_LWP;
+ return GDB_SIGNAL_LWP;
#endif
#if defined (SIGDANGER)
if (hostsig == SIGDANGER)
- return TARGET_SIGNAL_DANGER;
+ return GDB_SIGNAL_DANGER;
#endif
#if defined (SIGGRANT)
if (hostsig == SIGGRANT)
- return TARGET_SIGNAL_GRANT;
+ return GDB_SIGNAL_GRANT;
#endif
#if defined (SIGRETRACT)
if (hostsig == SIGRETRACT)
- return TARGET_SIGNAL_RETRACT;
+ return GDB_SIGNAL_RETRACT;
#endif
#if defined (SIGMSG)
if (hostsig == SIGMSG)
- return TARGET_SIGNAL_MSG;
+ return GDB_SIGNAL_MSG;
#endif
#if defined (SIGSOUND)
if (hostsig == SIGSOUND)
- return TARGET_SIGNAL_SOUND;
+ return GDB_SIGNAL_SOUND;
#endif
#if defined (SIGSAK)
if (hostsig == SIGSAK)
- return TARGET_SIGNAL_SAK;
+ return GDB_SIGNAL_SAK;
#endif
#if defined (SIGPRIO)
if (hostsig == SIGPRIO)
- return TARGET_SIGNAL_PRIO;
+ return GDB_SIGNAL_PRIO;
#endif
/* Mach exceptions. Assumes that the values for EXC_ are positive! */
#if defined (SIGINFO)
if (hostsig == SIGINFO)
- return TARGET_SIGNAL_INFO;
+ return GDB_SIGNAL_INFO;
#endif
#if defined (REALTIME_LO)
if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI)
{
- /* This block of TARGET_SIGNAL_REALTIME value is in order. */
+ /* This block of GDB_SIGNAL_REALTIME value is in order. */
if (33 <= hostsig && hostsig <= 63)
return (enum gdb_signal)
- (hostsig - 33 + (int) TARGET_SIGNAL_REALTIME_33);
+ (hostsig - 33 + (int) GDB_SIGNAL_REALTIME_33);
else if (hostsig == 32)
- return TARGET_SIGNAL_REALTIME_32;
+ return GDB_SIGNAL_REALTIME_32;
else if (64 <= hostsig && hostsig <= 127)
return (enum gdb_signal)
- (hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
+ (hostsig - 64 + (int) GDB_SIGNAL_REALTIME_64);
else
error (_("GDB bug: target.c (gdb_signal_from_host): "
"unrecognized real-time signal"));
}
#endif
- return TARGET_SIGNAL_UNKNOWN;
+ return GDB_SIGNAL_UNKNOWN;
}
/* Convert a OURSIG (an enum gdb_signal) to the form used by the
*oursig_ok = 1;
switch (oursig)
{
- case TARGET_SIGNAL_0:
+ case GDB_SIGNAL_0:
return 0;
#if defined (SIGHUP)
- case TARGET_SIGNAL_HUP:
+ case GDB_SIGNAL_HUP:
return SIGHUP;
#endif
#if defined (SIGINT)
- case TARGET_SIGNAL_INT:
+ case GDB_SIGNAL_INT:
return SIGINT;
#endif
#if defined (SIGQUIT)
- case TARGET_SIGNAL_QUIT:
+ case GDB_SIGNAL_QUIT:
return SIGQUIT;
#endif
#if defined (SIGILL)
- case TARGET_SIGNAL_ILL:
+ case GDB_SIGNAL_ILL:
return SIGILL;
#endif
#if defined (SIGTRAP)
- case TARGET_SIGNAL_TRAP:
+ case GDB_SIGNAL_TRAP:
return SIGTRAP;
#endif
#if defined (SIGABRT)
- case TARGET_SIGNAL_ABRT:
+ case GDB_SIGNAL_ABRT:
return SIGABRT;
#endif
#if defined (SIGEMT)
- case TARGET_SIGNAL_EMT:
+ case GDB_SIGNAL_EMT:
return SIGEMT;
#endif
#if defined (SIGFPE)
- case TARGET_SIGNAL_FPE:
+ case GDB_SIGNAL_FPE:
return SIGFPE;
#endif
#if defined (SIGKILL)
- case TARGET_SIGNAL_KILL:
+ case GDB_SIGNAL_KILL:
return SIGKILL;
#endif
#if defined (SIGBUS)
- case TARGET_SIGNAL_BUS:
+ case GDB_SIGNAL_BUS:
return SIGBUS;
#endif
#if defined (SIGSEGV)
- case TARGET_SIGNAL_SEGV:
+ case GDB_SIGNAL_SEGV:
return SIGSEGV;
#endif
#if defined (SIGSYS)
- case TARGET_SIGNAL_SYS:
+ case GDB_SIGNAL_SYS:
return SIGSYS;
#endif
#if defined (SIGPIPE)
- case TARGET_SIGNAL_PIPE:
+ case GDB_SIGNAL_PIPE:
return SIGPIPE;
#endif
#if defined (SIGALRM)
- case TARGET_SIGNAL_ALRM:
+ case GDB_SIGNAL_ALRM:
return SIGALRM;
#endif
#if defined (SIGTERM)
- case TARGET_SIGNAL_TERM:
+ case GDB_SIGNAL_TERM:
return SIGTERM;
#endif
#if defined (SIGUSR1)
- case TARGET_SIGNAL_USR1:
+ case GDB_SIGNAL_USR1:
return SIGUSR1;
#endif
#if defined (SIGUSR2)
- case TARGET_SIGNAL_USR2:
+ case GDB_SIGNAL_USR2:
return SIGUSR2;
#endif
#if defined (SIGCHLD) || defined (SIGCLD)
- case TARGET_SIGNAL_CHLD:
+ case GDB_SIGNAL_CHLD:
#if defined (SIGCHLD)
return SIGCHLD;
#else
#endif
#endif /* SIGCLD or SIGCHLD */
#if defined (SIGPWR)
- case TARGET_SIGNAL_PWR:
+ case GDB_SIGNAL_PWR:
return SIGPWR;
#endif
#if defined (SIGWINCH)
- case TARGET_SIGNAL_WINCH:
+ case GDB_SIGNAL_WINCH:
return SIGWINCH;
#endif
#if defined (SIGURG)
- case TARGET_SIGNAL_URG:
+ case GDB_SIGNAL_URG:
return SIGURG;
#endif
#if defined (SIGIO)
- case TARGET_SIGNAL_IO:
+ case GDB_SIGNAL_IO:
return SIGIO;
#endif
#if defined (SIGPOLL)
- case TARGET_SIGNAL_POLL:
+ case GDB_SIGNAL_POLL:
return SIGPOLL;
#endif
#if defined (SIGSTOP)
- case TARGET_SIGNAL_STOP:
+ case GDB_SIGNAL_STOP:
return SIGSTOP;
#endif
#if defined (SIGTSTP)
- case TARGET_SIGNAL_TSTP:
+ case GDB_SIGNAL_TSTP:
return SIGTSTP;
#endif
#if defined (SIGCONT)
- case TARGET_SIGNAL_CONT:
+ case GDB_SIGNAL_CONT:
return SIGCONT;
#endif
#if defined (SIGTTIN)
- case TARGET_SIGNAL_TTIN:
+ case GDB_SIGNAL_TTIN:
return SIGTTIN;
#endif
#if defined (SIGTTOU)
- case TARGET_SIGNAL_TTOU:
+ case GDB_SIGNAL_TTOU:
return SIGTTOU;
#endif
#if defined (SIGVTALRM)
- case TARGET_SIGNAL_VTALRM:
+ case GDB_SIGNAL_VTALRM:
return SIGVTALRM;
#endif
#if defined (SIGPROF)
- case TARGET_SIGNAL_PROF:
+ case GDB_SIGNAL_PROF:
return SIGPROF;
#endif
#if defined (SIGXCPU)
- case TARGET_SIGNAL_XCPU:
+ case GDB_SIGNAL_XCPU:
return SIGXCPU;
#endif
#if defined (SIGXFSZ)
- case TARGET_SIGNAL_XFSZ:
+ case GDB_SIGNAL_XFSZ:
return SIGXFSZ;
#endif
#if defined (SIGWIND)
- case TARGET_SIGNAL_WIND:
+ case GDB_SIGNAL_WIND:
return SIGWIND;
#endif
#if defined (SIGPHONE)
- case TARGET_SIGNAL_PHONE:
+ case GDB_SIGNAL_PHONE:
return SIGPHONE;
#endif
#if defined (SIGLOST)
- case TARGET_SIGNAL_LOST:
+ case GDB_SIGNAL_LOST:
return SIGLOST;
#endif
#if defined (SIGWAITING)
- case TARGET_SIGNAL_WAITING:
+ case GDB_SIGNAL_WAITING:
return SIGWAITING;
#endif
#if defined (SIGCANCEL)
- case TARGET_SIGNAL_CANCEL:
+ case GDB_SIGNAL_CANCEL:
return SIGCANCEL;
#endif
#if defined (SIGLWP)
- case TARGET_SIGNAL_LWP:
+ case GDB_SIGNAL_LWP:
return SIGLWP;
#endif
#if defined (SIGDANGER)
- case TARGET_SIGNAL_DANGER:
+ case GDB_SIGNAL_DANGER:
return SIGDANGER;
#endif
#if defined (SIGGRANT)
- case TARGET_SIGNAL_GRANT:
+ case GDB_SIGNAL_GRANT:
return SIGGRANT;
#endif
#if defined (SIGRETRACT)
- case TARGET_SIGNAL_RETRACT:
+ case GDB_SIGNAL_RETRACT:
return SIGRETRACT;
#endif
#if defined (SIGMSG)
- case TARGET_SIGNAL_MSG:
+ case GDB_SIGNAL_MSG:
return SIGMSG;
#endif
#if defined (SIGSOUND)
- case TARGET_SIGNAL_SOUND:
+ case GDB_SIGNAL_SOUND:
return SIGSOUND;
#endif
#if defined (SIGSAK)
- case TARGET_SIGNAL_SAK:
+ case GDB_SIGNAL_SAK:
return SIGSAK;
#endif
#if defined (SIGPRIO)
- case TARGET_SIGNAL_PRIO:
+ case GDB_SIGNAL_PRIO:
return SIGPRIO;
#endif
#endif
#if defined (SIGINFO)
- case TARGET_SIGNAL_INFO:
+ case GDB_SIGNAL_INFO:
return SIGINFO;
#endif
#if defined (REALTIME_LO)
retsig = 0;
- if (oursig >= TARGET_SIGNAL_REALTIME_33
- && oursig <= TARGET_SIGNAL_REALTIME_63)
+ if (oursig >= GDB_SIGNAL_REALTIME_33
+ && oursig <= GDB_SIGNAL_REALTIME_63)
{
/* This block of signals is continuous, and
- TARGET_SIGNAL_REALTIME_33 is 33 by definition. */
- retsig = (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + 33;
+ GDB_SIGNAL_REALTIME_33 is 33 by definition. */
+ retsig = (int) oursig - (int) GDB_SIGNAL_REALTIME_33 + 33;
}
- else if (oursig == TARGET_SIGNAL_REALTIME_32)
+ else if (oursig == GDB_SIGNAL_REALTIME_32)
{
- /* TARGET_SIGNAL_REALTIME_32 isn't contiguous with
- TARGET_SIGNAL_REALTIME_33. It is 32 by definition. */
+ /* GDB_SIGNAL_REALTIME_32 isn't contiguous with
+ GDB_SIGNAL_REALTIME_33. It is 32 by definition. */
retsig = 32;
}
- else if (oursig >= TARGET_SIGNAL_REALTIME_64
- && oursig <= TARGET_SIGNAL_REALTIME_127)
+ else if (oursig >= GDB_SIGNAL_REALTIME_64
+ && oursig <= GDB_SIGNAL_REALTIME_127)
{
/* This block of signals is continuous, and
- TARGET_SIGNAL_REALTIME_64 is 64 by definition. */
- retsig = (int) oursig - (int) TARGET_SIGNAL_REALTIME_64 + 64;
+ GDB_SIGNAL_REALTIME_64 is 64 by definition. */
+ retsig = (int) oursig - (int) GDB_SIGNAL_REALTIME_64 + 64;
}
if (retsig >= REALTIME_LO && retsig < REALTIME_HI)
(2, _("darwin_resume: pid=%d, tid=0x%x, step=%d, signal=%d\n"),
ptid_get_pid (ptid), ptid_get_tid (ptid), step, signal);
- if (signal == TARGET_SIGNAL_0)
+ if (signal == GDB_SIGNAL_0)
nsignal = 0;
else
nsignal = gdb_signal_to_host (signal);
break;
case EXC_BREAKPOINT:
/* Many internal GDB routines expect breakpoints to be reported
- as TARGET_SIGNAL_TRAP, and will report TARGET_EXC_BREAKPOINT
+ as GDB_SIGNAL_TRAP, and will report TARGET_EXC_BREAKPOINT
as a spurious signal. */
- status->value.sig = TARGET_SIGNAL_TRAP;
+ status->value.sig = GDB_SIGNAL_TRAP;
break;
default:
- status->value.sig = TARGET_SIGNAL_UNKNOWN;
+ status->value.sig = GDB_SIGNAL_UNKNOWN;
break;
}
darwin_inf_fake_stop = NULL;
status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
+ status->value.sig = GDB_SIGNAL_TRAP;
thread = VEC_index (darwin_thread_t, inf->private->threads, 0);
thread->msg_state = DARWIN_STOPPED;
return ptid_build (inf->pid, 0, thread->gdb_port);
{
ptid = darwin_wait (inferior_ptid, &wstatus);
if (wstatus.kind == TARGET_WAITKIND_STOPPED
- && wstatus.value.sig == TARGET_SIGNAL_STOP)
+ && wstatus.value.sig == GDB_SIGNAL_STOP)
break;
}
}
static int
find_signalled_thread (struct thread_info *info, void *data)
{
- if (info->suspend.stop_signal != TARGET_SIGNAL_0
+ if (info->suspend.stop_signal != GDB_SIGNAL_0
&& ptid_get_pid (info->ptid) == ptid_get_pid (inferior_ptid))
return 1;
if (info)
return info->suspend.stop_signal;
else
- return TARGET_SIGNAL_0;
+ return GDB_SIGNAL_0;
}
/* Create appropriate note sections for a corefile, returning them in
while (1)
{
- enum gdb_signal resume_signal = TARGET_SIGNAL_0;
+ enum gdb_signal resume_signal = GDB_SIGNAL_0;
ptid_t event_ptid;
struct target_waitstatus ws;
case TARGET_WAITKIND_EXECD:
/* Handle EXEC signals as if they were SIGTRAP signals. */
xfree (ws.value.execd_pathname);
- resume_signal = TARGET_SIGNAL_TRAP;
+ resume_signal = GDB_SIGNAL_TRAP;
switch_to_thread (event_ptid);
break;
break;
}
- if (resume_signal != TARGET_SIGNAL_TRAP)
+ if (resume_signal != GDB_SIGNAL_TRAP)
{
/* Let shell child handle its own signals in its own way. */
target_resume (resume_ptid, 0, resume_signal);
break;
/* Just make it go on. */
- target_resume (resume_ptid, 0, TARGET_SIGNAL_0);
+ target_resume (resume_ptid, 0, GDB_SIGNAL_0);
}
}
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
static int
get_detach_signal (struct thread_info *thread)
{
- enum gdb_signal signo = TARGET_SIGNAL_0;
+ enum gdb_signal signo = GDB_SIGNAL_0;
int status;
struct lwp_info *lp = get_thread_lwp (thread);
cleanly, then it'll have stopped with SIGSTOP. But we don't
want to deliver that SIGSTOP. */
if (thread->last_status.kind != TARGET_WAITKIND_STOPPED
- || thread->last_status.value.sig == TARGET_SIGNAL_0)
+ || thread->last_status.value.sig == GDB_SIGNAL_0)
return 0;
/* Otherwise, we may need to deliver the signal we
/* If we have no way to know which signals GDB does not
want to have passed to the program, assume
SIGTRAP/SIGINT, which is GDB's default. */
- && (signo == TARGET_SIGNAL_TRAP || signo == TARGET_SIGNAL_INT))
+ && (signo == GDB_SIGNAL_TRAP || signo == GDB_SIGNAL_INT))
{
if (debug_threads)
fprintf (stderr,
/* Lock it. */
lwp->suspended++;
- if (ourstatus.value.sig != TARGET_SIGNAL_0
+ if (ourstatus.value.sig != GDB_SIGNAL_0
|| current_inferior->last_resume_kind == resume_stop)
{
wstat = W_STOPCODE (gdb_signal_to_host (ourstatus.value.sig));
if (stabilizing_threads)
{
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_0;
+ ourstatus->value.sig = GDB_SIGNAL_0;
return ptid_of (event_child);
}
}
/* A thread that has been requested to stop by GDB with vCont;t,
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;
}
else if (current_inferior->last_resume_kind == resume_stop
&& WSTOPSIG (w) != SIGSTOP)
breakpoint events (Eg. new-thread events). Handle those other types
of events, and resume the execution if necessary. */
if (status->kind == TARGET_WAITKIND_STOPPED
- && status->value.integer == TARGET_SIGNAL_TRAP)
+ && status->value.integer == GDB_SIGNAL_TRAP)
{
const int realsig = lynx_ptrace (PTRACE_GETTRACESIG, new_ptid, 0, 0, 0);
{
TRACE ("SSTEP\n");
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
}
/* Was it a breakpoint? */
else if (status.flags & trace_mask)
{
TRACE ("STOPPED\n");
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
}
else if (status.flags & _DEBUG_FLAG_ISTOP)
{
TRACE ("REQUESTED\n");
/* We are assuming a requested stop is due to a SIGINT. */
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_INT;
+ ourstatus->value.sig = GDB_SIGNAL_INT;
nto_inferior.exit_signo = 0;
break;
}
/* Enable debugging of h/w breakpoint/watchpoint support. */
int debug_hw_points;
-int pass_signals[TARGET_SIGNAL_LAST];
-int program_signals[TARGET_SIGNAL_LAST];
+int pass_signals[GDB_SIGNAL_LAST];
+int program_signals[GDB_SIGNAL_LAST];
int program_signals_p;
jmp_buf toplevel;
current_inferior->last_resume_kind = resume_stop;
current_inferior->last_status = last_status;
}
- while (last_status.value.sig != TARGET_SIGNAL_TRAP);
+ while (last_status.value.sig != GDB_SIGNAL_TRAP);
current_inferior->last_resume_kind = resume_stop;
current_inferior->last_status = last_status;
process using the "attach" command, but this is different; it's
just using "target remote". Pretend it's just starting up. */
if (last_status.kind == TARGET_WAITKIND_STOPPED
- && last_status.value.sig == TARGET_SIGNAL_STOP)
- last_status.value.sig = TARGET_SIGNAL_TRAP;
+ && last_status.value.sig == GDB_SIGNAL_STOP)
+ last_status.value.sig = GDB_SIGNAL_TRAP;
current_inferior->last_resume_kind = resume_stop;
current_inferior->last_status = last_status;
{
if (strncmp ("QPassSignals:", own_buf, strlen ("QPassSignals:")) == 0)
{
- int numsigs = (int) TARGET_SIGNAL_LAST, i;
+ int numsigs = (int) GDB_SIGNAL_LAST, i;
const char *p = own_buf + strlen ("QPassSignals:");
CORE_ADDR cursig;
if (strncmp ("QProgramSignals:", own_buf, strlen ("QProgramSignals:")) == 0)
{
- int numsigs = (int) TARGET_SIGNAL_LAST, i;
+ int numsigs = (int) GDB_SIGNAL_LAST, i;
const char *p = own_buf + strlen ("QProgramSignals:");
CORE_ADDR cursig;
if (pid != 0 && kill_inferior (pid) == 0)
{
last_status.kind = TARGET_WAITKIND_SIGNALLED;
- last_status.value.sig = TARGET_SIGNAL_KILL;
+ last_status.value.sig = GDB_SIGNAL_KILL;
last_ptid = pid_to_ptid (pid);
discard_queued_stop_replies (pid);
write_ok (own_buf);
/* Most threads are stopped implicitly (all-stop); tag that with
signal 0. */
thread->last_status.kind = TARGET_WAITKIND_STOPPED;
- thread->last_status.value.sig = TARGET_SIGNAL_0;
+ thread->last_status.value.sig = GDB_SIGNAL_0;
}
}
struct target_waitstatus status;
status.kind = TARGET_WAITKIND_STOPPED;
- status.value.sig = TARGET_SIGNAL_TRAP;
+ status.value.sig = GDB_SIGNAL_TRAP;
prepare_resume_reply (own_buf,
all_threads.head->id, &status);
}
if (extended_protocol)
{
last_status.kind = TARGET_WAITKIND_EXITED;
- last_status.value.sig = TARGET_SIGNAL_KILL;
+ last_status.value.sig = GDB_SIGNAL_KILL;
return 0;
}
else
else
{
last_status.kind = TARGET_WAITKIND_EXITED;
- last_status.value.sig = TARGET_SIGNAL_KILL;
+ last_status.value.sig = GDB_SIGNAL_KILL;
}
return 0;
}
if (!server_waiting)
{
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_0;
+ ourstatus->value.sig = GDB_SIGNAL_0;
return ptid_build (ret, ret, 0);
}
static HANDLE current_process_handle = NULL;
static DWORD current_process_id = 0;
static DWORD main_thread_id = 0;
-static enum gdb_signal last_sig = TARGET_SIGNAL_0;
+static enum gdb_signal last_sig = GDB_SIGNAL_0;
/* The current debug event from WaitForDebugEvent. */
static DEBUG_EVENT current_event;
static void
do_initial_child_stuff (HANDLE proch, DWORD pid, int attached)
{
- last_sig = TARGET_SIGNAL_0;
+ last_sig = GDB_SIGNAL_0;
current_process_handle = proch;
current_process_id = pid;
step = 0;
}
- if (sig != TARGET_SIGNAL_0)
+ if (sig != GDB_SIGNAL_0)
{
if (current_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT)
{
OUTMSG (("Can only continue with recieved signal %d.\n", last_sig));
}
- last_sig = TARGET_SIGNAL_0;
+ last_sig = GDB_SIGNAL_0;
/* Get context for the currently selected thread. */
ptid = debug_event_ptid (¤t_event);
{
case EXCEPTION_ACCESS_VIOLATION:
OUTMSG2 (("EXCEPTION_ACCESS_VIOLATION"));
- ourstatus->value.sig = TARGET_SIGNAL_SEGV;
+ ourstatus->value.sig = GDB_SIGNAL_SEGV;
break;
case STATUS_STACK_OVERFLOW:
OUTMSG2 (("STATUS_STACK_OVERFLOW"));
- ourstatus->value.sig = TARGET_SIGNAL_SEGV;
+ ourstatus->value.sig = GDB_SIGNAL_SEGV;
break;
case STATUS_FLOAT_DENORMAL_OPERAND:
OUTMSG2 (("STATUS_FLOAT_DENORMAL_OPERAND"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
OUTMSG2 (("EXCEPTION_ARRAY_BOUNDS_EXCEEDED"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_INEXACT_RESULT:
OUTMSG2 (("STATUS_FLOAT_INEXACT_RESULT"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_INVALID_OPERATION:
OUTMSG2 (("STATUS_FLOAT_INVALID_OPERATION"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_OVERFLOW:
OUTMSG2 (("STATUS_FLOAT_OVERFLOW"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_STACK_CHECK:
OUTMSG2 (("STATUS_FLOAT_STACK_CHECK"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_UNDERFLOW:
OUTMSG2 (("STATUS_FLOAT_UNDERFLOW"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_DIVIDE_BY_ZERO:
OUTMSG2 (("STATUS_FLOAT_DIVIDE_BY_ZERO"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_INTEGER_DIVIDE_BY_ZERO:
OUTMSG2 (("STATUS_INTEGER_DIVIDE_BY_ZERO"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_INTEGER_OVERFLOW:
OUTMSG2 (("STATUS_INTEGER_OVERFLOW"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case EXCEPTION_BREAKPOINT:
OUTMSG2 (("EXCEPTION_BREAKPOINT"));
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
#ifdef _WIN32_WCE
/* Remove the initial breakpoint. */
check_breakpoints ((CORE_ADDR) (long) current_event
break;
case DBG_CONTROL_C:
OUTMSG2 (("DBG_CONTROL_C"));
- ourstatus->value.sig = TARGET_SIGNAL_INT;
+ ourstatus->value.sig = GDB_SIGNAL_INT;
break;
case DBG_CONTROL_BREAK:
OUTMSG2 (("DBG_CONTROL_BREAK"));
- ourstatus->value.sig = TARGET_SIGNAL_INT;
+ ourstatus->value.sig = GDB_SIGNAL_INT;
break;
case EXCEPTION_SINGLE_STEP:
OUTMSG2 (("EXCEPTION_SINGLE_STEP"));
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
OUTMSG2 (("EXCEPTION_ILLEGAL_INSTRUCTION"));
- ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ ourstatus->value.sig = GDB_SIGNAL_ILL;
break;
case EXCEPTION_PRIV_INSTRUCTION:
OUTMSG2 (("EXCEPTION_PRIV_INSTRUCTION"));
- ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ ourstatus->value.sig = GDB_SIGNAL_ILL;
break;
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
OUTMSG2 (("EXCEPTION_NONCONTINUABLE_EXCEPTION"));
- ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ ourstatus->value.sig = GDB_SIGNAL_ILL;
break;
default:
if (current_event.u.Exception.dwFirstChance)
current_event.u.Exception.ExceptionRecord.ExceptionCode,
phex_nz ((uintptr_t) current_event.u.Exception.ExceptionRecord.
ExceptionAddress, sizeof (uintptr_t))));
- ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
+ ourstatus->value.sig = GDB_SIGNAL_UNKNOWN;
break;
}
OUTMSG2 (("\n"));
{
ptid_t ptid;
- last_sig = TARGET_SIGNAL_0;
+ last_sig = GDB_SIGNAL_0;
ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
/* Check if GDB sent us an interrupt request. */
handle_load_dll ();
ourstatus->kind = TARGET_WAITKIND_LOADED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
break;
case UNLOAD_DLL_DEBUG_EVENT:
(unsigned) current_event.dwThreadId));
handle_unload_dll ();
ourstatus->kind = TARGET_WAITKIND_LOADED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
break;
case EXCEPTION_DEBUG_EVENT:
if (inf->nomsg)
inf_continue (inf);
else
- inf_signal (inf, TARGET_SIGNAL_0);
+ inf_signal (inf, GDB_SIGNAL_0);
}
proc_restore_exc_port (task);
inf->pending_execs);
}
else if (kind == TARGET_WAITKIND_STOPPED
- && w->status.value.sig == TARGET_SIGNAL_TRAP)
+ && w->status.value.sig == GDB_SIGNAL_TRAP)
/* Ah hah! A SIGTRAP from the inferior while starting up probably
means we've succesfully completed an exec! */
{
if (exception == EXC_BREAKPOINT)
/* GDB likes to get SIGTRAP for breakpoints. */
{
- inf->wait.status.value.sig = TARGET_SIGNAL_TRAP;
+ inf->wait.status.value.sig = GDB_SIGNAL_TRAP;
mach_port_deallocate (mach_task_self (), reply_port);
}
else
warning (_("Pid %d died with unknown exit status, using SIGKILL."),
inf->pid);
inf->wait.status.kind = TARGET_WAITKIND_SIGNALLED;
- inf->wait.status.value.sig = TARGET_SIGNAL_KILL;
+ inf->wait.status.value.sig = GDB_SIGNAL_KILL;
}
/* Notify server routines. The only real one is dead name notification. */
server should like). */
{
inf->wait.status.kind = TARGET_WAITKIND_STOPPED;
- inf->wait.status.value.sig = TARGET_SIGNAL_0;
+ inf->wait.status.value.sig = GDB_SIGNAL_0;
}
else if (err)
warning (_("Signal delivery failed: %s"), safe_strerror (err));
inf_validate_procinfo (inf);
- if (sig != TARGET_SIGNAL_0 || inf->stopped)
+ if (sig != GDB_SIGNAL_0 || inf->stopped)
{
- if (sig == TARGET_SIGNAL_0 && inf->nomsg)
+ if (sig == GDB_SIGNAL_0 && inf->nomsg)
inf_continue (inf);
else
inf_signal (inf, sig);
}
sig_map[] =
{
- {0, TARGET_SIGNAL_FPE},
- {1, TARGET_SIGNAL_TRAP},
+ {0, GDB_SIGNAL_FPE},
+ {1, GDB_SIGNAL_TRAP},
/* Exception 2 is triggered by the NMI. DJGPP handles it as SIGILL,
but I think SIGBUS is better, since the NMI is usually activated
as a result of a memory parity check failure. */
- {2, TARGET_SIGNAL_BUS},
- {3, TARGET_SIGNAL_TRAP},
- {4, TARGET_SIGNAL_FPE},
- {5, TARGET_SIGNAL_SEGV},
- {6, TARGET_SIGNAL_ILL},
- {7, TARGET_SIGNAL_EMT}, /* no-coprocessor exception */
- {8, TARGET_SIGNAL_SEGV},
- {9, TARGET_SIGNAL_SEGV},
- {10, TARGET_SIGNAL_BUS},
- {11, TARGET_SIGNAL_SEGV},
- {12, TARGET_SIGNAL_SEGV},
- {13, TARGET_SIGNAL_SEGV},
- {14, TARGET_SIGNAL_SEGV},
- {16, TARGET_SIGNAL_FPE},
- {17, TARGET_SIGNAL_BUS},
- {31, TARGET_SIGNAL_ILL},
- {0x1b, TARGET_SIGNAL_INT},
- {0x75, TARGET_SIGNAL_FPE},
- {0x78, TARGET_SIGNAL_ALRM},
- {0x79, TARGET_SIGNAL_INT},
- {0x7a, TARGET_SIGNAL_QUIT},
- {-1, TARGET_SIGNAL_LAST}
+ {2, GDB_SIGNAL_BUS},
+ {3, GDB_SIGNAL_TRAP},
+ {4, GDB_SIGNAL_FPE},
+ {5, GDB_SIGNAL_SEGV},
+ {6, GDB_SIGNAL_ILL},
+ {7, GDB_SIGNAL_EMT}, /* no-coprocessor exception */
+ {8, GDB_SIGNAL_SEGV},
+ {9, GDB_SIGNAL_SEGV},
+ {10, GDB_SIGNAL_BUS},
+ {11, GDB_SIGNAL_SEGV},
+ {12, GDB_SIGNAL_SEGV},
+ {13, GDB_SIGNAL_SEGV},
+ {14, GDB_SIGNAL_SEGV},
+ {16, GDB_SIGNAL_FPE},
+ {17, GDB_SIGNAL_BUS},
+ {31, GDB_SIGNAL_ILL},
+ {0x1b, GDB_SIGNAL_INT},
+ {0x75, GDB_SIGNAL_FPE},
+ {0x78, GDB_SIGNAL_ALRM},
+ {0x79, GDB_SIGNAL_INT},
+ {0x7a, GDB_SIGNAL_QUIT},
+ {-1, GDB_SIGNAL_LAST}
};
static struct {
enum gdb_signal gdb_sig;
int djgpp_excepno;
} excepn_map[] = {
- {TARGET_SIGNAL_0, -1},
- {TARGET_SIGNAL_ILL, 6}, /* Invalid Opcode */
- {TARGET_SIGNAL_EMT, 7}, /* triggers SIGNOFP */
- {TARGET_SIGNAL_SEGV, 13}, /* GPF */
- {TARGET_SIGNAL_BUS, 17}, /* Alignment Check */
+ {GDB_SIGNAL_0, -1},
+ {GDB_SIGNAL_ILL, 6}, /* Invalid Opcode */
+ {GDB_SIGNAL_EMT, 7}, /* triggers SIGNOFP */
+ {GDB_SIGNAL_SEGV, 13}, /* GPF */
+ {GDB_SIGNAL_BUS, 17}, /* Alignment Check */
/* The rest are fake exceptions, see dpmiexcp.c in djlsr*.zip for
details. */
- {TARGET_SIGNAL_TERM, 0x1b}, /* triggers Ctrl-Break type of SIGINT */
- {TARGET_SIGNAL_FPE, 0x75},
- {TARGET_SIGNAL_INT, 0x79},
- {TARGET_SIGNAL_QUIT, 0x7a},
- {TARGET_SIGNAL_ALRM, 0x78}, /* triggers SIGTIMR */
- {TARGET_SIGNAL_PROF, 0x78},
- {TARGET_SIGNAL_LAST, -1}
+ {GDB_SIGNAL_TERM, 0x1b}, /* triggers Ctrl-Break type of SIGINT */
+ {GDB_SIGNAL_FPE, 0x75},
+ {GDB_SIGNAL_INT, 0x79},
+ {GDB_SIGNAL_QUIT, 0x7a},
+ {GDB_SIGNAL_ALRM, 0x78}, /* triggers SIGTIMR */
+ {GDB_SIGNAL_PROF, 0x78},
+ {GDB_SIGNAL_LAST, -1}
};
static void
resume_is_step = step;
- if (siggnal != TARGET_SIGNAL_0 && siggnal != TARGET_SIGNAL_TRAP)
+ if (siggnal != GDB_SIGNAL_0 && siggnal != GDB_SIGNAL_TRAP)
{
for (i = 0, resume_signal = -1;
- excepn_map[i].gdb_sig != TARGET_SIGNAL_LAST; i++)
+ excepn_map[i].gdb_sig != GDB_SIGNAL_LAST; i++)
if (excepn_map[i].gdb_sig == siggnal)
{
resume_signal = excepn_map[i].djgpp_excepno;
}
else
{
- status->value.sig = TARGET_SIGNAL_UNKNOWN;
+ status->value.sig = GDB_SIGNAL_UNKNOWN;
status->kind = TARGET_WAITKIND_STOPPED;
for (i = 0; sig_map[i].go32_sig != -1; i++)
{
{
#if __DJGPP_MINOR__ < 3
if ((status->value.sig = sig_map[i].gdb_sig) !=
- TARGET_SIGNAL_TRAP)
+ GDB_SIGNAL_TRAP)
status->kind = TARGET_WAITKIND_SIGNALLED;
#else
status->value.sig = sig_map[i].gdb_sig;
process it, and then resume the execution as if the event did
not happen. */
if (ourstatus->kind == TARGET_WAITKIND_STOPPED
- && ourstatus->value.sig == TARGET_SIGNAL_TRAP
+ && ourstatus->value.sig == GDB_SIGNAL_TRAP
&& ia64_hpux_at_dld_breakpoint_p (new_ptid))
{
ia64_hpux_handle_dld_breakpoint (new_ptid);
- target_resume (new_ptid, 0, TARGET_SIGNAL_0);
+ target_resume (new_ptid, 0, GDB_SIGNAL_0);
ourstatus->kind = TARGET_WAITKIND_IGNORE;
}
/* Claim it exited with unknown signal. */
ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
- ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
+ ourstatus->value.sig = GDB_SIGNAL_UNKNOWN;
return inferior_ptid;
}
case TTEVT_BPT_SSTEP:
/* Make it look like a breakpoint. */
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
break;
#endif
TRY_CATCH (e, RETURN_MASK_ALL)
{
- proceed (real_pc, TARGET_SIGNAL_0, 0);
+ proceed (real_pc, GDB_SIGNAL_0, 0);
/* Inferior function calls are always synchronous, even if the
target supports asynchronous execution. Do here what
/* Start the target running. Do not use -1 continuation as it would skip
breakpoint right at the entry point. */
- proceed (regcache_read_pc (get_current_regcache ()), TARGET_SIGNAL_0, 0);
+ proceed (regcache_read_pc (get_current_regcache ()), GDB_SIGNAL_0, 0);
/* Since there was no error, there's no need to finish the thread
states here. */
switch_to_thread (thread->ptid);
clear_proceed_status ();
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 0);
return 0;
}
ensure_valid_thread ();
ensure_not_running ();
clear_proceed_status ();
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 0);
}
}
tp->control.step_over_calls = STEP_OVER_ALL;
tp->step_multi = (count > 1);
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 1);
/* For async targets, register a continuation to do any
additional steps. For sync targets, the caller will handle
}
clear_proceed_status ();
- proceed (addr, TARGET_SIGNAL_0, 0);
+ proceed (addr, GDB_SIGNAL_0, 0);
}
\f
assign them to convenience variables. */
oursig = gdb_signal_from_name (signum_exp);
- if (oursig == TARGET_SIGNAL_UNKNOWN)
+ if (oursig == GDB_SIGNAL_UNKNOWN)
{
/* No, try numeric. */
int num = parse_and_eval_long (signum_exp);
if (num == 0)
- oursig = TARGET_SIGNAL_0;
+ oursig = GDB_SIGNAL_0;
else
oursig = gdb_signal_from_command (num);
}
if (from_tty)
{
- if (oursig == TARGET_SIGNAL_0)
+ if (oursig == GDB_SIGNAL_0)
printf_filtered (_("Continuing with no signal.\n"));
else
printf_filtered (_("Continuing with signal %s.\n"),
set_longjmp_breakpoint (tp, get_frame_id (frame));
old_chain = make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 1);
if (target_can_async_p () && is_running (inferior_ptid))
{
insert_step_resume_breakpoint_at_sal (gdbarch,
sr_sal, null_frame_id);
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 0);
}
else
{
/* We're almost there -- we just need to back up by one more
single-step. */
tp->control.step_range_start = tp->control.step_range_end = 1;
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 1);
}
}
cargs->function = function;
add_continuation (tp, finish_command_continuation, cargs,
finish_command_continuation_free_arg);
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 0);
discard_cleanups (old_chain);
if (!target_can_async_p ())
print_stack_frame (get_selected_frame (NULL), 1, LOCATION);
}
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 1);
return;
}
stat = bpstat_num (&bs, &num);
}
}
- else if (tp->suspend.stop_signal != TARGET_SIGNAL_0)
+ else if (tp->suspend.stop_signal != GDB_SIGNAL_0)
{
printf_filtered (_("It stopped with signal %s, %s.\n"),
gdb_signal_to_name (tp->suspend.stop_signal),
/* Used in `attach&' command. ARG is a point to an integer
representing a process id. Proceed threads of this process iff
they stopped due to debugger request, and when they did, they
- reported a clean stop (TARGET_SIGNAL_0). Do not proceed threads
+ reported a clean stop (GDB_SIGNAL_0). Do not proceed threads
that have been explicitly been told to stop. */
static int
&& !is_exited (thread->ptid)
&& !is_executing (thread->ptid)
&& !thread->stop_requested
- && thread->suspend.stop_signal == TARGET_SIGNAL_0)
+ && thread->suspend.stop_signal == GDB_SIGNAL_0)
{
switch_to_thread (thread->ptid);
clear_proceed_status ();
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 0);
}
return 0;
proceed_after_attach (inferior->pid);
else
{
- if (inferior_thread ()->suspend.stop_signal == TARGET_SIGNAL_0)
+ if (inferior_thread ()->suspend.stop_signal == GDB_SIGNAL_0)
{
clear_proceed_status ();
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 0);
}
}
}
/* If in non-stop, leave threads as running as they were. If
they're stopped for some reason other than us telling it to, the
- target reports a signal != TARGET_SIGNAL_0. We don't try to
+ target reports a signal != GDB_SIGNAL_0. We don't try to
resume threads with such a stop signal. */
async_exec = non_stop;
void
update_signals_program_target (void)
{
- target_program_signals ((int) TARGET_SIGNAL_LAST, signal_program);
+ target_program_signals ((int) GDB_SIGNAL_LAST, signal_program);
}
/* Value to pass to target_resume() to cause all threads to resume. */
&& is_running (thread->ptid)
&& !is_executing (thread->ptid)
&& !thread->stop_requested
- && thread->suspend.stop_signal == TARGET_SIGNAL_0)
+ && thread->suspend.stop_signal == GDB_SIGNAL_0)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
switch_to_thread (thread->ptid);
clear_proceed_status ();
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 0);
}
return 0;
displaced_step_restore (displaced, displaced->step_ptid);
/* Did the instruction complete successfully? */
- if (signal == TARGET_SIGNAL_TRAP)
+ if (signal == GDB_SIGNAL_TRAP)
{
/* Fix up the resulting state. */
gdbarch_displaced_step_fixup (displaced->step_gdbarch,
if (gdbarch_displaced_step_hw_singlestep (gdbarch,
displaced->step_closure))
- target_resume (ptid, 1, TARGET_SIGNAL_0);
+ target_resume (ptid, 1, GDB_SIGNAL_0);
else
- target_resume (ptid, 0, TARGET_SIGNAL_0);
+ target_resume (ptid, 0, GDB_SIGNAL_0);
/* Done, we're stepping a thread. */
break;
"displaced: breakpoint is gone: %s, step(%d)\n",
target_pid_to_str (tp->ptid), step);
- target_resume (ptid, step, TARGET_SIGNAL_0);
- tp->suspend.stop_signal = TARGET_SIGNAL_0;
+ target_resume (ptid, step, GDB_SIGNAL_0);
+ tp->suspend.stop_signal = GDB_SIGNAL_0;
/* This request was discarded. See if there's any other
thread waiting for its turn. */
if (use_displaced_stepping (gdbarch)
&& (tp->control.trap_expected
|| (step && gdbarch_software_single_step_p (gdbarch)))
- && sig == TARGET_SIGNAL_0
+ && sig == GDB_SIGNAL_0
&& !current_inferior ()->waiting_for_vfork_done)
{
struct displaced_step_inferior_state *displaced;
once we arrive back at the step-resume breakpoint, actually step
over the breakpoint we originally wanted to step over. */
if (singlestep_breakpoints_inserted_p
- && tp->control.trap_expected && sig != TARGET_SIGNAL_0)
+ && tp->control.trap_expected && sig != GDB_SIGNAL_0)
{
/* If we have nested signals or a pending signal is delivered
immediately after a handler returns, might might already have
/* Avoid confusing the next resume, if the next stop/resume
happens to apply to another thread. */
- tp->suspend.stop_signal = TARGET_SIGNAL_0;
+ tp->suspend.stop_signal = GDB_SIGNAL_0;
/* Advise target which signals may be handled silently. If we have
removed breakpoints because we are stepping over one (which can
&& !use_displaced_stepping (gdbarch))
target_pass_signals (0, NULL);
else
- target_pass_signals ((int) TARGET_SIGNAL_LAST, signal_pass);
+ target_pass_signals ((int) GDB_SIGNAL_LAST, signal_pass);
target_resume (resume_ptid, step, sig);
}
/* Make sure we were stopped at a breakpoint. */
if (wait_status.kind != TARGET_WAITKIND_STOPPED
- || (wait_status.value.sig != TARGET_SIGNAL_TRAP
- && wait_status.value.sig != TARGET_SIGNAL_ILL
- && wait_status.value.sig != TARGET_SIGNAL_SEGV
- && wait_status.value.sig != TARGET_SIGNAL_EMT))
+ || (wait_status.value.sig != GDB_SIGNAL_TRAP
+ && wait_status.value.sig != GDB_SIGNAL_ILL
+ && wait_status.value.sig != GDB_SIGNAL_SEGV
+ && wait_status.value.sig != GDB_SIGNAL_EMT))
{
return 0;
}
if (last_thread)
{
tp->suspend.stop_signal = last_thread->suspend.stop_signal;
- last_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ last_thread->suspend.stop_signal = GDB_SIGNAL_0;
}
}
}
- if (siggnal != TARGET_SIGNAL_DEFAULT)
+ if (siggnal != GDB_SIGNAL_DEFAULT)
tp->suspend.stop_signal = siggnal;
/* If this signal should not be seen by program,
give it zero. Used for debugging signals. */
else if (!signal_program[tp->suspend.stop_signal])
- tp->suspend.stop_signal = TARGET_SIGNAL_0;
+ tp->suspend.stop_signal = GDB_SIGNAL_0;
annotate_starting ();
ecs->ptid = info->ptid;
ecs->event_thread = find_thread_ptid (info->ptid);
ecs->ws.kind = TARGET_WAITKIND_STOPPED;
- ecs->ws.value.sig = TARGET_SIGNAL_0;
+ ecs->ws.value.sig = GDB_SIGNAL_0;
handle_inferior_event (ecs);
if (ecs->ws.kind != TARGET_WAITKIND_STOPPED)
return;
- if (ecs->ws.value.sig != TARGET_SIGNAL_TRAP)
+ if (ecs->ws.value.sig != GDB_SIGNAL_TRAP)
return;
/* In reverse execution, when a breakpoint is hit, the instruction
if (!ecs->random_signal)
{
/* Catchpoint hit. */
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_TRAP;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_TRAP;
return 0;
}
}
/* If no catchpoint triggered for this, then keep going. */
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
keep_going (ecs);
return 1;
}
for architectures like SPARC that place call dummies on the
stack. */
if (ecs->ws.kind == TARGET_WAITKIND_STOPPED
- && (ecs->ws.value.sig == TARGET_SIGNAL_ILL
- || ecs->ws.value.sig == TARGET_SIGNAL_SEGV
- || ecs->ws.value.sig == TARGET_SIGNAL_EMT))
+ && (ecs->ws.value.sig == GDB_SIGNAL_ILL
+ || ecs->ws.value.sig == GDB_SIGNAL_SEGV
+ || ecs->ws.value.sig == GDB_SIGNAL_EMT))
{
struct regcache *regcache = get_thread_regcache (ecs->ptid);
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
"infrun: Treating signal as SIGTRAP\n");
- ecs->ws.value.sig = TARGET_SIGNAL_TRAP;
+ ecs->ws.value.sig = GDB_SIGNAL_TRAP;
}
}
if (!ecs->random_signal)
{
/* A catchpoint triggered. */
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_TRAP;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_TRAP;
goto process_event_stop_test;
}
gdb of events. This allows the user to get control
and place breakpoints in initializer routines for
dynamically loaded objects (among other things). */
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
if (stop_on_solib_events)
{
/* Make sure we print "Stopped due to solib-event" in
if (stop_soon == NO_STOP_QUIETLY
&& !breakpoints_always_inserted_mode ())
insert_breakpoints ();
- resume (0, TARGET_SIGNAL_0);
+ resume (0, GDB_SIGNAL_0);
prepare_to_wait (ecs);
return;
}
case TARGET_WAITKIND_SPURIOUS:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SPURIOUS\n");
- resume (0, TARGET_SIGNAL_0);
+ resume (0, GDB_SIGNAL_0);
prepare_to_wait (ecs);
return;
has been done. Perform cleanup for parent process here. Note
that this operation also cleans up the child process for vfork,
because their pages are shared. */
- displaced_step_fixup (ecs->ptid, TARGET_SIGNAL_TRAP);
+ displaced_step_fixup (ecs->ptid, GDB_SIGNAL_TRAP);
if (ecs->ws.kind == TARGET_WAITKIND_FORKED)
{
int follow_child
= (follow_fork_mode_string == follow_fork_mode_child);
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
should_resume = follow_fork ();
stop_stepping (ecs);
return;
}
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_TRAP;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_TRAP;
goto process_event_stop_test;
case TARGET_WAITKIND_VFORK_DONE:
/* If no catchpoint triggered for this, then keep going. */
if (ecs->random_signal)
{
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
keep_going (ecs);
return;
}
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_TRAP;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_TRAP;
goto process_event_stop_test;
/* Be careful not to try to gather much state about a thread
if (!ptid_equal (ecs->ptid, inferior_ptid))
context_switch (ecs->ptid);
- target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
+ target_resume (RESUME_ALL, 0, GDB_SIGNAL_0);
prepare_to_wait (ecs);
return;
}
SIG0 (generic unsignaled stop). */
if (ecs->event_thread->stop_requested
- && ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP)
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ && ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP)
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
}
stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));
/* We've either finished single-stepping past the single-step
breakpoint, or stopped for some other reason. It would be nice if
we could tell, but we can't reliably. */
- if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP)
+ if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
if (deprecated_context_hook)
deprecated_context_hook (pid_to_thread_id (ecs->ptid));
- resume (1, TARGET_SIGNAL_0);
+ resume (1, GDB_SIGNAL_0);
prepare_to_wait (ecs);
return;
}
/* If we stopped for some other reason than single-stepping, ignore
the fact that we were supposed to switch back. */
- if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP)
+ if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
/* Suppress spurious "Switching to ..." message. */
previous_inferior_ptid = inferior_ptid;
- resume (1, TARGET_SIGNAL_0);
+ resume (1, GDB_SIGNAL_0);
prepare_to_wait (ecs);
return;
}
another thread. If so, then step that thread past the breakpoint,
and continue it. */
- if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP)
+ if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP)
{
int thread_hop_needed = 0;
struct address_space *aspace =
the context we want to use. Just fudge our
state and continue. */
stop_signal = ecs->event_thread->suspend.stop_signal;
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
ecs->ptid = singlestep_ptid;
ecs->event_thread = find_thread_ptid (ecs->ptid);
ecs->event_thread->suspend.stop_signal = stop_signal;
}
/* Single step */
hw_step = maybe_software_singlestep (gdbarch, stop_pc);
- target_resume (ecs->ptid, hw_step, TARGET_SIGNAL_0);
+ target_resume (ecs->ptid, hw_step, GDB_SIGNAL_0);
waiton_ptid = ecs->ptid;
if (target_have_steppable_watchpoint)
infwait_state = infwait_step_watch_state;
skip_inline_frames call would break things. Fortunately
that's an extremely unlikely scenario. */
if (!pc_at_non_inline_function (aspace, stop_pc, &ecs->ws)
- && !(ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
+ && !(ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
&& ecs->event_thread->control.trap_expected
&& pc_at_non_inline_function (aspace,
ecs->event_thread->prev_pc,
skip_inline_frames (ecs->ptid);
}
- if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
+ if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
&& ecs->event_thread->control.trap_expected
&& gdbarch_single_step_through_delay_p (gdbarch)
&& currently_stepping (ecs->event_thread))
3) set ecs->random_signal to 1, and the decision between 1 and 2
will be made according to the signal handling tables. */
- if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
+ if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
|| stop_soon == STOP_QUIETLY || stop_soon == STOP_QUIETLY_NO_SIGSTOP
|| stop_soon == STOP_QUIETLY_REMOTE)
{
- if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
+ if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
&& stop_after_trap)
{
if (debug_infrun)
signal, so this is no exception.
Also consider that the attach is complete when we see a
- TARGET_SIGNAL_0. In non-stop mode, GDB will explicitly tell
+ GDB_SIGNAL_0. In non-stop mode, GDB will explicitly tell
the target to stop all threads of the inferior, in case the
low level attach operation doesn't stop them implicitly. If
they weren't stopped implicitly, then the stub will report a
- TARGET_SIGNAL_0, meaning: stopped for no particular reason
+ GDB_SIGNAL_0, meaning: stopped for no particular reason
other than GDB's request. */
if (stop_soon == STOP_QUIETLY_NO_SIGSTOP
- && (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_STOP
- || ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
- || ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_0))
+ && (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_STOP
+ || ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
+ || ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_0))
{
stop_stepping (ecs);
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
return;
}
set. */
if (debug_infrun
- && ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
+ && ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
&& !bpstat_explains_signal (ecs->event_thread->control.stop_bpstat)
&& stopped_by_watchpoint)
fprintf_unfiltered (gdb_stdlog,
be necessary for call dummies on a non-executable stack on
SPARC. */
- if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP)
+ if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP)
ecs->random_signal
= !(bpstat_explains_signal (ecs->event_thread->control.stop_bpstat)
|| stopped_by_watchpoint
ecs->random_signal = !bpstat_explains_signal
(ecs->event_thread->control.stop_bpstat);
if (!ecs->random_signal)
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_TRAP;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_TRAP;
}
}
/* Clear the signal if it should not be passed. */
if (signal_program[ecs->event_thread->suspend.stop_signal] == 0)
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
if (ecs->event_thread->prev_pc == stop_pc
&& ecs->event_thread->control.trap_expected
}
if (ecs->event_thread->control.step_range_end != 0
- && ecs->event_thread->suspend.stop_signal != TARGET_SIGNAL_0
+ && ecs->event_thread->suspend.stop_signal != GDB_SIGNAL_0
&& (ecs->event_thread->control.step_range_start <= stop_pc
&& stop_pc < ecs->event_thread->control.step_range_end)
&& frame_id_eq (get_stack_frame_id (frame),
breakpoint, and we simply need to step over that breakpoint
to get it going again, do that first. */
if ((ecs->event_thread->control.trap_expected
- && ecs->event_thread->suspend.stop_signal != TARGET_SIGNAL_TRAP)
+ && ecs->event_thread->suspend.stop_signal != GDB_SIGNAL_TRAP)
|| ecs->event_thread->stepping_over_breakpoint)
{
keep_going (ecs);
inferior and not return to debugger. */
if (ecs->event_thread->control.trap_expected
- && ecs->event_thread->suspend.stop_signal != TARGET_SIGNAL_TRAP)
+ && ecs->event_thread->suspend.stop_signal != GDB_SIGNAL_TRAP)
{
/* We took a signal (which we are supposed to pass through to
the inferior, else we'd not get here) and we haven't yet
simulator; the simulator then delivers the hardware
equivalent of a SIGNAL_TRAP to the program being debugged. */
- if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
+ if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
&& !signal_program[ecs->event_thread->suspend.stop_signal])
- ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
discard_cleanups (old_cleanups);
resume (currently_stepping (ecs->event_thread),
annotate_signal ();
- if (siggnal == TARGET_SIGNAL_0 && !ui_out_is_mi_like_p (uiout))
+ if (siggnal == GDB_SIGNAL_0 && !ui_out_is_mi_like_p (uiout))
{
struct thread_info *t = inferior_thread ();
{
if (signo == -1)
{
- for (signo = 0; signo < (int) TARGET_SIGNAL_LAST; signo++)
+ for (signo = 0; signo < (int) GDB_SIGNAL_LAST; signo++)
signal_cache_update (signo);
return;
/* Allocate and zero an array of flags for which signals to handle. */
- nsigs = (int) TARGET_SIGNAL_LAST;
+ nsigs = (int) GDB_SIGNAL_LAST;
sigs = (unsigned char *) alloca (nsigs);
memset (sigs, 0, nsigs);
else
{
oursig = gdb_signal_from_name (*argv);
- if (oursig != TARGET_SIGNAL_UNKNOWN)
+ if (oursig != GDB_SIGNAL_UNKNOWN)
{
sigfirst = siglast = (int) oursig;
}
{
switch ((enum gdb_signal) signum)
{
- case TARGET_SIGNAL_TRAP:
- case TARGET_SIGNAL_INT:
+ case GDB_SIGNAL_TRAP:
+ case GDB_SIGNAL_INT:
if (!allsigs && !sigs[signum])
{
if (query (_("%s is used by the debugger.\n\
}
}
break;
- case TARGET_SIGNAL_0:
- case TARGET_SIGNAL_DEFAULT:
- case TARGET_SIGNAL_UNKNOWN:
+ case GDB_SIGNAL_0:
+ case GDB_SIGNAL_DEFAULT:
+ case GDB_SIGNAL_UNKNOWN:
/* Make sure that "all" doesn't print these. */
break;
default:
if (sigs[signum])
{
signal_cache_update (-1);
- target_pass_signals ((int) TARGET_SIGNAL_LAST, signal_pass);
- target_program_signals ((int) TARGET_SIGNAL_LAST, signal_program);
+ target_pass_signals ((int) GDB_SIGNAL_LAST, signal_pass);
+ target_program_signals ((int) GDB_SIGNAL_LAST, signal_program);
if (from_tty)
{
{
/* First see if this is a symbol name. */
oursig = gdb_signal_from_name (signum_exp);
- if (oursig == TARGET_SIGNAL_UNKNOWN)
+ if (oursig == GDB_SIGNAL_UNKNOWN)
{
/* No, try numeric. */
oursig =
printf_filtered ("\n");
/* These ugly casts brought to you by the native VAX compiler. */
- for (oursig = TARGET_SIGNAL_FIRST;
- (int) oursig < (int) TARGET_SIGNAL_LAST;
+ for (oursig = GDB_SIGNAL_FIRST;
+ (int) oursig < (int) GDB_SIGNAL_LAST;
oursig = (enum gdb_signal) ((int) oursig + 1))
{
QUIT;
- if (oursig != TARGET_SIGNAL_UNKNOWN
- && oursig != TARGET_SIGNAL_DEFAULT && oursig != TARGET_SIGNAL_0)
+ if (oursig != GDB_SIGNAL_UNKNOWN
+ && oursig != GDB_SIGNAL_DEFAULT && oursig != GDB_SIGNAL_0)
sig_print_info (oursig);
}
inf_state->inferior_suspend = inf->suspend;
/* run_inferior_call will not use the signal due to its `proceed' call with
- TARGET_SIGNAL_0 anyway. */
- tp->suspend.stop_signal = TARGET_SIGNAL_0;
+ GDB_SIGNAL_0 anyway. */
+ tp->suspend.stop_signal = GDB_SIGNAL_0;
inf_state->stop_pc = stop_pc;
&setlist,
&showlist);
- numsigs = (int) TARGET_SIGNAL_LAST;
+ numsigs = (int) GDB_SIGNAL_LAST;
signal_stop = (unsigned char *) xmalloc (sizeof (signal_stop[0]) * numsigs);
signal_print = (unsigned char *)
xmalloc (sizeof (signal_print[0]) * numsigs);
/* Signals caused by debugger's own actions
should not be given to the program afterwards. */
- signal_program[TARGET_SIGNAL_TRAP] = 0;
- signal_program[TARGET_SIGNAL_INT] = 0;
+ signal_program[GDB_SIGNAL_TRAP] = 0;
+ signal_program[GDB_SIGNAL_INT] = 0;
/* Signals that are not errors should not normally enter the debugger. */
- signal_stop[TARGET_SIGNAL_ALRM] = 0;
- signal_print[TARGET_SIGNAL_ALRM] = 0;
- signal_stop[TARGET_SIGNAL_VTALRM] = 0;
- signal_print[TARGET_SIGNAL_VTALRM] = 0;
- signal_stop[TARGET_SIGNAL_PROF] = 0;
- signal_print[TARGET_SIGNAL_PROF] = 0;
- signal_stop[TARGET_SIGNAL_CHLD] = 0;
- signal_print[TARGET_SIGNAL_CHLD] = 0;
- signal_stop[TARGET_SIGNAL_IO] = 0;
- signal_print[TARGET_SIGNAL_IO] = 0;
- signal_stop[TARGET_SIGNAL_POLL] = 0;
- signal_print[TARGET_SIGNAL_POLL] = 0;
- signal_stop[TARGET_SIGNAL_URG] = 0;
- signal_print[TARGET_SIGNAL_URG] = 0;
- signal_stop[TARGET_SIGNAL_WINCH] = 0;
- signal_print[TARGET_SIGNAL_WINCH] = 0;
- signal_stop[TARGET_SIGNAL_PRIO] = 0;
- signal_print[TARGET_SIGNAL_PRIO] = 0;
+ signal_stop[GDB_SIGNAL_ALRM] = 0;
+ signal_print[GDB_SIGNAL_ALRM] = 0;
+ signal_stop[GDB_SIGNAL_VTALRM] = 0;
+ signal_print[GDB_SIGNAL_VTALRM] = 0;
+ signal_stop[GDB_SIGNAL_PROF] = 0;
+ signal_print[GDB_SIGNAL_PROF] = 0;
+ signal_stop[GDB_SIGNAL_CHLD] = 0;
+ signal_print[GDB_SIGNAL_CHLD] = 0;
+ signal_stop[GDB_SIGNAL_IO] = 0;
+ signal_print[GDB_SIGNAL_IO] = 0;
+ signal_stop[GDB_SIGNAL_POLL] = 0;
+ signal_print[GDB_SIGNAL_POLL] = 0;
+ signal_stop[GDB_SIGNAL_URG] = 0;
+ signal_print[GDB_SIGNAL_URG] = 0;
+ signal_stop[GDB_SIGNAL_WINCH] = 0;
+ signal_print[GDB_SIGNAL_WINCH] = 0;
+ signal_stop[GDB_SIGNAL_PRIO] = 0;
+ signal_print[GDB_SIGNAL_PRIO] = 0;
/* These signals are used internally by user-level thread
implementations. (See signal(5) on Solaris.) Like the above
signals, a healthy program receives and handles them as part of
its normal operation. */
- signal_stop[TARGET_SIGNAL_LWP] = 0;
- signal_print[TARGET_SIGNAL_LWP] = 0;
- signal_stop[TARGET_SIGNAL_WAITING] = 0;
- signal_print[TARGET_SIGNAL_WAITING] = 0;
- signal_stop[TARGET_SIGNAL_CANCEL] = 0;
- signal_print[TARGET_SIGNAL_CANCEL] = 0;
+ signal_stop[GDB_SIGNAL_LWP] = 0;
+ signal_print[GDB_SIGNAL_LWP] = 0;
+ signal_stop[GDB_SIGNAL_WAITING] = 0;
+ signal_print[GDB_SIGNAL_WAITING] = 0;
+ signal_stop[GDB_SIGNAL_CANCEL] = 0;
+ signal_print[GDB_SIGNAL_CANCEL] = 0;
/* Update cached state. */
signal_cache_update (-1);
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
static int
find_signalled_thread (struct thread_info *info, void *data)
{
- if (info->suspend.stop_signal != TARGET_SIGNAL_0
+ if (info->suspend.stop_signal != GDB_SIGNAL_0
&& ptid_get_pid (info->ptid) == ptid_get_pid (inferior_ptid))
return 1;
if (info)
return info->suspend.stop_signal;
else
- return TARGET_SIGNAL_0;
+ return GDB_SIGNAL_0;
}
/* Generate corefile notes for SPU contexts. */
thread_db_find_new_threads_1 (ptid);
if (ourstatus->kind == TARGET_WAITKIND_STOPPED
- && ourstatus->value.sig == TARGET_SIGNAL_TRAP)
+ && ourstatus->value.sig == GDB_SIGNAL_TRAP)
/* Check for a thread event. */
check_event (ptid);
switch_to_thread (thread->ptid);
clear_proceed_status ();
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT, 0);
}
static int
#endif
status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
+ status->value.sig = GDB_SIGNAL_TRAP;
discard_cleanups (old_chain);
if (ptid_equal (inferior_ptid, null_ptid))
{
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_0;
+ ourstatus->value.sig = GDB_SIGNAL_0;
exit_signo = 0;
return null_ptid;
}
if (status.flags & _DEBUG_FLAG_SSTEP)
{
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
}
/* Was it a breakpoint? */
else if (status.flags & _DEBUG_FLAG_TRACE)
{
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
}
else if (status.flags & _DEBUG_FLAG_ISTOP)
{
case _DEBUG_WHY_REQUESTED:
/* We are assuming a requested stop is due to a SIGINT. */
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_INT;
+ ourstatus->value.sig = GDB_SIGNAL_INT;
exit_signo = 0;
break;
}
else
{
/* How to keep going without returning to wfi: */
- target_resume (ptid, 0, TARGET_SIGNAL_0);
+ target_resume (ptid, 0, GDB_SIGNAL_0);
goto wait_again;
}
}
/* This is an internal event and should be transparent
to wfi, so resume the execution and wait again. See
comment in procfs_init_inferior() for more details. */
- target_resume (ptid, 0, TARGET_SIGNAL_0);
+ target_resume (ptid, 0, GDB_SIGNAL_0);
goto wait_again;
}
#endif
/* Convert signal to host numbering. */
if (signo == 0 ||
- (signo == TARGET_SIGNAL_STOP && pi->ignore_next_sigstop))
+ (signo == GDB_SIGNAL_STOP && pi->ignore_next_sigstop))
native_signo = 0;
else
native_signo = gdb_signal_to_host (signo);
static int
find_signalled_thread (struct thread_info *info, void *data)
{
- if (info->suspend.stop_signal != TARGET_SIGNAL_0
+ if (info->suspend.stop_signal != GDB_SIGNAL_0
&& ptid_get_pid (info->ptid) == ptid_get_pid (inferior_ptid))
return 1;
if (info)
return info->suspend.stop_signal;
else
- return TARGET_SIGNAL_0;
+ return GDB_SIGNAL_0;
}
static char *
}
/* Check if the signal is "Signal 0" or "Trace/breakpoint trap". */
- if (stop_signal != TARGET_SIGNAL_0
- && stop_signal != TARGET_SIGNAL_TRAP)
+ if (stop_signal != GDB_SIGNAL_0
+ && stop_signal != GDB_SIGNAL_TRAP)
{
stop_event_obj =
create_signal_event_object (stop_signal);
"Process record: add end to arch list.\n");
rec = record_end_alloc ();
- rec->u.end.sigval = TARGET_SIGNAL_0;
+ rec->u.end.sigval = GDB_SIGNAL_0;
rec->u.end.insn_num = ++record_insn_count;
record_arch_list_add (rec);
record_list->u.end.sigval = signal;
}
- if (signal == TARGET_SIGNAL_0
+ if (signal == GDB_SIGNAL_0
|| !gdbarch_process_record_signal_p (gdbarch))
ret = gdbarch_process_record (gdbarch,
regcache,
/* Is this a SIGTRAP? */
if (status->kind == TARGET_WAITKIND_STOPPED
- && status->value.sig == TARGET_SIGNAL_TRAP)
+ && status->value.sig == GDB_SIGNAL_TRAP)
{
struct regcache *regcache;
struct address_space *aspace;
int step = 1;
if (!record_message_wrapper_safe (regcache,
- TARGET_SIGNAL_0))
+ GDB_SIGNAL_0))
{
status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_0;
+ status->value.sig = GDB_SIGNAL_0;
break;
}
"issuing one more step in the target beneath\n");
record_beneath_to_resume (record_beneath_to_resume_ops,
ptid, step,
- TARGET_SIGNAL_0);
+ GDB_SIGNAL_0);
continue;
}
}
continue_flag = 0;
}
/* Check target signal */
- if (record_list->u.end.sigval != TARGET_SIGNAL_0)
+ if (record_list->u.end.sigval != GDB_SIGNAL_0)
/* FIXME: better way to check */
continue_flag = 0;
}
replay_out:
if (record_get_sig)
- status->value.sig = TARGET_SIGNAL_INT;
- else if (record_list->u.end.sigval != TARGET_SIGNAL_0)
+ status->value.sig = GDB_SIGNAL_INT;
+ else if (record_list->u.end.sigval != GDB_SIGNAL_0)
/* FIXME: better way to check */
status->value.sig = record_list->u.end.sigval;
else
- status->value.sig = TARGET_SIGNAL_TRAP;
+ status->value.sig = GDB_SIGNAL_TRAP;
discard_cleanups (old_cleanups);
}
fprintf_unfiltered (gdb_stdlog, "m32r_wait()\n");
status->kind = TARGET_WAITKIND_EXITED;
- status->value.sig = TARGET_SIGNAL_0;
+ status->value.sig = GDB_SIGNAL_0;
interrupted = 0;
prev_sigint = signal (SIGINT, gdb_cntrl_c);
if (c == '-') /* error */
{
status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_HUP;
+ status->value.sig = GDB_SIGNAL_HUP;
return inferior_ptid;
}
else if (c == '+') /* stopped */
status->kind = TARGET_WAITKIND_STOPPED;
if (interrupted)
- status->value.sig = TARGET_SIGNAL_INT;
+ status->value.sig = GDB_SIGNAL_INT;
else
- status->value.sig = TARGET_SIGNAL_TRAP;
+ status->value.sig = GDB_SIGNAL_TRAP;
interrupted = 0;
signal (SIGINT, prev_sigint);
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_detach(%d)\n", from_tty);
- m32r_resume (ops, inferior_ptid, 0, TARGET_SIGNAL_0);
+ m32r_resume (ops, inferior_ptid, 0, GDB_SIGNAL_0);
/* Calls m32r_close to do the real work. */
pop_target ();
for these signals is widely agreed upon. */
if (sig <= 0
|| sig > 31)
- return TARGET_SIGNAL_UNKNOWN;
+ return GDB_SIGNAL_UNKNOWN;
/* Don't want to use gdb_signal_from_host because we are converting
from MIPS signal numbers, not host ones. Our internal numbers
if (!mips_need_reply)
{
status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
+ status->value.sig = GDB_SIGNAL_TRAP;
return inferior_ptid;
}
/* Initialize the other instance variables. */
sim_data->program_loaded = 0;
sim_data->gdbsim_desc = sim_desc;
- sim_data->resume_siggnal = TARGET_SIGNAL_0;
+ sim_data->resume_siggnal = GDB_SIGNAL_0;
sim_data->resume_step = 0;
}
else if (sim_desc)
case sim_stopped:
switch (sigrc)
{
- case TARGET_SIGNAL_ABRT:
+ case GDB_SIGNAL_ABRT:
quit ();
break;
- case TARGET_SIGNAL_INT:
- case TARGET_SIGNAL_TRAP:
+ case GDB_SIGNAL_INT:
+ case GDB_SIGNAL_TRAP:
default:
status->kind = TARGET_WAITKIND_STOPPED;
status->value.sig = sigrc;
{
struct remote_state *rs = get_remote_state ();
- if (step && siggnal != TARGET_SIGNAL_0)
+ if (step && siggnal != GDB_SIGNAL_0)
p += xsnprintf (p, endp - p, ";S%02x", siggnal);
else if (step)
p += xsnprintf (p, endp - p, ";s");
- else if (siggnal != TARGET_SIGNAL_0)
+ else if (siggnal != GDB_SIGNAL_0)
p += xsnprintf (p, endp - p, ";C%02x", siggnal);
else
p += xsnprintf (p, endp - p, ";c");
process), with preference for INFERIOR_PTID. This assumes
inferior_ptid belongs to the set of all threads we are about
to resume. */
- if (step || siggnal != TARGET_SIGNAL_0)
+ if (step || siggnal != GDB_SIGNAL_0)
{
/* Step inferior_ptid, with or without signal. */
p = append_resumption (p, endp, inferior_ptid, step, siggnal);
}
/* And continue others without a signal. */
- append_resumption (p, endp, ptid, /*step=*/ 0, TARGET_SIGNAL_0);
+ append_resumption (p, endp, ptid, /*step=*/ 0, GDB_SIGNAL_0);
}
else
{
/* Tell the remote machine to resume. */
-static enum gdb_signal last_sent_signal = TARGET_SIGNAL_0;
+static enum gdb_signal last_sent_signal = GDB_SIGNAL_0;
static int last_sent_step;
if (execution_direction == EXEC_REVERSE)
{
/* We don't pass signals to the target in reverse exec mode. */
- if (info_verbose && siggnal != TARGET_SIGNAL_0)
+ if (info_verbose && siggnal != GDB_SIGNAL_0)
warning (_(" - Can't pass signal %d to target in reverse: ignored."),
siggnal);
strcpy (buf, step ? "bs" : "bc");
}
- else if (siggnal != TARGET_SIGNAL_0)
+ else if (siggnal != GDB_SIGNAL_0)
{
buf[0] = step ? 'S' : 'C';
buf[1] = tohex (((int) siggnal >> 4) & 0xf);
not? Not is more likely, so report a stop. */
warning (_("Remote failure reply: %s"), buf);
status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_0;
+ status->value.sig = GDB_SIGNAL_0;
break;
case 'F': /* File-I/O request. */
remote_fileio_request (buf, rs->ctrlc_pending_p);
break;
case '\0':
- if (last_sent_signal != TARGET_SIGNAL_0)
+ if (last_sent_signal != GDB_SIGNAL_0)
{
/* Zero length reply means that we tried 'S' or 'C' and the
remote system doesn't support it. */
printf_filtered
("Can't send signals to this remote system. %s not sent.\n",
gdb_signal_to_name (last_sent_signal));
- last_sent_signal = TARGET_SIGNAL_0;
+ last_sent_signal = GDB_SIGNAL_0;
target_terminal_inferior ();
strcpy ((char *) buf, last_sent_step ? "s" : "c");
/* Claim it exited with unknown signal. */
ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
- ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
+ ourstatus->value.sig = GDB_SIGNAL_UNKNOWN;
return inferior_ptid;
}
clear_proceed_status ();
inf->control.stop_soon = STOP_QUIETLY;
- tp->suspend.stop_signal = TARGET_SIGNAL_0;
+ tp->suspend.stop_signal = GDB_SIGNAL_0;
do
{
target_resume (pid_to_ptid (-1), 0, tp->suspend.stop_signal);
wait_for_inferior ();
}
- while (tp->suspend.stop_signal != TARGET_SIGNAL_TRAP);
+ while (tp->suspend.stop_signal != GDB_SIGNAL_TRAP);
/* We are now either at the "mapping complete" breakpoint (or somewhere
else, a condition we aren't prepared to deal with anyway), so adjust
tp = inferior_thread ();
clear_proceed_status ();
inf->control.stop_soon = STOP_QUIETLY;
- tp->suspend.stop_signal = TARGET_SIGNAL_0;
+ tp->suspend.stop_signal = GDB_SIGNAL_0;
do
{
target_resume (minus_one_ptid, 0, tp->suspend.stop_signal);
wait_for_inferior ();
}
- while (tp->suspend.stop_signal != TARGET_SIGNAL_TRAP);
+ while (tp->suspend.stop_signal != GDB_SIGNAL_TRAP);
/* solib_add will call reinit_frame_cache.
But we are stopped in the runtime loader and we do not have symbols
inferior_thread ()->control.in_infcall = 1; /* Suppress MI messages. */
- target_resume (inferior_ptid, 1, TARGET_SIGNAL_0);
+ target_resume (inferior_ptid, 1, GDB_SIGNAL_0);
target_wait (minus_one_ptid, &ws, 0);
set_executing (minus_one_ptid, 0);
clear_proceed_status ();
inf->control.stop_soon = STOP_QUIETLY;
- tp->suspend.stop_signal = TARGET_SIGNAL_0;
+ tp->suspend.stop_signal = GDB_SIGNAL_0;
do
{
target_resume (pid_to_ptid (-1), 0, tp->suspend.stop_signal);
wait_for_inferior ();
}
- while (tp->suspend.stop_signal != TARGET_SIGNAL_TRAP);
+ while (tp->suspend.stop_signal != GDB_SIGNAL_TRAP);
inf->control.stop_soon = NO_STOP_QUIETLY;
/* We are now either at the "mapping complete" breakpoint (or somewhere
clear_proceed_status ();
inf->control.stop_soon = STOP_QUIETLY;
- tp->suspend.stop_signal = TARGET_SIGNAL_0;
+ tp->suspend.stop_signal = GDB_SIGNAL_0;
do
{
target_resume (pid_to_ptid (-1), 0, tp->suspend.stop_signal);
wait_for_inferior ();
}
- while (tp->suspend.stop_signal != TARGET_SIGNAL_TRAP);
+ while (tp->suspend.stop_signal != GDB_SIGNAL_TRAP);
inf->control.stop_soon = NO_STOP_QUIETLY;
#endif /* defined(_SCO_DS) */
}
/* Claim it exited with unknown signal. */
ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
- ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
+ ourstatus->value.sig = GDB_SIGNAL_UNKNOWN;
return inferior_ptid;
}
/* Resume execution of the target process PTID. STEP says whether to
single-step or to run free; SIGGNAL is the signal to be given to
- the target, or TARGET_SIGNAL_0 for no signal. The caller may not
- pass TARGET_SIGNAL_DEFAULT. */
+ the target, or GDB_SIGNAL_0 for no signal. The caller may not
+ pass GDB_SIGNAL_DEFAULT. */
extern void target_resume (ptid_t ptid, int step, enum gdb_signal signal);
gdb_start
# This will need to be updated as the exact list of signals changes,
-# but I want to test that TARGET_SIGNAL_0, TARGET_SIGNAL_DEFAULT, and
-# TARGET_SIGNAL_UNKNOWN are skipped.
+# but I want to test that GDB_SIGNAL_0, GDB_SIGNAL_DEFAULT, and
+# GDB_SIGNAL_UNKNOWN are skipped.
proc test_handle_all_print {} {
global timeout
static unsigned long cygwin_get_dr6 (void);
static unsigned long cygwin_get_dr7 (void);
-static enum gdb_signal last_sig = TARGET_SIGNAL_0;
+static enum gdb_signal last_sig = GDB_SIGNAL_0;
/* Set if a signal was received from the debugged process. */
/* Thread information structure used to track information that is
static const struct xlate_exception
xlate[] =
{
- {EXCEPTION_ACCESS_VIOLATION, TARGET_SIGNAL_SEGV},
- {STATUS_STACK_OVERFLOW, TARGET_SIGNAL_SEGV},
- {EXCEPTION_BREAKPOINT, TARGET_SIGNAL_TRAP},
- {DBG_CONTROL_C, TARGET_SIGNAL_INT},
- {EXCEPTION_SINGLE_STEP, TARGET_SIGNAL_TRAP},
- {STATUS_FLOAT_DIVIDE_BY_ZERO, TARGET_SIGNAL_FPE},
+ {EXCEPTION_ACCESS_VIOLATION, GDB_SIGNAL_SEGV},
+ {STATUS_STACK_OVERFLOW, GDB_SIGNAL_SEGV},
+ {EXCEPTION_BREAKPOINT, GDB_SIGNAL_TRAP},
+ {DBG_CONTROL_C, GDB_SIGNAL_INT},
+ {EXCEPTION_SINGLE_STEP, GDB_SIGNAL_TRAP},
+ {STATUS_FLOAT_DIVIDE_BY_ZERO, GDB_SIGNAL_FPE},
{-1, -1}};
/* Set the MAPPINGS static global to OFFSETS.
{
case EXCEPTION_ACCESS_VIOLATION:
DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_ACCESS_VIOLATION");
- ourstatus->value.sig = TARGET_SIGNAL_SEGV;
+ ourstatus->value.sig = GDB_SIGNAL_SEGV;
#ifdef __CYGWIN__
{
/* See if the access violation happened within the cygwin DLL
break;
case STATUS_STACK_OVERFLOW:
DEBUG_EXCEPTION_SIMPLE ("STATUS_STACK_OVERFLOW");
- ourstatus->value.sig = TARGET_SIGNAL_SEGV;
+ ourstatus->value.sig = GDB_SIGNAL_SEGV;
break;
case STATUS_FLOAT_DENORMAL_OPERAND:
DEBUG_EXCEPTION_SIMPLE ("STATUS_FLOAT_DENORMAL_OPERAND");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_ARRAY_BOUNDS_EXCEEDED");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_INEXACT_RESULT:
DEBUG_EXCEPTION_SIMPLE ("STATUS_FLOAT_INEXACT_RESULT");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_INVALID_OPERATION:
DEBUG_EXCEPTION_SIMPLE ("STATUS_FLOAT_INVALID_OPERATION");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_OVERFLOW:
DEBUG_EXCEPTION_SIMPLE ("STATUS_FLOAT_OVERFLOW");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_STACK_CHECK:
DEBUG_EXCEPTION_SIMPLE ("STATUS_FLOAT_STACK_CHECK");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_UNDERFLOW:
DEBUG_EXCEPTION_SIMPLE ("STATUS_FLOAT_UNDERFLOW");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_DIVIDE_BY_ZERO:
DEBUG_EXCEPTION_SIMPLE ("STATUS_FLOAT_DIVIDE_BY_ZERO");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_INTEGER_DIVIDE_BY_ZERO:
DEBUG_EXCEPTION_SIMPLE ("STATUS_INTEGER_DIVIDE_BY_ZERO");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_INTEGER_OVERFLOW:
DEBUG_EXCEPTION_SIMPLE ("STATUS_INTEGER_OVERFLOW");
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case EXCEPTION_BREAKPOINT:
DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_BREAKPOINT");
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
break;
case DBG_CONTROL_C:
DEBUG_EXCEPTION_SIMPLE ("DBG_CONTROL_C");
- ourstatus->value.sig = TARGET_SIGNAL_INT;
+ ourstatus->value.sig = GDB_SIGNAL_INT;
break;
case DBG_CONTROL_BREAK:
DEBUG_EXCEPTION_SIMPLE ("DBG_CONTROL_BREAK");
- ourstatus->value.sig = TARGET_SIGNAL_INT;
+ ourstatus->value.sig = GDB_SIGNAL_INT;
break;
case EXCEPTION_SINGLE_STEP:
DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_SINGLE_STEP");
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_ILLEGAL_INSTRUCTION");
- ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ ourstatus->value.sig = GDB_SIGNAL_ILL;
break;
case EXCEPTION_PRIV_INSTRUCTION:
DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_PRIV_INSTRUCTION");
- ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ ourstatus->value.sig = GDB_SIGNAL_ILL;
break;
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_NONCONTINUABLE_EXCEPTION");
- ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ ourstatus->value.sig = GDB_SIGNAL_ILL;
break;
default:
/* Treat unhandled first chance exceptions specially. */
current_event.u.Exception.ExceptionRecord.ExceptionCode,
host_address_to_string (
current_event.u.Exception.ExceptionRecord.ExceptionAddress));
- ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
+ ourstatus->value.sig = GDB_SIGNAL_UNKNOWN;
break;
}
exception_count++;
if (resume_all)
ptid = inferior_ptid;
- if (sig != TARGET_SIGNAL_0)
+ if (sig != GDB_SIGNAL_0)
{
if (current_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT)
{
last_sig));
}
- last_sig = TARGET_SIGNAL_0;
+ last_sig = GDB_SIGNAL_0;
DEBUG_EXEC (("gdb: windows_resume (pid=%d, tid=%ld, step=%d, sig=%d);\n",
ptid_get_pid (ptid), ptid_get_tid (ptid), step, sig));
static thread_info dummy_thread_info;
int retval = 0;
- last_sig = TARGET_SIGNAL_0;
+ last_sig = GDB_SIGNAL_0;
if (!(debug_event = WaitForDebugEvent (¤t_event, 1000)))
goto out;
struct inferior *inf;
struct thread_info *tp;
- last_sig = TARGET_SIGNAL_0;
+ last_sig = GDB_SIGNAL_0;
event_count = 0;
exception_count = 0;
open_process_used = 0;
stop_after_trap = 1;
wait_for_inferior ();
tp = inferior_thread ();
- if (tp->suspend.stop_signal != TARGET_SIGNAL_TRAP)
+ if (tp->suspend.stop_signal != GDB_SIGNAL_TRAP)
resume (0, tp->suspend.stop_signal);
else
break;
int detached = 1;
ptid_t ptid = {-1};
- windows_resume (ops, ptid, 0, TARGET_SIGNAL_0);
+ windows_resume (ops, ptid, 0, GDB_SIGNAL_0);
if (!DebugActiveProcessStop (current_event.dwProcessId))
{
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
/* Used some places (e.g. stop_signal) to record the concept that
there is no signal. */
-SET (TARGET_SIGNAL_0, 0, "0", "Signal 0")
-#define TARGET_SIGNAL_FIRST TARGET_SIGNAL_0
-SET (TARGET_SIGNAL_HUP, 1, "SIGHUP", "Hangup")
-SET (TARGET_SIGNAL_INT, 2, "SIGINT", "Interrupt")
-SET (TARGET_SIGNAL_QUIT, 3, "SIGQUIT", "Quit")
-SET (TARGET_SIGNAL_ILL, 4, "SIGILL", "Illegal instruction")
-SET (TARGET_SIGNAL_TRAP, 5, "SIGTRAP", "Trace/breakpoint trap")
-SET (TARGET_SIGNAL_ABRT, 6, "SIGABRT", "Aborted")
-SET (TARGET_SIGNAL_EMT, 7, "SIGEMT", "Emulation trap")
-SET (TARGET_SIGNAL_FPE, 8, "SIGFPE", "Arithmetic exception")
-SET (TARGET_SIGNAL_KILL, 9, "SIGKILL", "Killed")
-SET (TARGET_SIGNAL_BUS, 10, "SIGBUS", "Bus error")
-SET (TARGET_SIGNAL_SEGV, 11, "SIGSEGV", "Segmentation fault")
-SET (TARGET_SIGNAL_SYS, 12, "SIGSYS", "Bad system call")
-SET (TARGET_SIGNAL_PIPE, 13, "SIGPIPE", "Broken pipe")
-SET (TARGET_SIGNAL_ALRM, 14, "SIGALRM", "Alarm clock")
-SET (TARGET_SIGNAL_TERM, 15, "SIGTERM", "Terminated")
-SET (TARGET_SIGNAL_URG, 16, "SIGURG", "Urgent I/O condition")
-SET (TARGET_SIGNAL_STOP, 17, "SIGSTOP", "Stopped (signal)")
-SET (TARGET_SIGNAL_TSTP, 18, "SIGTSTP", "Stopped (user)")
-SET (TARGET_SIGNAL_CONT, 19, "SIGCONT", "Continued")
-SET (TARGET_SIGNAL_CHLD, 20, "SIGCHLD", "Child status changed")
-SET (TARGET_SIGNAL_TTIN, 21, "SIGTTIN", "Stopped (tty input)")
-SET (TARGET_SIGNAL_TTOU, 22, "SIGTTOU", "Stopped (tty output)")
-SET (TARGET_SIGNAL_IO, 23, "SIGIO", "I/O possible")
-SET (TARGET_SIGNAL_XCPU, 24, "SIGXCPU", "CPU time limit exceeded")
-SET (TARGET_SIGNAL_XFSZ, 25, "SIGXFSZ", "File size limit exceeded")
-SET (TARGET_SIGNAL_VTALRM, 26, "SIGVTALRM", "Virtual timer expired")
-SET (TARGET_SIGNAL_PROF, 27, "SIGPROF", "Profiling timer expired")
-SET (TARGET_SIGNAL_WINCH, 28, "SIGWINCH", "Window size changed")
-SET (TARGET_SIGNAL_LOST, 29, "SIGLOST", "Resource lost")
-SET (TARGET_SIGNAL_USR1, 30, "SIGUSR1", "User defined signal 1")
-SET (TARGET_SIGNAL_USR2, 31, "SIGUSR2", "User defined signal 2")
-SET (TARGET_SIGNAL_PWR, 32, "SIGPWR", "Power fail/restart")
+SET (GDB_SIGNAL_0, 0, "0", "Signal 0")
+#define GDB_SIGNAL_FIRST GDB_SIGNAL_0
+SET (GDB_SIGNAL_HUP, 1, "SIGHUP", "Hangup")
+SET (GDB_SIGNAL_INT, 2, "SIGINT", "Interrupt")
+SET (GDB_SIGNAL_QUIT, 3, "SIGQUIT", "Quit")
+SET (GDB_SIGNAL_ILL, 4, "SIGILL", "Illegal instruction")
+SET (GDB_SIGNAL_TRAP, 5, "SIGTRAP", "Trace/breakpoint trap")
+SET (GDB_SIGNAL_ABRT, 6, "SIGABRT", "Aborted")
+SET (GDB_SIGNAL_EMT, 7, "SIGEMT", "Emulation trap")
+SET (GDB_SIGNAL_FPE, 8, "SIGFPE", "Arithmetic exception")
+SET (GDB_SIGNAL_KILL, 9, "SIGKILL", "Killed")
+SET (GDB_SIGNAL_BUS, 10, "SIGBUS", "Bus error")
+SET (GDB_SIGNAL_SEGV, 11, "SIGSEGV", "Segmentation fault")
+SET (GDB_SIGNAL_SYS, 12, "SIGSYS", "Bad system call")
+SET (GDB_SIGNAL_PIPE, 13, "SIGPIPE", "Broken pipe")
+SET (GDB_SIGNAL_ALRM, 14, "SIGALRM", "Alarm clock")
+SET (GDB_SIGNAL_TERM, 15, "SIGTERM", "Terminated")
+SET (GDB_SIGNAL_URG, 16, "SIGURG", "Urgent I/O condition")
+SET (GDB_SIGNAL_STOP, 17, "SIGSTOP", "Stopped (signal)")
+SET (GDB_SIGNAL_TSTP, 18, "SIGTSTP", "Stopped (user)")
+SET (GDB_SIGNAL_CONT, 19, "SIGCONT", "Continued")
+SET (GDB_SIGNAL_CHLD, 20, "SIGCHLD", "Child status changed")
+SET (GDB_SIGNAL_TTIN, 21, "SIGTTIN", "Stopped (tty input)")
+SET (GDB_SIGNAL_TTOU, 22, "SIGTTOU", "Stopped (tty output)")
+SET (GDB_SIGNAL_IO, 23, "SIGIO", "I/O possible")
+SET (GDB_SIGNAL_XCPU, 24, "SIGXCPU", "CPU time limit exceeded")
+SET (GDB_SIGNAL_XFSZ, 25, "SIGXFSZ", "File size limit exceeded")
+SET (GDB_SIGNAL_VTALRM, 26, "SIGVTALRM", "Virtual timer expired")
+SET (GDB_SIGNAL_PROF, 27, "SIGPROF", "Profiling timer expired")
+SET (GDB_SIGNAL_WINCH, 28, "SIGWINCH", "Window size changed")
+SET (GDB_SIGNAL_LOST, 29, "SIGLOST", "Resource lost")
+SET (GDB_SIGNAL_USR1, 30, "SIGUSR1", "User defined signal 1")
+SET (GDB_SIGNAL_USR2, 31, "SIGUSR2", "User defined signal 2")
+SET (GDB_SIGNAL_PWR, 32, "SIGPWR", "Power fail/restart")
/* Similar to SIGIO. Perhaps they should have the same number. */
-SET (TARGET_SIGNAL_POLL, 33, "SIGPOLL", "Pollable event occurred")
-SET (TARGET_SIGNAL_WIND, 34, "SIGWIND", "SIGWIND")
-SET (TARGET_SIGNAL_PHONE, 35, "SIGPHONE", "SIGPHONE")
-SET (TARGET_SIGNAL_WAITING, 36, "SIGWAITING", "Process's LWPs are blocked")
-SET (TARGET_SIGNAL_LWP, 37, "SIGLWP", "Signal LWP")
-SET (TARGET_SIGNAL_DANGER, 38, "SIGDANGER", "Swap space dangerously low")
-SET (TARGET_SIGNAL_GRANT, 39, "SIGGRANT", "Monitor mode granted")
-SET (TARGET_SIGNAL_RETRACT, 40, "SIGRETRACT",
+SET (GDB_SIGNAL_POLL, 33, "SIGPOLL", "Pollable event occurred")
+SET (GDB_SIGNAL_WIND, 34, "SIGWIND", "SIGWIND")
+SET (GDB_SIGNAL_PHONE, 35, "SIGPHONE", "SIGPHONE")
+SET (GDB_SIGNAL_WAITING, 36, "SIGWAITING", "Process's LWPs are blocked")
+SET (GDB_SIGNAL_LWP, 37, "SIGLWP", "Signal LWP")
+SET (GDB_SIGNAL_DANGER, 38, "SIGDANGER", "Swap space dangerously low")
+SET (GDB_SIGNAL_GRANT, 39, "SIGGRANT", "Monitor mode granted")
+SET (GDB_SIGNAL_RETRACT, 40, "SIGRETRACT",
"Need to relinquish monitor mode")
-SET (TARGET_SIGNAL_MSG, 41, "SIGMSG", "Monitor mode data available")
-SET (TARGET_SIGNAL_SOUND, 42, "SIGSOUND", "Sound completed")
-SET (TARGET_SIGNAL_SAK, 43, "SIGSAK", "Secure attention")
-SET (TARGET_SIGNAL_PRIO, 44, "SIGPRIO", "SIGPRIO")
-SET (TARGET_SIGNAL_REALTIME_33, 45, "SIG33", "Real-time event 33")
-SET (TARGET_SIGNAL_REALTIME_34, 46, "SIG34", "Real-time event 34")
-SET (TARGET_SIGNAL_REALTIME_35, 47, "SIG35", "Real-time event 35")
-SET (TARGET_SIGNAL_REALTIME_36, 48, "SIG36", "Real-time event 36")
-SET (TARGET_SIGNAL_REALTIME_37, 49, "SIG37", "Real-time event 37")
-SET (TARGET_SIGNAL_REALTIME_38, 50, "SIG38", "Real-time event 38")
-SET (TARGET_SIGNAL_REALTIME_39, 51, "SIG39", "Real-time event 39")
-SET (TARGET_SIGNAL_REALTIME_40, 52, "SIG40", "Real-time event 40")
-SET (TARGET_SIGNAL_REALTIME_41, 53, "SIG41", "Real-time event 41")
-SET (TARGET_SIGNAL_REALTIME_42, 54, "SIG42", "Real-time event 42")
-SET (TARGET_SIGNAL_REALTIME_43, 55, "SIG43", "Real-time event 43")
-SET (TARGET_SIGNAL_REALTIME_44, 56, "SIG44", "Real-time event 44")
-SET (TARGET_SIGNAL_REALTIME_45, 57, "SIG45", "Real-time event 45")
-SET (TARGET_SIGNAL_REALTIME_46, 58, "SIG46", "Real-time event 46")
-SET (TARGET_SIGNAL_REALTIME_47, 59, "SIG47", "Real-time event 47")
-SET (TARGET_SIGNAL_REALTIME_48, 60, "SIG48", "Real-time event 48")
-SET (TARGET_SIGNAL_REALTIME_49, 61, "SIG49", "Real-time event 49")
-SET (TARGET_SIGNAL_REALTIME_50, 62, "SIG50", "Real-time event 50")
-SET (TARGET_SIGNAL_REALTIME_51, 63, "SIG51", "Real-time event 51")
-SET (TARGET_SIGNAL_REALTIME_52, 64, "SIG52", "Real-time event 52")
-SET (TARGET_SIGNAL_REALTIME_53, 65, "SIG53", "Real-time event 53")
-SET (TARGET_SIGNAL_REALTIME_54, 66, "SIG54", "Real-time event 54")
-SET (TARGET_SIGNAL_REALTIME_55, 67, "SIG55", "Real-time event 55")
-SET (TARGET_SIGNAL_REALTIME_56, 68, "SIG56", "Real-time event 56")
-SET (TARGET_SIGNAL_REALTIME_57, 69, "SIG57", "Real-time event 57")
-SET (TARGET_SIGNAL_REALTIME_58, 70, "SIG58", "Real-time event 58")
-SET (TARGET_SIGNAL_REALTIME_59, 71, "SIG59", "Real-time event 59")
-SET (TARGET_SIGNAL_REALTIME_60, 72, "SIG60", "Real-time event 60")
-SET (TARGET_SIGNAL_REALTIME_61, 73, "SIG61", "Real-time event 61")
-SET (TARGET_SIGNAL_REALTIME_62, 74, "SIG62", "Real-time event 62")
-SET (TARGET_SIGNAL_REALTIME_63, 75, "SIG63", "Real-time event 63")
+SET (GDB_SIGNAL_MSG, 41, "SIGMSG", "Monitor mode data available")
+SET (GDB_SIGNAL_SOUND, 42, "SIGSOUND", "Sound completed")
+SET (GDB_SIGNAL_SAK, 43, "SIGSAK", "Secure attention")
+SET (GDB_SIGNAL_PRIO, 44, "SIGPRIO", "SIGPRIO")
+SET (GDB_SIGNAL_REALTIME_33, 45, "SIG33", "Real-time event 33")
+SET (GDB_SIGNAL_REALTIME_34, 46, "SIG34", "Real-time event 34")
+SET (GDB_SIGNAL_REALTIME_35, 47, "SIG35", "Real-time event 35")
+SET (GDB_SIGNAL_REALTIME_36, 48, "SIG36", "Real-time event 36")
+SET (GDB_SIGNAL_REALTIME_37, 49, "SIG37", "Real-time event 37")
+SET (GDB_SIGNAL_REALTIME_38, 50, "SIG38", "Real-time event 38")
+SET (GDB_SIGNAL_REALTIME_39, 51, "SIG39", "Real-time event 39")
+SET (GDB_SIGNAL_REALTIME_40, 52, "SIG40", "Real-time event 40")
+SET (GDB_SIGNAL_REALTIME_41, 53, "SIG41", "Real-time event 41")
+SET (GDB_SIGNAL_REALTIME_42, 54, "SIG42", "Real-time event 42")
+SET (GDB_SIGNAL_REALTIME_43, 55, "SIG43", "Real-time event 43")
+SET (GDB_SIGNAL_REALTIME_44, 56, "SIG44", "Real-time event 44")
+SET (GDB_SIGNAL_REALTIME_45, 57, "SIG45", "Real-time event 45")
+SET (GDB_SIGNAL_REALTIME_46, 58, "SIG46", "Real-time event 46")
+SET (GDB_SIGNAL_REALTIME_47, 59, "SIG47", "Real-time event 47")
+SET (GDB_SIGNAL_REALTIME_48, 60, "SIG48", "Real-time event 48")
+SET (GDB_SIGNAL_REALTIME_49, 61, "SIG49", "Real-time event 49")
+SET (GDB_SIGNAL_REALTIME_50, 62, "SIG50", "Real-time event 50")
+SET (GDB_SIGNAL_REALTIME_51, 63, "SIG51", "Real-time event 51")
+SET (GDB_SIGNAL_REALTIME_52, 64, "SIG52", "Real-time event 52")
+SET (GDB_SIGNAL_REALTIME_53, 65, "SIG53", "Real-time event 53")
+SET (GDB_SIGNAL_REALTIME_54, 66, "SIG54", "Real-time event 54")
+SET (GDB_SIGNAL_REALTIME_55, 67, "SIG55", "Real-time event 55")
+SET (GDB_SIGNAL_REALTIME_56, 68, "SIG56", "Real-time event 56")
+SET (GDB_SIGNAL_REALTIME_57, 69, "SIG57", "Real-time event 57")
+SET (GDB_SIGNAL_REALTIME_58, 70, "SIG58", "Real-time event 58")
+SET (GDB_SIGNAL_REALTIME_59, 71, "SIG59", "Real-time event 59")
+SET (GDB_SIGNAL_REALTIME_60, 72, "SIG60", "Real-time event 60")
+SET (GDB_SIGNAL_REALTIME_61, 73, "SIG61", "Real-time event 61")
+SET (GDB_SIGNAL_REALTIME_62, 74, "SIG62", "Real-time event 62")
+SET (GDB_SIGNAL_REALTIME_63, 75, "SIG63", "Real-time event 63")
/* Used internally by Solaris threads. See signal(5) on Solaris. */
-SET (TARGET_SIGNAL_CANCEL, 76, "SIGCANCEL", "LWP internal signal")
+SET (GDB_SIGNAL_CANCEL, 76, "SIGCANCEL", "LWP internal signal")
/* Yes, this pains me, too. But LynxOS didn't have SIG32, and now
GNU/Linux does, and we can't disturb the numbering, since it's
part of the remote protocol. Note that in some GDB's
- TARGET_SIGNAL_REALTIME_32 is number 76. */
-SET (TARGET_SIGNAL_REALTIME_32, 77, "SIG32", "Real-time event 32")
+ GDB_SIGNAL_REALTIME_32 is number 76. */
+SET (GDB_SIGNAL_REALTIME_32, 77, "SIG32", "Real-time event 32")
/* Yet another pain, IRIX 6 has SIG64. */
-SET (TARGET_SIGNAL_REALTIME_64, 78, "SIG64", "Real-time event 64")
+SET (GDB_SIGNAL_REALTIME_64, 78, "SIG64", "Real-time event 64")
/* Yet another pain, GNU/Linux MIPS might go up to 128. */
-SET (TARGET_SIGNAL_REALTIME_65, 79, "SIG65", "Real-time event 65")
-SET (TARGET_SIGNAL_REALTIME_66, 80, "SIG66", "Real-time event 66")
-SET (TARGET_SIGNAL_REALTIME_67, 81, "SIG67", "Real-time event 67")
-SET (TARGET_SIGNAL_REALTIME_68, 82, "SIG68", "Real-time event 68")
-SET (TARGET_SIGNAL_REALTIME_69, 83, "SIG69", "Real-time event 69")
-SET (TARGET_SIGNAL_REALTIME_70, 84, "SIG70", "Real-time event 70")
-SET (TARGET_SIGNAL_REALTIME_71, 85, "SIG71", "Real-time event 71")
-SET (TARGET_SIGNAL_REALTIME_72, 86, "SIG72", "Real-time event 72")
-SET (TARGET_SIGNAL_REALTIME_73, 87, "SIG73", "Real-time event 73")
-SET (TARGET_SIGNAL_REALTIME_74, 88, "SIG74", "Real-time event 74")
-SET (TARGET_SIGNAL_REALTIME_75, 89, "SIG75", "Real-time event 75")
-SET (TARGET_SIGNAL_REALTIME_76, 90, "SIG76", "Real-time event 76")
-SET (TARGET_SIGNAL_REALTIME_77, 91, "SIG77", "Real-time event 77")
-SET (TARGET_SIGNAL_REALTIME_78, 92, "SIG78", "Real-time event 78")
-SET (TARGET_SIGNAL_REALTIME_79, 93, "SIG79", "Real-time event 79")
-SET (TARGET_SIGNAL_REALTIME_80, 94, "SIG80", "Real-time event 80")
-SET (TARGET_SIGNAL_REALTIME_81, 95, "SIG81", "Real-time event 81")
-SET (TARGET_SIGNAL_REALTIME_82, 96, "SIG82", "Real-time event 82")
-SET (TARGET_SIGNAL_REALTIME_83, 97, "SIG83", "Real-time event 83")
-SET (TARGET_SIGNAL_REALTIME_84, 98, "SIG84", "Real-time event 84")
-SET (TARGET_SIGNAL_REALTIME_85, 99, "SIG85", "Real-time event 85")
-SET (TARGET_SIGNAL_REALTIME_86, 100, "SIG86", "Real-time event 86")
-SET (TARGET_SIGNAL_REALTIME_87, 101, "SIG87", "Real-time event 87")
-SET (TARGET_SIGNAL_REALTIME_88, 102, "SIG88", "Real-time event 88")
-SET (TARGET_SIGNAL_REALTIME_89, 103, "SIG89", "Real-time event 89")
-SET (TARGET_SIGNAL_REALTIME_90, 104, "SIG90", "Real-time event 90")
-SET (TARGET_SIGNAL_REALTIME_91, 105, "SIG91", "Real-time event 91")
-SET (TARGET_SIGNAL_REALTIME_92, 106, "SIG92", "Real-time event 92")
-SET (TARGET_SIGNAL_REALTIME_93, 107, "SIG93", "Real-time event 93")
-SET (TARGET_SIGNAL_REALTIME_94, 108, "SIG94", "Real-time event 94")
-SET (TARGET_SIGNAL_REALTIME_95, 109, "SIG95", "Real-time event 95")
-SET (TARGET_SIGNAL_REALTIME_96, 110, "SIG96", "Real-time event 96")
-SET (TARGET_SIGNAL_REALTIME_97, 111, "SIG97", "Real-time event 97")
-SET (TARGET_SIGNAL_REALTIME_98, 112, "SIG98", "Real-time event 98")
-SET (TARGET_SIGNAL_REALTIME_99, 113, "SIG99", "Real-time event 99")
-SET (TARGET_SIGNAL_REALTIME_100, 114, "SIG100", "Real-time event 100")
-SET (TARGET_SIGNAL_REALTIME_101, 115, "SIG101", "Real-time event 101")
-SET (TARGET_SIGNAL_REALTIME_102, 116, "SIG102", "Real-time event 102")
-SET (TARGET_SIGNAL_REALTIME_103, 117, "SIG103", "Real-time event 103")
-SET (TARGET_SIGNAL_REALTIME_104, 118, "SIG104", "Real-time event 104")
-SET (TARGET_SIGNAL_REALTIME_105, 119, "SIG105", "Real-time event 105")
-SET (TARGET_SIGNAL_REALTIME_106, 120, "SIG106", "Real-time event 106")
-SET (TARGET_SIGNAL_REALTIME_107, 121, "SIG107", "Real-time event 107")
-SET (TARGET_SIGNAL_REALTIME_108, 122, "SIG108", "Real-time event 108")
-SET (TARGET_SIGNAL_REALTIME_109, 123, "SIG109", "Real-time event 109")
-SET (TARGET_SIGNAL_REALTIME_110, 124, "SIG110", "Real-time event 110")
-SET (TARGET_SIGNAL_REALTIME_111, 125, "SIG111", "Real-time event 111")
-SET (TARGET_SIGNAL_REALTIME_112, 126, "SIG112", "Real-time event 112")
-SET (TARGET_SIGNAL_REALTIME_113, 127, "SIG113", "Real-time event 113")
-SET (TARGET_SIGNAL_REALTIME_114, 128, "SIG114", "Real-time event 114")
-SET (TARGET_SIGNAL_REALTIME_115, 129, "SIG115", "Real-time event 115")
-SET (TARGET_SIGNAL_REALTIME_116, 130, "SIG116", "Real-time event 116")
-SET (TARGET_SIGNAL_REALTIME_117, 131, "SIG117", "Real-time event 117")
-SET (TARGET_SIGNAL_REALTIME_118, 132, "SIG118", "Real-time event 118")
-SET (TARGET_SIGNAL_REALTIME_119, 133, "SIG119", "Real-time event 119")
-SET (TARGET_SIGNAL_REALTIME_120, 134, "SIG120", "Real-time event 120")
-SET (TARGET_SIGNAL_REALTIME_121, 135, "SIG121", "Real-time event 121")
-SET (TARGET_SIGNAL_REALTIME_122, 136, "SIG122", "Real-time event 122")
-SET (TARGET_SIGNAL_REALTIME_123, 137, "SIG123", "Real-time event 123")
-SET (TARGET_SIGNAL_REALTIME_124, 138, "SIG124", "Real-time event 124")
-SET (TARGET_SIGNAL_REALTIME_125, 139, "SIG125", "Real-time event 125")
-SET (TARGET_SIGNAL_REALTIME_126, 140, "SIG126", "Real-time event 126")
-SET (TARGET_SIGNAL_REALTIME_127, 141, "SIG127", "Real-time event 127")
+SET (GDB_SIGNAL_REALTIME_65, 79, "SIG65", "Real-time event 65")
+SET (GDB_SIGNAL_REALTIME_66, 80, "SIG66", "Real-time event 66")
+SET (GDB_SIGNAL_REALTIME_67, 81, "SIG67", "Real-time event 67")
+SET (GDB_SIGNAL_REALTIME_68, 82, "SIG68", "Real-time event 68")
+SET (GDB_SIGNAL_REALTIME_69, 83, "SIG69", "Real-time event 69")
+SET (GDB_SIGNAL_REALTIME_70, 84, "SIG70", "Real-time event 70")
+SET (GDB_SIGNAL_REALTIME_71, 85, "SIG71", "Real-time event 71")
+SET (GDB_SIGNAL_REALTIME_72, 86, "SIG72", "Real-time event 72")
+SET (GDB_SIGNAL_REALTIME_73, 87, "SIG73", "Real-time event 73")
+SET (GDB_SIGNAL_REALTIME_74, 88, "SIG74", "Real-time event 74")
+SET (GDB_SIGNAL_REALTIME_75, 89, "SIG75", "Real-time event 75")
+SET (GDB_SIGNAL_REALTIME_76, 90, "SIG76", "Real-time event 76")
+SET (GDB_SIGNAL_REALTIME_77, 91, "SIG77", "Real-time event 77")
+SET (GDB_SIGNAL_REALTIME_78, 92, "SIG78", "Real-time event 78")
+SET (GDB_SIGNAL_REALTIME_79, 93, "SIG79", "Real-time event 79")
+SET (GDB_SIGNAL_REALTIME_80, 94, "SIG80", "Real-time event 80")
+SET (GDB_SIGNAL_REALTIME_81, 95, "SIG81", "Real-time event 81")
+SET (GDB_SIGNAL_REALTIME_82, 96, "SIG82", "Real-time event 82")
+SET (GDB_SIGNAL_REALTIME_83, 97, "SIG83", "Real-time event 83")
+SET (GDB_SIGNAL_REALTIME_84, 98, "SIG84", "Real-time event 84")
+SET (GDB_SIGNAL_REALTIME_85, 99, "SIG85", "Real-time event 85")
+SET (GDB_SIGNAL_REALTIME_86, 100, "SIG86", "Real-time event 86")
+SET (GDB_SIGNAL_REALTIME_87, 101, "SIG87", "Real-time event 87")
+SET (GDB_SIGNAL_REALTIME_88, 102, "SIG88", "Real-time event 88")
+SET (GDB_SIGNAL_REALTIME_89, 103, "SIG89", "Real-time event 89")
+SET (GDB_SIGNAL_REALTIME_90, 104, "SIG90", "Real-time event 90")
+SET (GDB_SIGNAL_REALTIME_91, 105, "SIG91", "Real-time event 91")
+SET (GDB_SIGNAL_REALTIME_92, 106, "SIG92", "Real-time event 92")
+SET (GDB_SIGNAL_REALTIME_93, 107, "SIG93", "Real-time event 93")
+SET (GDB_SIGNAL_REALTIME_94, 108, "SIG94", "Real-time event 94")
+SET (GDB_SIGNAL_REALTIME_95, 109, "SIG95", "Real-time event 95")
+SET (GDB_SIGNAL_REALTIME_96, 110, "SIG96", "Real-time event 96")
+SET (GDB_SIGNAL_REALTIME_97, 111, "SIG97", "Real-time event 97")
+SET (GDB_SIGNAL_REALTIME_98, 112, "SIG98", "Real-time event 98")
+SET (GDB_SIGNAL_REALTIME_99, 113, "SIG99", "Real-time event 99")
+SET (GDB_SIGNAL_REALTIME_100, 114, "SIG100", "Real-time event 100")
+SET (GDB_SIGNAL_REALTIME_101, 115, "SIG101", "Real-time event 101")
+SET (GDB_SIGNAL_REALTIME_102, 116, "SIG102", "Real-time event 102")
+SET (GDB_SIGNAL_REALTIME_103, 117, "SIG103", "Real-time event 103")
+SET (GDB_SIGNAL_REALTIME_104, 118, "SIG104", "Real-time event 104")
+SET (GDB_SIGNAL_REALTIME_105, 119, "SIG105", "Real-time event 105")
+SET (GDB_SIGNAL_REALTIME_106, 120, "SIG106", "Real-time event 106")
+SET (GDB_SIGNAL_REALTIME_107, 121, "SIG107", "Real-time event 107")
+SET (GDB_SIGNAL_REALTIME_108, 122, "SIG108", "Real-time event 108")
+SET (GDB_SIGNAL_REALTIME_109, 123, "SIG109", "Real-time event 109")
+SET (GDB_SIGNAL_REALTIME_110, 124, "SIG110", "Real-time event 110")
+SET (GDB_SIGNAL_REALTIME_111, 125, "SIG111", "Real-time event 111")
+SET (GDB_SIGNAL_REALTIME_112, 126, "SIG112", "Real-time event 112")
+SET (GDB_SIGNAL_REALTIME_113, 127, "SIG113", "Real-time event 113")
+SET (GDB_SIGNAL_REALTIME_114, 128, "SIG114", "Real-time event 114")
+SET (GDB_SIGNAL_REALTIME_115, 129, "SIG115", "Real-time event 115")
+SET (GDB_SIGNAL_REALTIME_116, 130, "SIG116", "Real-time event 116")
+SET (GDB_SIGNAL_REALTIME_117, 131, "SIG117", "Real-time event 117")
+SET (GDB_SIGNAL_REALTIME_118, 132, "SIG118", "Real-time event 118")
+SET (GDB_SIGNAL_REALTIME_119, 133, "SIG119", "Real-time event 119")
+SET (GDB_SIGNAL_REALTIME_120, 134, "SIG120", "Real-time event 120")
+SET (GDB_SIGNAL_REALTIME_121, 135, "SIG121", "Real-time event 121")
+SET (GDB_SIGNAL_REALTIME_122, 136, "SIG122", "Real-time event 122")
+SET (GDB_SIGNAL_REALTIME_123, 137, "SIG123", "Real-time event 123")
+SET (GDB_SIGNAL_REALTIME_124, 138, "SIG124", "Real-time event 124")
+SET (GDB_SIGNAL_REALTIME_125, 139, "SIG125", "Real-time event 125")
+SET (GDB_SIGNAL_REALTIME_126, 140, "SIG126", "Real-time event 126")
+SET (GDB_SIGNAL_REALTIME_127, 141, "SIG127", "Real-time event 127")
-SET (TARGET_SIGNAL_INFO, 142, "SIGINFO", "Information request")
+SET (GDB_SIGNAL_INFO, 142, "SIGINFO", "Information request")
/* Some signal we don't know about. */
-SET (TARGET_SIGNAL_UNKNOWN, 143, NULL, "Unknown signal")
+SET (GDB_SIGNAL_UNKNOWN, 143, NULL, "Unknown signal")
/* Use whatever signal we use when one is not specifically specified
(for passing to proceed and so on). */
-SET (TARGET_SIGNAL_DEFAULT, 144, NULL,
- "Internal error: printing TARGET_SIGNAL_DEFAULT")
+SET (GDB_SIGNAL_DEFAULT, 144, NULL,
+ "Internal error: printing GDB_SIGNAL_DEFAULT")
/* Mach exceptions. In versions of GDB before 5.2, these were just before
- TARGET_SIGNAL_INFO if you were compiling on a Mach host (and missing
+ GDB_SIGNAL_INFO if you were compiling on a Mach host (and missing
otherwise). */
SET (TARGET_EXC_BAD_ACCESS, 145, "EXC_BAD_ACCESS", "Could not access memory")
SET (TARGET_EXC_BAD_INSTRUCTION, 146, "EXC_BAD_INSTRUCTION",
/* If you are adding a new signal, add it just above this comment. */
/* Last and unused enum value, for sizing arrays, etc. */
-SET (TARGET_SIGNAL_LAST, 151, NULL, "TARGET_SIGNAL_MAGIC")
+SET (GDB_SIGNAL_LAST, 151, NULL, "GDB_SIGNAL_MAGIC")
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-05-18 Nick Clifton <nickc@redhat.com>
PR 14072
if (stop_simulator)
{
*reason = sim_stopped;
- *sigrc = TARGET_SIGNAL_INT;
+ *sigrc = GDB_SIGNAL_INT;
}
else if (state->EndCondition == 0)
{
{
*reason = sim_stopped;
if (state->EndCondition == RDIError_BreakpointReached)
- *sigrc = TARGET_SIGNAL_TRAP;
+ *sigrc = GDB_SIGNAL_TRAP;
else if ( state->EndCondition == RDIError_DataAbort
|| state->EndCondition == RDIError_AddressException)
- *sigrc = TARGET_SIGNAL_BUS;
+ *sigrc = GDB_SIGNAL_BUS;
else
*sigrc = 0;
}
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-03-24 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, config.in, configure: Regenerate.
if (step)
{
cpu_exception = sim_stopped;
- cpu_signal = TARGET_SIGNAL_TRAP;
+ cpu_signal = GDB_SIGNAL_TRAP;
}
else
cpu_exception = sim_running;
case OP_break:
/* Stop on this address. */
cpu_exception = sim_stopped;
- cpu_signal = TARGET_SIGNAL_TRAP;
+ cpu_signal = GDB_SIGNAL_TRAP;
pc = ipc;
break;
sim_stop (SIM_DESC sd)
{
cpu_exception = sim_stopped;
- cpu_signal = TARGET_SIGNAL_INT;
+ cpu_signal = GDB_SIGNAL_INT;
return 1;
}
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
switch (sig)
{
case SIM_SIGINT :
- return TARGET_SIGNAL_INT;
+ return GDB_SIGNAL_INT;
case SIM_SIGABRT :
- return TARGET_SIGNAL_ABRT;
+ return GDB_SIGNAL_ABRT;
case SIM_SIGILL :
- return TARGET_SIGNAL_ILL;
+ return GDB_SIGNAL_ILL;
case SIM_SIGTRAP :
- return TARGET_SIGNAL_TRAP;
+ return GDB_SIGNAL_TRAP;
case SIM_SIGBUS :
- return TARGET_SIGNAL_BUS;
+ return GDB_SIGNAL_BUS;
case SIM_SIGSEGV :
- return TARGET_SIGNAL_SEGV;
+ return GDB_SIGNAL_SEGV;
case SIM_SIGXCPU :
- return TARGET_SIGNAL_XCPU;
+ return GDB_SIGNAL_XCPU;
case SIM_SIGFPE:
- return TARGET_SIGNAL_FPE;
+ return GDB_SIGNAL_FPE;
break;
case SIM_SIGNONE:
- return TARGET_SIGNAL_0;
+ return GDB_SIGNAL_0;
break;
}
sim_io_eprintf (sd, "sim_signal_to_host: unknown signal: %d\n", sig);
- return TARGET_SIGNAL_HUP;
+ return GDB_SIGNAL_HUP;
}
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-03-24 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, config.in, configure: Regenerate.
case SIG_CR16_BUS:
*reason = sim_stopped;
- *sigrc = TARGET_SIGNAL_BUS;
+ *sigrc = GDB_SIGNAL_BUS;
break;
//
// case SIG_CR16_IAD:
// *reason = sim_stopped;
-// *sigrc = TARGET_SIGNAL_IAD;
+// *sigrc = GDB_SIGNAL_IAD;
// break;
default: /* some signal */
*reason = sim_stopped;
if (stop_simulator && !State.exception)
- *sigrc = TARGET_SIGNAL_INT;
+ *sigrc = GDB_SIGNAL_INT;
else
*sigrc = State.exception;
break;
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-03-24 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, config.in, configure: Regenerate.
case SIG_D10V_BUS:
*reason = sim_stopped;
- *sigrc = TARGET_SIGNAL_BUS;
+ *sigrc = GDB_SIGNAL_BUS;
break;
default: /* some signal */
*reason = sim_stopped;
if (stop_simulator && !State.exception)
- *sigrc = TARGET_SIGNAL_INT;
+ *sigrc = GDB_SIGNAL_INT;
else
*sigrc = State.exception;
break;
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-03-24 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, config.in, configure: Regenerate.
switch (simstat) {
case CTRL_C:
*reason = sim_stopped;
- *sigrc = TARGET_SIGNAL_INT;
+ *sigrc = GDB_SIGNAL_INT;
break;
case OK:
case TIME_OUT:
case BPT_HIT:
*reason = sim_stopped;
- *sigrc = TARGET_SIGNAL_TRAP;
+ *sigrc = GDB_SIGNAL_TRAP;
break;
case ERROR:
*sigrc = 0;
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-05-18 Nick Clifton <nickc@redhat.com>
PR 14072
switch (m32c)
{
case 4:
- return TARGET_SIGNAL_ILL;
+ return GDB_SIGNAL_ILL;
case 5:
- return TARGET_SIGNAL_TRAP;
+ return GDB_SIGNAL_TRAP;
case 10:
- return TARGET_SIGNAL_BUS;
+ return GDB_SIGNAL_BUS;
case 11:
- return TARGET_SIGNAL_SEGV;
+ return GDB_SIGNAL_SEGV;
case 24:
- return TARGET_SIGNAL_XCPU;
+ return GDB_SIGNAL_XCPU;
case 2:
- return TARGET_SIGNAL_INT;
+ return GDB_SIGNAL_INT;
case 8:
- return TARGET_SIGNAL_FPE;
+ return GDB_SIGNAL_FPE;
case 6:
- return TARGET_SIGNAL_ABRT;
+ return GDB_SIGNAL_ABRT;
}
return 0;
if (M32C_STEPPED (rc) || M32C_HIT_BREAK (rc))
{
reason = sim_stopped;
- siggnal = TARGET_SIGNAL_TRAP;
+ siggnal = GDB_SIGNAL_TRAP;
}
else if (M32C_STOPPED (rc))
{
{
stop = 0;
reason = sim_stopped;
- siggnal = TARGET_SIGNAL_INT;
+ siggnal = GDB_SIGNAL_INT;
break;
}
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-03-14 Michael Haubenwallner <michael.haubenwallner@salomon.at>
* emul_unix.c (st_pad1, st_pad2, st_pad3): Undefine.
psim_halt(system,
psim_nr_cpus(system),
was_continuing,
- TARGET_SIGNAL_INT);
+ GDB_SIGNAL_INT);
}
INLINE_PSIM\
case was_continuing:
*reason = sim_stopped;
if (status.signal == 0)
- *sigrc = TARGET_SIGNAL_TRAP;
+ *sigrc = GDB_SIGNAL_TRAP;
else
*sigrc = status.signal;
break;
case was_trap:
*reason = sim_stopped;
- *sigrc = TARGET_SIGNAL_TRAP;
+ *sigrc = GDB_SIGNAL_TRAP;
break;
case was_exited:
*reason = sim_exited;
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-03-24 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, config.in, configure: Regenerate.
switch (sig)
{
case 4:
- return TARGET_SIGNAL_ILL;
+ return GDB_SIGNAL_ILL;
case 5:
- return TARGET_SIGNAL_TRAP;
+ return GDB_SIGNAL_TRAP;
case 10:
- return TARGET_SIGNAL_BUS;
+ return GDB_SIGNAL_BUS;
case 11:
- return TARGET_SIGNAL_SEGV;
+ return GDB_SIGNAL_SEGV;
case 24:
- return TARGET_SIGNAL_XCPU;
+ return GDB_SIGNAL_XCPU;
break;
case 2:
- return TARGET_SIGNAL_INT;
+ return GDB_SIGNAL_INT;
case 8:
- return TARGET_SIGNAL_FPE;
+ return GDB_SIGNAL_FPE;
break;
case 6:
- return TARGET_SIGNAL_ABRT;
+ return GDB_SIGNAL_ABRT;
}
return 0;
if (RL78_STEPPED (rc) || RL78_HIT_BREAK (rc))
{
reason = sim_stopped;
- siggnal = TARGET_SIGNAL_TRAP;
+ siggnal = GDB_SIGNAL_TRAP;
}
else if (RL78_STOPPED (rc))
{
{
stop = 0;
reason = sim_stopped;
- siggnal = TARGET_SIGNAL_INT;
+ siggnal = GDB_SIGNAL_INT;
break;
}
&& (hw_breakpoints[pc >> 3] & (1 << (pc & 0x7))))
{
reason = sim_stopped;
- siggnal = TARGET_SIGNAL_TRAP;
+ siggnal = GDB_SIGNAL_TRAP;
break;
}
rc = setjmp (decode_jmp_buf);
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
2012-03-24 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, config.in, configure: Regenerate.
if (execution_error_get_last_error () != SIM_ERR_NONE)
{
reason = sim_stopped;
- siggnal = TARGET_SIGNAL_SEGV;
+ siggnal = GDB_SIGNAL_SEGV;
}
if (RX_STEPPED (rc) || RX_HIT_BREAK (rc))
{
reason = sim_stopped;
- siggnal = TARGET_SIGNAL_TRAP;
+ siggnal = GDB_SIGNAL_TRAP;
}
else if (RX_STOPPED (rc))
{
{
stop = 0;
reason = sim_stopped;
- siggnal = TARGET_SIGNAL_INT;
+ siggnal = GDB_SIGNAL_INT;
break;
}
if (execution_error_get_last_error () != SIM_ERR_NONE)
{
reason = sim_stopped;
- siggnal = TARGET_SIGNAL_SEGV;
+ siggnal = GDB_SIGNAL_SEGV;
break;
}