diff options
author | Pedro Alves <palves@redhat.com> | 2012-05-24 16:51:28 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-05-24 16:51:28 +0000 |
commit | 5e3c3245be667528076da971805e30cfa86252a0 (patch) | |
tree | fc633a17121489e52a97c71c7278907dfa4684b9 /gdb | |
parent | 906c2dc64fa6eeb6723219a58495036be6ba18c6 (diff) | |
download | gdb-5e3c3245be667528076da971805e30cfa86252a0.tar.gz |
gdb/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
gdb/gdbserver/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
include/gdb/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
* gdb/signals.def: Replace TARGET_SIGNAL_ with GDB_SIGNAL_
throughout.
sim/arm/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
sim/avr/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
sim/common/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
sim/cr16/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
sim/d10v/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
sim/erc32/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
sim/m32c/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
sim/ppc/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
sim/rl78/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
sim/rx/
2012-05-24 Pedro Alves <palves@redhat.com>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
Diffstat (limited to 'gdb')
46 files changed, 498 insertions, 486 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 827092c3636..fd2f414ba45 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -2,6 +2,12 @@ PR gdb/7205 + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + +2012-05-24 Pedro Alves <palves@redhat.com> + + PR gdb/7205 + Replace target_signal with gdb_signal throughout. 2012-05-24 Pedro Alves <palves@redhat.com> 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 @@ -2,6 +2,12 @@ PR gdb/7205 + Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. + +2012-05-24 Pedro Alves <palves@redhat.com> + + PR gdb/7205 + Replace target_signal with gdb_signal throughout. 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com> 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)) { |