summaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-05-24 16:51:47 +0000
committerPedro Alves <palves@redhat.com>2012-05-24 16:51:47 +0000
commita493e3e2e429e4832b8620bd920ad07d0c2892d7 (patch)
tree4055e5c50cce1e1b622345a311c16a1441951778 /gdb/infrun.c
parent2ea286498fd2ddceaf074bfbc9a2986777ea0396 (diff)
downloadbinutils-gdb-a493e3e2e429e4832b8620bd920ad07d0c2892d7.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/infrun.c')
-rw-r--r--gdb/infrun.c220
1 files changed, 110 insertions, 110 deletions
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);