From: Pedro Alves Date: Thu, 24 May 2012 16:51:47 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a493e3e2e429e4832b8620bd920ad07d0c2892d7;p=binutils-gdb.git gdb/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. gdb/gdbserver/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. include/gdb/ 2012-05-24 Pedro Alves PR gdb/7205 * gdb/signals.def: Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/arm/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/avr/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/common/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/cr16/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/d10v/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/erc32/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/m32c/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/ppc/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/rl78/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/rx/ 2012-05-24 Pedro Alves PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 827092c3636..fd2f414ba45 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-05-24 Pedro Alves PR gdb/7205 diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 4ffe4f6da87..c7d73eb45a2 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -1028,7 +1028,7 @@ aix_thread_wait (struct target_ops *ops, /* 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); diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 1324ce598ce..a867b10d55c 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9442,7 +9442,7 @@ breakpoint_hit_ranged_breakpoint (const struct bp_location *bl, 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, @@ -10891,7 +10891,7 @@ until_break_command (char *arg, int from_tty, int anywhere) 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 @@ -12456,7 +12456,7 @@ bkpt_breakpoint_hit (const struct bp_location *bl, 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, diff --git a/gdb/common/agent.c b/gdb/common/agent.c index 8fdc75ace1e..43f1b65e781 100644 --- a/gdb/common/agent.c +++ b/gdb/common/agent.c @@ -236,11 +236,11 @@ agent_run_command (int pid, const char *cmd, int len) 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); @@ -283,7 +283,7 @@ agent_run_command (int pid, const char *cmd, int len) 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); } diff --git a/gdb/common/signals.c b/gdb/common/signals.c index 46ae5760a88..3ef98402c10 100644 --- a/gdb/common/signals.c +++ b/gdb/common/signals.c @@ -64,17 +64,17 @@ static const struct { 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 @@ -90,18 +90,18 @@ gdb_signal_from_name (const char *name) 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; } /* The following functions are to help certain targets deal @@ -116,191 +116,191 @@ gdb_signal_from_host (int hostsig) 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! */ @@ -331,28 +331,28 @@ gdb_signal_from_host (int hostsig) #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 @@ -372,79 +372,79 @@ do_gdb_signal_to_host (enum gdb_signal oursig, *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 @@ -452,111 +452,111 @@ do_gdb_signal_to_host (enum gdb_signal oursig, #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 @@ -587,7 +587,7 @@ do_gdb_signal_to_host (enum gdb_signal oursig, #endif #if defined (SIGINFO) - case TARGET_SIGNAL_INFO: + case GDB_SIGNAL_INFO: return SIGINFO; #endif @@ -595,25 +595,25 @@ do_gdb_signal_to_host (enum gdb_signal oursig, #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) diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 54b1f26b9a2..26ee23a89ac 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -801,7 +801,7 @@ darwin_resume (ptid_t ptid, int step, enum gdb_signal signal) (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); @@ -933,12 +933,12 @@ darwin_decode_message (mach_msg_header_t *hdr, 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; } @@ -1052,7 +1052,7 @@ darwin_wait (ptid_t ptid, struct target_waitstatus *status) 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); @@ -1263,7 +1263,7 @@ darwin_stop_inferior (struct inferior *inf) { 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; } } diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index 336dac5cac2..b3e4fabbb93 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -142,7 +142,7 @@ fbsd_find_memory_regions (find_memory_region_ftype func, void *obfd) 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; @@ -158,7 +158,7 @@ find_stop_signal (void) 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 diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 43fa38828dd..b47019dcc00 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -431,7 +431,7 @@ startup_inferior (int ntraps) 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; @@ -475,7 +475,7 @@ startup_inferior (int ntraps) 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; @@ -485,7 +485,7 @@ startup_inferior (int ntraps) 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); @@ -514,7 +514,7 @@ startup_inferior (int ntraps) break; /* Just make it go on. */ - target_resume (resume_ptid, 0, TARGET_SIGNAL_0); + target_resume (resume_ptid, 0, GDB_SIGNAL_0); } } diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index ed146ebfd47..22e00e2a827 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-05-24 Pedro Alves PR gdb/7205 diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index e3c6ed67667..e1ea64ab669 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -1062,7 +1062,7 @@ linux_kill (int pid) 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); @@ -1074,7 +1074,7 @@ get_detach_signal (struct thread_info *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 @@ -1117,7 +1117,7 @@ get_detach_signal (struct thread_info *thread) /* 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, @@ -2262,7 +2262,7 @@ linux_stabilize_threads (void) /* 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)); @@ -2558,7 +2558,7 @@ Check if we're already there.\n", 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); } } @@ -2731,7 +2731,7 @@ Check if we're already there.\n", /* 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) diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c index 2c6ed14c934..2c7ab6e3dfa 100644 --- a/gdb/gdbserver/lynx-low.c +++ b/gdb/gdbserver/lynx-low.c @@ -481,7 +481,7 @@ retry: 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); diff --git a/gdb/gdbserver/nto-low.c b/gdb/gdbserver/nto-low.c index 22cd6128024..73618cdd290 100644 --- a/gdb/gdbserver/nto-low.c +++ b/gdb/gdbserver/nto-low.c @@ -532,14 +532,14 @@ nto_wait (ptid_t ptid, { 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) { @@ -595,7 +595,7 @@ nto_wait (ptid_t ptid, 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; } diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 9b8107eca95..30bb3c32e9e 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -71,8 +71,8 @@ int debug_threads; /* 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; @@ -320,7 +320,7 @@ start_inferior (char **argv) 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; @@ -370,8 +370,8 @@ attach_inferior (int pid) 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; @@ -451,7 +451,7 @@ handle_general_set (char *own_buf) { 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; @@ -476,7 +476,7 @@ handle_general_set (char *own_buf) 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; @@ -2158,7 +2158,7 @@ handle_v_kill (char *own_buf) 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); @@ -2381,7 +2381,7 @@ gdb_wants_thread_stopped (struct inferior_list_entry *entry) /* 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; } } @@ -2436,7 +2436,7 @@ handle_status (char *own_buf) 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); } @@ -3308,7 +3308,7 @@ process_serial_event (void) 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 @@ -3352,7 +3352,7 @@ process_serial_event (void) else { last_status.kind = TARGET_WAITKIND_EXITED; - last_status.value.sig = TARGET_SIGNAL_KILL; + last_status.value.sig = GDB_SIGNAL_KILL; } return 0; } diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c index f3a564587ed..d7283a9703f 100644 --- a/gdb/gdbserver/spu-low.c +++ b/gdb/gdbserver/spu-low.c @@ -465,7 +465,7 @@ spu_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int options) 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); } diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index 86e7e357246..4d5fe67181c 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -74,7 +74,7 @@ static int attaching = 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; @@ -308,7 +308,7 @@ child_init_thread_list (void) 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; @@ -835,7 +835,7 @@ win32_resume (struct thread_resume *resume_info, size_t n) step = 0; } - if (sig != TARGET_SIGNAL_0) + if (sig != GDB_SIGNAL_0) { if (current_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT) { @@ -847,7 +847,7 @@ win32_resume (struct thread_resume *resume_info, size_t n) 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); @@ -1232,55 +1232,55 @@ handle_exception (struct target_waitstatus *ourstatus) { 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 @@ -1289,27 +1289,27 @@ handle_exception (struct target_waitstatus *ourstatus) 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) @@ -1321,7 +1321,7 @@ handle_exception (struct target_waitstatus *ourstatus) 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")); @@ -1379,7 +1379,7 @@ get_child_debug_event (struct target_waitstatus *ourstatus) { 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. */ @@ -1529,7 +1529,7 @@ get_child_debug_event (struct target_waitstatus *ourstatus) 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: @@ -1539,7 +1539,7 @@ get_child_debug_event (struct target_waitstatus *ourstatus) (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: diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index d4c54576627..0c45f2026d1 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -1254,7 +1254,7 @@ inf_detach (struct inf *inf) if (inf->nomsg) inf_continue (inf); else - inf_signal (inf, TARGET_SIGNAL_0); + inf_signal (inf, GDB_SIGNAL_0); } proc_restore_exc_port (task); @@ -1574,7 +1574,7 @@ rewait: 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! */ { @@ -1694,7 +1694,7 @@ S_exception_raise_request (mach_port_t port, mach_port_t reply_port, 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 @@ -1750,7 +1750,7 @@ inf_task_died_status (struct inf *inf) 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. */ @@ -1918,7 +1918,7 @@ S_msg_sig_post_untraced_reply (mach_port_t reply, error_t err) 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)); @@ -1986,9 +1986,9 @@ gnu_resume (struct target_ops *ops, 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); diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 1602dad90e0..b8fe2840261 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -313,53 +313,53 @@ static struct } 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 @@ -397,10 +397,10 @@ go32_resume (struct target_ops *ops, 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; @@ -513,7 +513,7 @@ go32_wait (struct target_ops *ops, } 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++) { @@ -521,7 +521,7 @@ go32_wait (struct target_ops *ops, { #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; diff --git a/gdb/ia64-hpux-nat.c b/gdb/ia64-hpux-nat.c index 4b42c2252f0..2cd6f8942ac 100644 --- a/gdb/ia64-hpux-nat.c +++ b/gdb/ia64-hpux-nat.c @@ -154,12 +154,12 @@ ia64_hpux_wait (struct target_ops *ops, ptid_t ptid, 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; } diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index 0924d77ee26..e6729ac5679 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -408,7 +408,7 @@ inf_ptrace_wait (struct target_ops *ops, /* 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; } diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c index a13e7496bfd..f3f9bbdd679 100644 --- a/gdb/inf-ttrace.c +++ b/gdb/inf-ttrace.c @@ -1010,7 +1010,7 @@ inf_ttrace_wait (struct target_ops *ops, 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 diff --git a/gdb/infcall.c b/gdb/infcall.c index 8d7c621d763..a3496d6bf3e 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -399,7 +399,7 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc) 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 diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 2f7ac053a88..5accd285524 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -607,7 +607,7 @@ run_command_1 (char *args, int from_tty, int tbreak_at_main) /* 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. */ @@ -660,7 +660,7 @@ proceed_thread_callback (struct thread_info *thread, void *arg) 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; } @@ -708,7 +708,7 @@ continue_1 (int all_threads) 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); } } @@ -1064,7 +1064,7 @@ step_once (int skip_subroutines, int single_inst, int count, int thread) 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 @@ -1175,7 +1175,7 @@ jump_command (char *arg, int from_tty) } clear_proceed_status (); - proceed (addr, TARGET_SIGNAL_0, 0); + proceed (addr, GDB_SIGNAL_0, 0); } @@ -1232,20 +1232,20 @@ signal_command (char *signum_exp, int from_tty) 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"), @@ -1330,7 +1330,7 @@ until_next_command (int from_tty) 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)) { @@ -1622,14 +1622,14 @@ finish_backward (struct symbol *function) 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); } } @@ -1671,7 +1671,7 @@ finish_forward (struct symbol *function, struct frame_info *frame) 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 ()) @@ -1748,7 +1748,7 @@ finish_command (char *arg, int from_tty) 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; } @@ -1828,7 +1828,7 @@ program_info (char *args, int from_tty) 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), @@ -2314,7 +2314,7 @@ kill_command (char *arg, int from_tty) /* 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 @@ -2327,11 +2327,11 @@ proceed_after_attach_callback (struct thread_info *thread, && !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; @@ -2428,10 +2428,10 @@ attach_command_post_wait (char *args, int from_tty, int async_exec) 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); } } } @@ -2612,7 +2612,7 @@ notice_new_inferior (ptid_t ptid, int leave_running, int from_tty) /* 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; diff --git a/gdb/infrun.c b/gdb/infrun.c index 81aa8baee9e..50ad2178530 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -343,7 +343,7 @@ static unsigned char *signal_pass; 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. */ @@ -622,7 +622,7 @@ proceed_after_vfork_done (struct thread_info *thread, && 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, @@ -631,7 +631,7 @@ proceed_after_vfork_done (struct thread_info *thread, 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; @@ -1453,7 +1453,7 @@ displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal) 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, @@ -1524,9 +1524,9 @@ displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal) 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; @@ -1548,8 +1548,8 @@ displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal) "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. */ @@ -1773,7 +1773,7 @@ a command like `return' or `jump' to continue execution.")); 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; @@ -1829,7 +1829,7 @@ a command like `return' or `jump' to continue execution.")); 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 @@ -1925,7 +1925,7 @@ a command like `return' or `jump' to continue execution.")); /* 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 @@ -1937,7 +1937,7 @@ a command like `return' or `jump' to continue execution.")); && !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); } @@ -2043,10 +2043,10 @@ prepare_to_proceed (int step) /* 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; } @@ -2238,17 +2238,17 @@ proceed (CORE_ADDR addr, enum gdb_signal siggnal, int step) 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 (); @@ -2446,7 +2446,7 @@ infrun_thread_stop_requested_callback (struct thread_info *info, void *arg) 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); @@ -2948,7 +2948,7 @@ adjust_pc_after_break (struct execution_control_state *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 @@ -3112,13 +3112,13 @@ handle_syscall_event (struct execution_control_state *ecs) 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; } @@ -3261,9 +3261,9 @@ handle_inferior_event (struct execution_control_state *ecs) 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); @@ -3273,7 +3273,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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; } } @@ -3358,7 +3358,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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; } @@ -3366,7 +3366,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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 @@ -3389,7 +3389,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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; } @@ -3399,7 +3399,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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; @@ -3481,7 +3481,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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) { @@ -3575,7 +3575,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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 (); @@ -3609,7 +3609,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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: @@ -3667,11 +3667,11 @@ handle_inferior_event (struct execution_control_state *ecs) /* 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 @@ -3733,7 +3733,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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; } @@ -3751,8 +3751,8 @@ handle_inferior_event (struct execution_control_state *ecs) 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)); @@ -3796,7 +3796,7 @@ handle_inferior_event (struct execution_control_state *ecs) /* 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, @@ -3813,7 +3813,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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; } @@ -3826,7 +3826,7 @@ handle_inferior_event (struct execution_control_state *ecs) /* 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, @@ -3848,7 +3848,7 @@ handle_inferior_event (struct execution_control_state *ecs) /* 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; } @@ -3860,7 +3860,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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 = @@ -3927,7 +3927,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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; @@ -4073,7 +4073,7 @@ handle_inferior_event (struct execution_control_state *ecs) } /* 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; @@ -4115,7 +4115,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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, @@ -4123,7 +4123,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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)) @@ -4167,11 +4167,11 @@ handle_inferior_event (struct execution_control_state *ecs) 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) @@ -4205,19 +4205,19 @@ handle_inferior_event (struct execution_control_state *ecs) 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; } @@ -4240,7 +4240,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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, @@ -4267,7 +4267,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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 @@ -4280,7 +4280,7 @@ handle_inferior_event (struct execution_control_state *ecs) 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; } } @@ -4338,7 +4338,7 @@ process_event_stop_test: /* 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 @@ -4368,7 +4368,7 @@ process_event_stop_test: } 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), @@ -4635,7 +4635,7 @@ process_event_stop_test: 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); @@ -5685,7 +5685,7 @@ keep_going (struct execution_control_state *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 @@ -5753,9 +5753,9 @@ keep_going (struct execution_control_state *ecs) 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), @@ -5876,7 +5876,7 @@ print_signal_received_reason (enum gdb_signal siggnal) 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 (); @@ -6209,7 +6209,7 @@ signal_cache_update (int signo) { 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; @@ -6295,7 +6295,7 @@ handle_command (char *args, int from_tty) /* 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); @@ -6386,7 +6386,7 @@ handle_command (char *args, int from_tty) else { oursig = gdb_signal_from_name (*argv); - if (oursig != TARGET_SIGNAL_UNKNOWN) + if (oursig != GDB_SIGNAL_UNKNOWN) { sigfirst = siglast = (int) oursig; } @@ -6404,8 +6404,8 @@ handle_command (char *args, int from_tty) { 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\ @@ -6421,9 +6421,9 @@ Are you sure you want to change it? "), } } 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: @@ -6439,8 +6439,8 @@ Are you sure you want to change it? "), 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) { @@ -6548,7 +6548,7 @@ signals_info (char *signum_exp, int 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 = @@ -6560,14 +6560,14 @@ signals_info (char *signum_exp, int from_tty) 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); } @@ -6739,8 +6739,8 @@ save_infcall_suspend_state (void) 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; @@ -7182,7 +7182,7 @@ leave it stopped or free to run as needed."), &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); @@ -7199,39 +7199,39 @@ leave it stopped or free to run as needed."), /* 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); diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 320a759f761..33b13fad5ba 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1706,7 +1706,7 @@ linux_nat_attach (struct target_ops *ops, char *args, int from_tty) 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), @@ -1719,7 +1719,7 @@ get_pending_status (struct lwp_info *lp, int *status) 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 @@ -1730,7 +1730,7 @@ get_pending_status (struct lwp_info *lp, int *status) 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)) @@ -1756,7 +1756,7 @@ get_pending_status (struct lwp_info *lp, int *status) *status = 0; - if (signo == TARGET_SIGNAL_0) + if (signo == GDB_SIGNAL_0) { if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, @@ -1926,7 +1926,7 @@ resume_lwp (struct lwp_info *lp, int step) 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)); @@ -1985,7 +1985,7 @@ linux_nat_resume (struct target_ops *ops, "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)); @@ -2031,7 +2031,7 @@ linux_nat_resume (struct target_ops *ops, /* 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; } @@ -2041,7 +2041,7 @@ linux_nat_resume (struct target_ops *ops, { /* 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, @@ -2079,7 +2079,7 @@ linux_nat_resume (struct target_ops *ops, "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); @@ -2242,7 +2242,7 @@ linux_handle_syscall_trap (struct lwp_info *lp, int stopping) 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; } @@ -2361,7 +2361,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status, 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; @@ -2431,7 +2431,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status, 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; } } @@ -2442,7 +2442,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status, 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; } @@ -3420,7 +3420,7 @@ linux_nat_filter_event (int lwpid, int status, int *new_pending_p) 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", @@ -3453,7 +3453,7 @@ linux_nat_filter_event (int lwpid, int status, int *new_pending_p) 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", @@ -3629,7 +3629,7 @@ retry: 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", @@ -3887,7 +3887,7 @@ retry: 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; @@ -3899,7 +3899,7 @@ retry: /* 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 @@ -3988,7 +3988,7 @@ retry: /* 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 @@ -4038,7 +4038,7 @@ resume_stopped_resumed_lwps (struct lwp_info *lp, void *data) 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; @@ -4777,7 +4777,7 @@ cleanup_target_stop (void *arg) 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) * @@ -5082,7 +5082,7 @@ linux_nat_async (void (*callback) (enum inferior_event_type event_type, 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 diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index 861dc22c08d..b6f2efbd45a 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -585,7 +585,7 @@ linux_find_memory_regions (struct gdbarch *gdbarch, 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; @@ -601,7 +601,7 @@ find_stop_signal (void) if (info) return info->suspend.stop_signal; else - return TARGET_SIGNAL_0; + return GDB_SIGNAL_0; } /* Generate corefile notes for SPU contexts. */ diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index 38fd512a20a..bc8282955d2 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -1448,7 +1448,7 @@ thread_db_wait (struct target_ops *ops, 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); diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index d1754f83263..d3957312780 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -210,7 +210,7 @@ proceed_thread (struct thread_info *thread, int pid) 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 diff --git a/gdb/monitor.c b/gdb/monitor.c index e5a2a7c6ec9..b9f345e4538 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -1162,7 +1162,7 @@ monitor_wait (struct target_ops *ops, #endif status->kind = TARGET_WAITKIND_STOPPED; - status->value.sig = TARGET_SIGNAL_TRAP; + status->value.sig = GDB_SIGNAL_TRAP; discard_cleanups (old_chain); diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index 2332fd15403..b58f3188b2a 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -732,7 +732,7 @@ procfs_wait (struct target_ops *ops, 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; } @@ -752,13 +752,13 @@ procfs_wait (struct target_ops *ops, 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) { @@ -809,7 +809,7 @@ procfs_wait (struct target_ops *ops, 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; } diff --git a/gdb/procfs.c b/gdb/procfs.c index 7c5bfd31ec5..774df2e0113 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -3786,7 +3786,7 @@ wait_again: 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; } } @@ -3812,7 +3812,7 @@ 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 @@ -4211,7 +4211,7 @@ procfs_resume (struct target_ops *ops, /* 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); @@ -5485,7 +5485,7 @@ procfs_corefile_thread_callback (procinfo *pi, procinfo *thread, void *data) 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; @@ -5501,7 +5501,7 @@ find_stop_signal (void) if (info) return info->suspend.stop_signal; else - return TARGET_SIGNAL_0; + return GDB_SIGNAL_0; } static char * diff --git a/gdb/python/py-stopevent.c b/gdb/python/py-stopevent.c index 7660dd24126..7e0094848dd 100644 --- a/gdb/python/py-stopevent.c +++ b/gdb/python/py-stopevent.c @@ -84,8 +84,8 @@ emit_stop_event (struct bpstats *bs, enum gdb_signal stop_signal) } /* 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); diff --git a/gdb/record.c b/gdb/record.c index 60ea12029a1..bb0fe5224f6 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -531,7 +531,7 @@ record_arch_list_add_end (void) "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); @@ -621,7 +621,7 @@ record_message (struct regcache *regcache, enum gdb_signal signal) 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, @@ -1223,7 +1223,7 @@ record_wait_1 (struct target_ops *ops, /* 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; @@ -1265,10 +1265,10 @@ record_wait_1 (struct target_ops *ops, 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; } @@ -1290,7 +1290,7 @@ record_wait_1 (struct target_ops *ops, "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; } } @@ -1429,7 +1429,7 @@ record_wait_1 (struct target_ops *ops, 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; } @@ -1453,12 +1453,12 @@ record_wait_1 (struct target_ops *ops, 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); } diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index f1592d72d07..47f4405785e 100644 --- a/gdb/remote-m32r-sdi.c +++ b/gdb/remote-m32r-sdi.c @@ -711,7 +711,7 @@ m32r_wait (struct target_ops *ops, 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); @@ -730,7 +730,7 @@ m32r_wait (struct target_ops *ops, 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 */ @@ -746,9 +746,9 @@ m32r_wait (struct target_ops *ops, 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); @@ -882,7 +882,7 @@ m32r_detach (struct target_ops *ops, char *args, int from_tty) 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 (); diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index b637bc096a7..babbf19407d 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -1778,7 +1778,7 @@ mips_signal_from_protocol (int sig) 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 @@ -1837,7 +1837,7 @@ mips_wait (struct target_ops *ops, if (!mips_need_reply) { status->kind = TARGET_WAITKIND_STOPPED; - status->value.sig = TARGET_SIGNAL_TRAP; + status->value.sig = GDB_SIGNAL_TRAP; return inferior_ptid; } diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 2c228321dcb..0e7d84e04b6 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -217,7 +217,7 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed) /* 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) @@ -1028,11 +1028,11 @@ gdbsim_wait (struct target_ops *ops, 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; diff --git a/gdb/remote.c b/gdb/remote.c index 8aa531234ff..565de19398d 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -4616,11 +4616,11 @@ append_resumption (char *p, char *endp, { 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"); @@ -4690,14 +4690,14 @@ remote_vcont_resume (ptid_t ptid, int step, enum gdb_signal siggnal) 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 { @@ -4723,7 +4723,7 @@ remote_vcont_resume (ptid_t ptid, int step, enum gdb_signal siggnal) /* 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; @@ -4754,7 +4754,7 @@ remote_resume (struct target_ops *ops, 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); @@ -4767,7 +4767,7 @@ remote_resume (struct target_ops *ops, 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); @@ -5703,7 +5703,7 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options) 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); @@ -5729,7 +5729,7 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options) 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. */ @@ -5737,7 +5737,7 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options) 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"); diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index b2b3e7efbbc..0a2000abc7e 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -551,7 +551,7 @@ rs6000_wait (struct target_ops *ops, /* 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; } diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c index 4c0a2e4792f..1cec2820215 100644 --- a/gdb/solib-irix.c +++ b/gdb/solib-irix.c @@ -419,14 +419,14 @@ irix_solib_create_inferior_hook (int from_tty) 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 diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c index 809114cc300..e2bb38d6185 100644 --- a/gdb/solib-osf.c +++ b/gdb/solib-osf.c @@ -342,13 +342,13 @@ osf_solib_create_inferior_hook (int from_tty) 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 diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c index 150ff0feaec..b5454e70990 100644 --- a/gdb/solib-spu.c +++ b/gdb/solib-spu.c @@ -88,7 +88,7 @@ spu_skip_standalone_loader (void) 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); diff --git a/gdb/solib-sunos.c b/gdb/solib-sunos.c index 172a4928201..b17ef8a8ddd 100644 --- a/gdb/solib-sunos.c +++ b/gdb/solib-sunos.c @@ -670,13 +670,13 @@ sunos_solib_create_inferior_hook (int from_tty) 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 diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 69d3cb518e1..a639f4dabcb 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -2249,13 +2249,13 @@ svr4_solib_create_inferior_hook (int from_tty) 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) */ } diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c index 235458ed7f3..2dfec8c1288 100644 --- a/gdb/spu-linux-nat.c +++ b/gdb/spu-linux-nat.c @@ -462,7 +462,7 @@ spu_child_wait (struct target_ops *ops, /* 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; } diff --git a/gdb/target.h b/gdb/target.h index 631c93b0cf2..f80fba0cdaf 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -922,8 +922,8 @@ extern void target_disconnect (char *, int); /* 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); diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp index 334b80e8f16..b7162d288ed 100644 --- a/gdb/testsuite/gdb.base/signals.exp +++ b/gdb/testsuite/gdb.base/signals.exp @@ -44,8 +44,8 @@ gdb_exit 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 diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 088cd8a8eac..f16588adfda 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -176,7 +176,7 @@ static CORE_ADDR cygwin_get_dr (int i); 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 @@ -259,12 +259,12 @@ struct xlate_exception 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. @@ -1127,7 +1127,7 @@ handle_exception (struct target_waitstatus *ourstatus) { 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 @@ -1153,75 +1153,75 @@ handle_exception (struct target_waitstatus *ourstatus) 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. */ @@ -1231,7 +1231,7 @@ handle_exception (struct target_waitstatus *ourstatus) 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++; @@ -1324,7 +1324,7 @@ windows_resume (struct target_ops *ops, if (resume_all) ptid = inferior_ptid; - if (sig != TARGET_SIGNAL_0) + if (sig != GDB_SIGNAL_0) { if (current_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT) { @@ -1358,7 +1358,7 @@ windows_resume (struct target_ops *ops, 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)); @@ -1440,7 +1440,7 @@ get_windows_debug_event (struct target_ops *ops, 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; @@ -1700,7 +1700,7 @@ do_initial_windows_stuff (struct target_ops *ops, DWORD pid, int attaching) 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; @@ -1739,7 +1739,7 @@ do_initial_windows_stuff (struct target_ops *ops, DWORD pid, int attaching) 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; @@ -1860,7 +1860,7 @@ windows_detach (struct target_ops *ops, char *args, int from_tty) 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)) { diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog index 742db1ba471..3afa67d26e2 100644 --- a/include/gdb/ChangeLog +++ b/include/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-05-24 Pedro Alves PR gdb/7205 diff --git a/include/gdb/signals.def b/include/gdb/signals.def index c01895ae5d8..ef4c8d4eedb 100644 --- a/include/gdb/signals.def +++ b/include/gdb/signals.def @@ -18,173 +18,173 @@ /* 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", @@ -197,4 +197,4 @@ SET (TARGET_EXC_BREAKPOINT, 150, "EXC_BREAKPOINT", "Breakpoint") /* 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") diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 68cd1a4463f..150bb88ab6e 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-05-18 Nick Clifton PR 14072 diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index 1c55f7514f1..f86799b8783 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -905,7 +905,7 @@ sim_stop_reason (sd, reason, sigrc) if (stop_simulator) { *reason = sim_stopped; - *sigrc = TARGET_SIGNAL_INT; + *sigrc = GDB_SIGNAL_INT; } else if (state->EndCondition == 0) { @@ -916,10 +916,10 @@ sim_stop_reason (sd, reason, sigrc) { *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; } diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index 3cd0a98b073..7b38a16782b 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-03-24 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/avr/interp.c b/sim/avr/interp.c index 8b61af830ad..941aea73a46 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -870,7 +870,7 @@ sim_resume (SIM_DESC sd, int step, int signal) if (step) { cpu_exception = sim_stopped; - cpu_signal = TARGET_SIGNAL_TRAP; + cpu_signal = GDB_SIGNAL_TRAP; } else cpu_exception = sim_running; @@ -1000,7 +1000,7 @@ sim_resume (SIM_DESC sd, int step, int signal) case OP_break: /* Stop on this address. */ cpu_exception = sim_stopped; - cpu_signal = TARGET_SIGNAL_TRAP; + cpu_signal = GDB_SIGNAL_TRAP; pc = ipc; break; @@ -1763,7 +1763,7 @@ int sim_stop (SIM_DESC sd) { cpu_exception = sim_stopped; - cpu_signal = TARGET_SIGNAL_INT; + cpu_signal = GDB_SIGNAL_INT; return 1; } diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 588ff680c5c..da63533024b 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-05-24 Pedro Alves PR gdb/7205 diff --git a/sim/common/sim-signal.c b/sim/common/sim-signal.c index 9e478cbdf9f..a34180db9c5 100644 --- a/sim/common/sim-signal.c +++ b/sim/common/sim-signal.c @@ -100,35 +100,35 @@ sim_signal_to_target (SIM_DESC sd, SIM_SIGNAL sig) 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; } diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 1640e6b6801..c7f11898793 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-03-24 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c index cdbbb2a3769..86c4c0d3ce2 100644 --- a/sim/cr16/interp.c +++ b/sim/cr16/interp.c @@ -1417,18 +1417,18 @@ sim_stop_reason (sd, reason, sigrc) 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; diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index f71a16c7d38..58b34116cb2 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-03-24 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c index cd18eadc550..92f161bd95c 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -1278,13 +1278,13 @@ sim_stop_reason (sd, reason, sigrc) 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; diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index f8c1b80d64d..71181e1aee3 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-03-24 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c index d94201a3ffd..d869cd587cd 100644 --- a/sim/erc32/interf.c +++ b/sim/erc32/interf.c @@ -388,13 +388,13 @@ sim_stop_reason(sd, reason, sigrc) 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; diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog index 899657b3b25..63d6b4acf11 100644 --- a/sim/m32c/ChangeLog +++ b/sim/m32c/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-05-18 Nick Clifton PR 14072 diff --git a/sim/m32c/gdb-if.c b/sim/m32c/gdb-if.c index 863fcf405fc..bf84903a72c 100644 --- a/sim/m32c/gdb-if.c +++ b/sim/m32c/gdb-if.c @@ -530,28 +530,28 @@ m32c_signal_to_target (int m32c) 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; @@ -566,7 +566,7 @@ handle_step (int rc) if (M32C_STEPPED (rc) || M32C_HIT_BREAK (rc)) { reason = sim_stopped; - siggnal = TARGET_SIGNAL_TRAP; + siggnal = GDB_SIGNAL_TRAP; } else if (M32C_STOPPED (rc)) { @@ -613,7 +613,7 @@ sim_resume (SIM_DESC sd, int step, int sig_to_deliver) { stop = 0; reason = sim_stopped; - siggnal = TARGET_SIGNAL_INT; + siggnal = GDB_SIGNAL_INT; break; } diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 042a5586e04..b7ba20deec9 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-03-14 Michael Haubenwallner * emul_unix.c (st_pad1, st_pad2, st_pad3): Undefine. diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c index 3e7638690a1..7378b9b2a02 100644 --- a/sim/ppc/psim.c +++ b/sim/ppc/psim.c @@ -592,7 +592,7 @@ cntrl_c_simulation(void *data) psim_halt(system, psim_nr_cpus(system), was_continuing, - TARGET_SIGNAL_INT); + GDB_SIGNAL_INT); } INLINE_PSIM\ diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index e80db88b0d9..66d7f036d7f 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -198,13 +198,13 @@ sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc) 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; diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog index af2898d2169..893bfb32419 100644 --- a/sim/rl78/ChangeLog +++ b/sim/rl78/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-03-24 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/rl78/gdb-if.c b/sim/rl78/gdb-if.c index e7c127797d9..e2a5ea0985e 100644 --- a/sim/rl78/gdb-if.c +++ b/sim/rl78/gdb-if.c @@ -371,30 +371,30 @@ rl78_signal_to_target (int sig) 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; @@ -410,7 +410,7 @@ handle_step (int rc) if (RL78_STEPPED (rc) || RL78_HIT_BREAK (rc)) { reason = sim_stopped; - siggnal = TARGET_SIGNAL_TRAP; + siggnal = GDB_SIGNAL_TRAP; } else if (RL78_STOPPED (rc)) { @@ -452,7 +452,7 @@ sim_resume (SIM_DESC sd, int step, int sig_to_deliver) { stop = 0; reason = sim_stopped; - siggnal = TARGET_SIGNAL_INT; + siggnal = GDB_SIGNAL_INT; break; } @@ -460,7 +460,7 @@ sim_resume (SIM_DESC sd, int step, int sig_to_deliver) && (hw_breakpoints[pc >> 3] & (1 << (pc & 0x7)))) { reason = sim_stopped; - siggnal = TARGET_SIGNAL_TRAP; + siggnal = GDB_SIGNAL_TRAP; break; } rc = setjmp (decode_jmp_buf); diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 7170cb1d563..52c291fb5a9 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Pedro Alves + + PR gdb/7205 + + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + 2012-03-24 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c index 9a7e030d0dd..a9903e502cd 100644 --- a/sim/rx/gdb-if.c +++ b/sim/rx/gdb-if.c @@ -710,12 +710,12 @@ handle_step (int rc) 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)) { @@ -766,7 +766,7 @@ sim_resume (SIM_DESC sd, int step, int sig_to_deliver) { stop = 0; reason = sim_stopped; - siggnal = TARGET_SIGNAL_INT; + siggnal = GDB_SIGNAL_INT; break; } @@ -777,7 +777,7 @@ sim_resume (SIM_DESC sd, int step, int sig_to_deliver) if (execution_error_get_last_error () != SIM_ERR_NONE) { reason = sim_stopped; - siggnal = TARGET_SIGNAL_SEGV; + siggnal = GDB_SIGNAL_SEGV; break; }