2004-08-25 Andrew Cagney <cagney@gnu.org>

* infrun.c: Re-indent.  Move expression operators to the beginning
	of the line.  Remove long disabled #if 0 code.
This commit is contained in:
Andrew Cagney 2004-08-25 14:47:07 +00:00
parent f855931bbd
commit 8fb3e588da
2 changed files with 194 additions and 230 deletions

View file

@ -1,3 +1,8 @@
2004-08-25 Andrew Cagney <cagney@gnu.org>
* infrun.c: Re-indent. Move expression operators to the beginning
of the line. Remove long disabled #if 0 code.
2004-08-24 Andrew Cagney <cagney@gnu.org> 2004-08-24 Andrew Cagney <cagney@gnu.org>
* doublest.h (floatformat_ieee_quad): Rename * doublest.h (floatformat_ieee_quad): Rename

View file

@ -580,9 +580,9 @@ resume (int step, enum target_signal sig)
resume_ptid = RESUME_ALL; /* Default */ resume_ptid = RESUME_ALL; /* Default */
if ((step || singlestep_breakpoints_inserted_p) && if ((step || singlestep_breakpoints_inserted_p)
(stepping_past_singlestep_breakpoint && (stepping_past_singlestep_breakpoint
|| (!breakpoints_inserted && breakpoint_here_p (read_pc ())))) || (!breakpoints_inserted && breakpoint_here_p (read_pc ()))))
{ {
/* Stepping past a breakpoint without inserting breakpoints. /* Stepping past a breakpoint without inserting breakpoints.
Make sure only the current thread gets to step, so that Make sure only the current thread gets to step, so that
@ -592,9 +592,9 @@ resume (int step, enum target_signal sig)
resume_ptid = inferior_ptid; resume_ptid = inferior_ptid;
} }
if ((scheduler_mode == schedlock_on) || if ((scheduler_mode == schedlock_on)
(scheduler_mode == schedlock_step && || (scheduler_mode == schedlock_step
(step || singlestep_breakpoints_inserted_p))) && (step || singlestep_breakpoints_inserted_p)))
{ {
/* User-settable 'scheduler' mode requires solo thread resume. */ /* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid; resume_ptid = inferior_ptid;
@ -649,8 +649,8 @@ prepare_to_proceed (void)
/* Make sure we were stopped either at a breakpoint, or because /* Make sure we were stopped either at a breakpoint, or because
of a Ctrl-C. */ of a Ctrl-C. */
if (wait_status.kind != TARGET_WAITKIND_STOPPED if (wait_status.kind != TARGET_WAITKIND_STOPPED
|| (wait_status.value.sig != TARGET_SIGNAL_TRAP && || (wait_status.value.sig != TARGET_SIGNAL_TRAP
wait_status.value.sig != TARGET_SIGNAL_INT)) && wait_status.value.sig != TARGET_SIGNAL_INT))
{ {
return 0; return 0;
} }
@ -674,11 +674,11 @@ prepare_to_proceed (void)
select_frame (get_current_frame ()); select_frame (get_current_frame ());
} }
/* We return 1 to indicate that there is a breakpoint here, /* We return 1 to indicate that there is a breakpoint here,
so we need to step over it before continuing to avoid so we need to step over it before continuing to avoid
hitting it straight away. */ hitting it straight away. */
if (breakpoint_here_p (wait_pc)) if (breakpoint_here_p (wait_pc))
return 1; return 1;
} }
return 0; return 0;
@ -761,7 +761,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
{ {
insert_breakpoints (); insert_breakpoints ();
/* If we get here there was no call to error() in /* If we get here there was no call to error() in
insert breakpoints -- so they were inserted. */ insert breakpoints -- so they were inserted. */
breakpoints_inserted = 1; breakpoints_inserted = 1;
} }
@ -937,7 +937,8 @@ void handle_inferior_event (struct execution_control_state *ecs);
static void step_into_function (struct execution_control_state *ecs); static void step_into_function (struct execution_control_state *ecs);
static void insert_step_resume_breakpoint (struct frame_info *step_frame, static void insert_step_resume_breakpoint (struct frame_info *step_frame,
struct execution_control_state *ecs); struct execution_control_state
*ecs);
static void stop_stepping (struct execution_control_state *ecs); static void stop_stepping (struct execution_control_state *ecs);
static void prepare_to_wait (struct execution_control_state *ecs); static void prepare_to_wait (struct execution_control_state *ecs);
static void keep_going (struct execution_control_state *ecs); static void keep_going (struct execution_control_state *ecs);
@ -1188,8 +1189,8 @@ adjust_pc_after_break (struct execution_control_state *ecs)
if (SOFTWARE_SINGLE_STEP_P ()) if (SOFTWARE_SINGLE_STEP_P ())
{ {
/* When using software single-step, a SIGTRAP can only indicate /* When using software single-step, a SIGTRAP can only indicate
an inserted breakpoint. This actually makes things an inserted breakpoint. This actually makes things
easier. */ easier. */
if (singlestep_breakpoints_inserted_p) if (singlestep_breakpoints_inserted_p)
/* When software single stepping, the instruction at [prev_pc] /* When software single stepping, the instruction at [prev_pc]
is never a breakpoint, but the instruction following is never a breakpoint, but the instruction following
@ -1205,9 +1206,9 @@ adjust_pc_after_break (struct execution_control_state *ecs)
else else
{ {
/* When using hardware single-step, a SIGTRAP is reported for /* When using hardware single-step, a SIGTRAP is reported for
both a completed single-step and a software breakpoint. Need both a completed single-step and a software breakpoint. Need
to differentiate between the two as the latter needs to differentiate between the two as the latter needs
adjusting but the former does not. */ adjusting but the former does not. */
if (currently_stepping (ecs)) if (currently_stepping (ecs))
{ {
if (prev_pc == breakpoint_pc if (prev_pc == breakpoint_pc
@ -1245,7 +1246,7 @@ handle_inferior_event (struct execution_control_state *ecs)
defined in the file "config/pa/nm-hppah.h", accesses the variable defined in the file "config/pa/nm-hppah.h", accesses the variable
indirectly. Mutter something rude about the HP merge. */ indirectly. Mutter something rude about the HP merge. */
int sw_single_step_trap_p = 0; int sw_single_step_trap_p = 0;
int stopped_by_watchpoint = -1; /* Mark as unknown. */ int stopped_by_watchpoint = -1; /* Mark as unknown. */
/* Cache the last pid/waitstatus. */ /* Cache the last pid/waitstatus. */
target_last_wait_ptid = ecs->ptid; target_last_wait_ptid = ecs->ptid;
@ -1313,31 +1314,6 @@ handle_inferior_event (struct execution_control_state *ecs)
ui_out_text (uiout, "[New "); ui_out_text (uiout, "[New ");
ui_out_text (uiout, target_pid_or_tid_to_str (ecs->ptid)); ui_out_text (uiout, target_pid_or_tid_to_str (ecs->ptid));
ui_out_text (uiout, "]\n"); ui_out_text (uiout, "]\n");
#if 0
/* NOTE: This block is ONLY meant to be invoked in case of a
"thread creation event"! If it is invoked for any other
sort of event (such as a new thread landing on a breakpoint),
the event will be discarded, which is almost certainly
a bad thing!
To avoid this, the low-level module (eg. target_wait)
should call in_thread_list and add_thread, so that the
new thread is known by the time we get here. */
/* We may want to consider not doing a resume here in order
to give the user a chance to play with the new thread.
It might be good to make that a user-settable option. */
/* At this point, all threads are stopped (happens
automatically in either the OS or the native code).
Therefore we need to continue all threads in order to
make progress. */
target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
prepare_to_wait (ecs);
return;
#endif
} }
switch (ecs->ws.kind) switch (ecs->ws.kind)
@ -1360,20 +1336,20 @@ handle_inferior_event (struct execution_control_state *ecs)
breakpoint_re_set. */ breakpoint_re_set. */
target_terminal_ours_for_output (); target_terminal_ours_for_output ();
/* NOTE: cagney/2003-11-25: Make certain that the target /* NOTE: cagney/2003-11-25: Make certain that the target
stack's section table is kept up-to-date. Architectures, stack's section table is kept up-to-date. Architectures,
(e.g., PPC64), use the section table to perform (e.g., PPC64), use the section table to perform
operations such as address => section name and hence operations such as address => section name and hence
require the table to contain all sections (including require the table to contain all sections (including
those found in shared libraries). */ those found in shared libraries). */
/* NOTE: cagney/2003-11-25: Pass current_target and not /* NOTE: cagney/2003-11-25: Pass current_target and not
exec_ops to SOLIB_ADD. This is because current GDB is exec_ops to SOLIB_ADD. This is because current GDB is
only tooled to propagate section_table changes out from only tooled to propagate section_table changes out from
the "current_target" (see target_resize_to_sections), and the "current_target" (see target_resize_to_sections), and
not up from the exec stratum. This, of course, isn't not up from the exec stratum. This, of course, isn't
right. "infrun.c" should only interact with the right. "infrun.c" should only interact with the
exec/process stratum, instead relying on the target stack exec/process stratum, instead relying on the target stack
to propagate relevant changes (stop, section table to propagate relevant changes (stop, section table
changed, ...) up to other layers. */ changed, ...) up to other layers. */
SOLIB_ADD (NULL, 0, &current_target, auto_solib_add); SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
target_terminal_inferior (); target_terminal_inferior ();
@ -1453,8 +1429,8 @@ handle_inferior_event (struct execution_control_state *ecs)
stop_signal = TARGET_SIGNAL_TRAP; stop_signal = TARGET_SIGNAL_TRAP;
/* NOTE drow/2002-12-05: This code should be pushed down into the /* NOTE drow/2002-12-05: This code should be pushed down into the
target_wait function. Until then following vfork on HP/UX 10.20 target_wait function. Until then following vfork on HP/UX 10.20
is probably broken by this. Of course, it's broken anyway. */ is probably broken by this. Of course, it's broken anyway. */
/* Is this a target which reports multiple exec events per actual /* Is this a target which reports multiple exec events per actual
call to exec()? (HP-UX using ptrace does, for example.) If so, call to exec()? (HP-UX using ptrace does, for example.) If so,
ignore all but the last one. Just resume the exec'r, and wait ignore all but the last one. Just resume the exec'r, and wait
@ -1560,11 +1536,11 @@ handle_inferior_event (struct execution_control_state *ecs)
in handling it at this level. The lower layers have already in handling it at this level. The lower layers have already
done what needs to be done, if anything. done what needs to be done, if anything.
One of the possible circumstances for this is when the One of the possible circumstances for this is when the
inferior produces output for the console. The inferior has inferior produces output for the console. The inferior has
not stopped, and we are ignoring the event. Another possible not stopped, and we are ignoring the event. Another possible
circumstance is any event which the lower level knows will be circumstance is any event which the lower level knows will be
reported multiple times without an intervening resume. */ reported multiple times without an intervening resume. */
case TARGET_WAITKIND_IGNORE: case TARGET_WAITKIND_IGNORE:
prepare_to_wait (ecs); prepare_to_wait (ecs);
return; return;
@ -1588,17 +1564,18 @@ handle_inferior_event (struct execution_control_state *ecs)
if (stepping_past_singlestep_breakpoint) if (stepping_past_singlestep_breakpoint)
{ {
gdb_assert (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p); gdb_assert (SOFTWARE_SINGLE_STEP_P ()
&& singlestep_breakpoints_inserted_p);
gdb_assert (ptid_equal (singlestep_ptid, ecs->ptid)); gdb_assert (ptid_equal (singlestep_ptid, ecs->ptid));
gdb_assert (!ptid_equal (singlestep_ptid, saved_singlestep_ptid)); gdb_assert (!ptid_equal (singlestep_ptid, saved_singlestep_ptid));
stepping_past_singlestep_breakpoint = 0; stepping_past_singlestep_breakpoint = 0;
/* We've either finished single-stepping past the single-step /* We've either finished single-stepping past the single-step
breakpoint, or stopped for some other reason. It would be nice if breakpoint, or stopped for some other reason. It would be nice if
we could tell, but we can't reliably. */ we could tell, but we can't reliably. */
if (stop_signal == TARGET_SIGNAL_TRAP) if (stop_signal == TARGET_SIGNAL_TRAP)
{ {
/* Pull the single step breakpoints out of the target. */ /* Pull the single step breakpoints out of the target. */
SOFTWARE_SINGLE_STEP (0, 0); SOFTWARE_SINGLE_STEP (0, 0);
singlestep_breakpoints_inserted_p = 0; singlestep_breakpoints_inserted_p = 0;
@ -1652,66 +1629,66 @@ handle_inferior_event (struct execution_control_state *ecs)
} }
if (thread_hop_needed) if (thread_hop_needed)
{
int remove_status;
/* Saw a breakpoint, but it was hit by the wrong thread.
Just continue. */
if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
{ {
int remove_status; /* Pull the single step breakpoints out of the target. */
SOFTWARE_SINGLE_STEP (0, 0);
singlestep_breakpoints_inserted_p = 0;
}
/* Saw a breakpoint, but it was hit by the wrong thread. remove_status = remove_breakpoints ();
Just continue. */ /* Did we fail to remove breakpoints? If so, try
to set the PC past the bp. (There's at least
if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) one situation in which we can fail to remove
{ the bp's: On HP-UX's that use ttrace, we can't
/* Pull the single step breakpoints out of the target. */ change the address space of a vforking child
SOFTWARE_SINGLE_STEP (0, 0); process until the child exits (well, okay, not
singlestep_breakpoints_inserted_p = 0; then either :-) or execs. */
} if (remove_status != 0)
{
remove_status = remove_breakpoints (); /* FIXME! This is obviously non-portable! */
/* Did we fail to remove breakpoints? If so, try write_pc_pid (stop_pc + 4, ecs->ptid);
to set the PC past the bp. (There's at least /* We need to restart all the threads now,
one situation in which we can fail to remove * unles we're running in scheduler-locked mode.
the bp's: On HP-UX's that use ttrace, we can't * Use currently_stepping to determine whether to
change the address space of a vforking child * step or continue.
process until the child exits (well, okay, not */
then either :-) or execs. */ /* FIXME MVS: is there any reason not to call resume()? */
if (remove_status != 0) if (scheduler_mode == schedlock_on)
{ target_resume (ecs->ptid,
/* FIXME! This is obviously non-portable! */ currently_stepping (ecs), TARGET_SIGNAL_0);
write_pc_pid (stop_pc + 4, ecs->ptid);
/* We need to restart all the threads now,
* unles we're running in scheduler-locked mode.
* Use currently_stepping to determine whether to
* step or continue.
*/
/* FIXME MVS: is there any reason not to call resume()? */
if (scheduler_mode == schedlock_on)
target_resume (ecs->ptid,
currently_stepping (ecs), TARGET_SIGNAL_0);
else
target_resume (RESUME_ALL,
currently_stepping (ecs), TARGET_SIGNAL_0);
prepare_to_wait (ecs);
return;
}
else else
{ /* Single step */ target_resume (RESUME_ALL,
breakpoints_inserted = 0; currently_stepping (ecs), TARGET_SIGNAL_0);
if (!ptid_equal (inferior_ptid, ecs->ptid)) prepare_to_wait (ecs);
context_switch (ecs); return;
ecs->waiton_ptid = ecs->ptid; }
ecs->wp = &(ecs->ws); else
ecs->another_trap = 1; { /* Single step */
breakpoints_inserted = 0;
if (!ptid_equal (inferior_ptid, ecs->ptid))
context_switch (ecs);
ecs->waiton_ptid = ecs->ptid;
ecs->wp = &(ecs->ws);
ecs->another_trap = 1;
ecs->infwait_state = infwait_thread_hop_state; ecs->infwait_state = infwait_thread_hop_state;
keep_going (ecs); keep_going (ecs);
registers_changed (); registers_changed ();
return; return;
} }
} }
else if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) else if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
{ {
sw_single_step_trap_p = 1; sw_single_step_trap_p = 1;
ecs->random_signal = 0; ecs->random_signal = 0;
} }
} }
else else
ecs->random_signal = 1; ecs->random_signal = 1;
@ -1840,12 +1817,11 @@ handle_inferior_event (struct execution_control_state *ecs)
stack. */ stack. */
if (stop_signal == TARGET_SIGNAL_TRAP if (stop_signal == TARGET_SIGNAL_TRAP
|| (breakpoints_inserted && || (breakpoints_inserted
(stop_signal == TARGET_SIGNAL_ILL && (stop_signal == TARGET_SIGNAL_ILL
|| stop_signal == TARGET_SIGNAL_SEGV || stop_signal == TARGET_SIGNAL_SEGV
|| stop_signal == TARGET_SIGNAL_EMT)) || stop_signal == TARGET_SIGNAL_EMT))
|| stop_soon == STOP_QUIETLY || stop_soon == STOP_QUIETLY || stop_soon == STOP_QUIETLY_NO_SIGSTOP)
|| stop_soon == STOP_QUIETLY_NO_SIGSTOP)
{ {
if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap) if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
{ {
@ -1890,13 +1866,13 @@ handle_inferior_event (struct execution_control_state *ecs)
} }
/* NOTE: cagney/2003-03-29: These two checks for a random signal /* NOTE: cagney/2003-03-29: These two checks for a random signal
at one stage in the past included checks for an inferior at one stage in the past included checks for an inferior
function call's call dummy's return breakpoint. The original function call's call dummy's return breakpoint. The original
comment, that went with the test, read: comment, that went with the test, read:
``End of a stack dummy. Some systems (e.g. Sony news) give ``End of a stack dummy. Some systems (e.g. Sony news) give
another signal besides SIGTRAP, so check here as well as another signal besides SIGTRAP, so check here as well as
above.'' above.''
If someone ever tries to get get call dummys on a If someone ever tries to get get call dummys on a
non-executable stack to work (where the target would stop non-executable stack to work (where the target would stop
@ -1905,9 +1881,9 @@ handle_inferior_event (struct execution_control_state *ecs)
enabled when momentary breakpoints were not being used, I enabled when momentary breakpoints were not being used, I
suspect that it won't be the case. suspect that it won't be the case.
NOTE: kettenis/2004-02-05: Indeed such checks don't seem to NOTE: kettenis/2004-02-05: Indeed such checks don't seem to
be necessary for call dummies on a non-executable stack on be necessary for call dummies on a non-executable stack on
SPARC. */ SPARC. */
if (stop_signal == TARGET_SIGNAL_TRAP) if (stop_signal == TARGET_SIGNAL_TRAP)
ecs->random_signal ecs->random_signal
@ -2014,13 +1990,7 @@ process_event_stop_test:
delete_step_resume_breakpoint (&step_resume_breakpoint); delete_step_resume_breakpoint (&step_resume_breakpoint);
} }
#if 0 set_longjmp_resume_breakpoint (jmp_buf_pc, null_frame_id);
/* FIXME - Need to implement nested temporary breakpoints */
if (step_over_calls > 0)
set_longjmp_resume_breakpoint (jmp_buf_pc, get_current_frame ());
else
#endif /* 0 */
set_longjmp_resume_breakpoint (jmp_buf_pc, null_frame_id);
ecs->handling_longjmp = 1; /* FIXME */ ecs->handling_longjmp = 1; /* FIXME */
keep_going (ecs); keep_going (ecs);
return; return;
@ -2029,17 +1999,6 @@ process_event_stop_test:
case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE: case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE:
remove_breakpoints (); remove_breakpoints ();
breakpoints_inserted = 0; breakpoints_inserted = 0;
#if 0
/* FIXME - Need to implement nested temporary breakpoints */
if (step_over_calls
&& (frame_id_inner (get_frame_id (get_current_frame ()),
step_frame_id)))
{
ecs->another_trap = 1;
keep_going (ecs);
return;
}
#endif /* 0 */
disable_longjmp_breakpoint (); disable_longjmp_breakpoint ();
ecs->handling_longjmp = 0; /* FIXME */ ecs->handling_longjmp = 0; /* FIXME */
if (what.main_action == BPSTAT_WHAT_CLEAR_LONGJMP_RESUME) if (what.main_action == BPSTAT_WHAT_CLEAR_LONGJMP_RESUME)
@ -2125,20 +2084,20 @@ process_event_stop_test:
breakpoint_re_set. */ breakpoint_re_set. */
target_terminal_ours_for_output (); target_terminal_ours_for_output ();
/* NOTE: cagney/2003-11-25: Make certain that the target /* NOTE: cagney/2003-11-25: Make certain that the target
stack's section table is kept up-to-date. Architectures, stack's section table is kept up-to-date. Architectures,
(e.g., PPC64), use the section table to perform (e.g., PPC64), use the section table to perform
operations such as address => section name and hence operations such as address => section name and hence
require the table to contain all sections (including require the table to contain all sections (including
those found in shared libraries). */ those found in shared libraries). */
/* NOTE: cagney/2003-11-25: Pass current_target and not /* NOTE: cagney/2003-11-25: Pass current_target and not
exec_ops to SOLIB_ADD. This is because current GDB is exec_ops to SOLIB_ADD. This is because current GDB is
only tooled to propagate section_table changes out from only tooled to propagate section_table changes out from
the "current_target" (see target_resize_to_sections), and the "current_target" (see target_resize_to_sections), and
not up from the exec stratum. This, of course, isn't not up from the exec stratum. This, of course, isn't
right. "infrun.c" should only interact with the right. "infrun.c" should only interact with the
exec/process stratum, instead relying on the target stack exec/process stratum, instead relying on the target stack
to propagate relevant changes (stop, section table to propagate relevant changes (stop, section table
changed, ...) up to other layers. */ changed, ...) up to other layers. */
SOLIB_ADD (NULL, 0, &current_target, auto_solib_add); SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
target_terminal_inferior (); target_terminal_inferior ();
@ -2166,8 +2125,8 @@ process_event_stop_test:
the call that caused this catchpoint to trigger. That the call that caused this catchpoint to trigger. That
gives the user a more useful vantage from which to gives the user a more useful vantage from which to
examine their program's state. */ examine their program's state. */
else if (what.main_action == else if (what.main_action
BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK) == BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK)
{ {
/* ??rehrauer: If I could figure out how to get the /* ??rehrauer: If I could figure out how to get the
right return PC from here, we could just set a temp right return PC from here, we could just set a temp
@ -2304,16 +2263,15 @@ process_event_stop_test:
&& get_frame_type (get_current_frame ()) == SIGTRAMP_FRAME) && get_frame_type (get_current_frame ()) == SIGTRAMP_FRAME)
{ {
/* The inferior, while doing a "step" or "next", has ended up in /* The inferior, while doing a "step" or "next", has ended up in
a signal trampoline (either by a signal being delivered or by a signal trampoline (either by a signal being delivered or by
the signal handler returning). Just single-step until the the signal handler returning). Just single-step until the
inferior leaves the trampoline (either by calling the handler inferior leaves the trampoline (either by calling the handler
or returning). */ or returning). */
keep_going (ecs); keep_going (ecs);
return; return;
} }
if (frame_id_eq (frame_unwind_id (get_current_frame ()), if (frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id))
step_frame_id))
{ {
/* It's a subroutine call. */ /* It's a subroutine call. */
CORE_ADDR real_stop_pc; CORE_ADDR real_stop_pc;
@ -2336,22 +2294,22 @@ process_event_stop_test:
#ifdef DEPRECATED_IGNORE_HELPER_CALL #ifdef DEPRECATED_IGNORE_HELPER_CALL
/* On MIPS16, a function that returns a floating point value may /* On MIPS16, a function that returns a floating point value may
call a library helper function to copy the return value to a call a library helper function to copy the return value to a
floating point register. The DEPRECATED_IGNORE_HELPER_CALL floating point register. The DEPRECATED_IGNORE_HELPER_CALL
macro returns non-zero if we should ignore (i.e. step over) macro returns non-zero if we should ignore (i.e. step over)
this function call. */ this function call. */
/* FIXME: cagney/2004-07-21: These custom ``ignore frame when /* FIXME: cagney/2004-07-21: These custom ``ignore frame when
stepping'' function attributes (SIGTRAMP_FRAME, stepping'' function attributes (SIGTRAMP_FRAME,
DEPRECATED_IGNORE_HELPER_CALL, SKIP_TRAMPOLINE_CODE, DEPRECATED_IGNORE_HELPER_CALL, SKIP_TRAMPOLINE_CODE,
skip_language_trampoline frame, et.al.) need to be replaced skip_language_trampoline frame, et.al.) need to be replaced
with generic attributes bound to the frame's function. */ with generic attributes bound to the frame's function. */
if (DEPRECATED_IGNORE_HELPER_CALL (stop_pc)) if (DEPRECATED_IGNORE_HELPER_CALL (stop_pc))
{ {
/* We're doing a "next", set a breakpoint at callee's return /* We're doing a "next", set a breakpoint at callee's return
address (the address at which the caller will address (the address at which the caller will
resume). */ resume). */
insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()), insert_step_resume_breakpoint (get_prev_frame
ecs); (get_current_frame ()), ecs);
keep_going (ecs); keep_going (ecs);
return; return;
} }
@ -2361,17 +2319,17 @@ process_event_stop_test:
/* We're doing a "next", set a breakpoint at callee's return /* We're doing a "next", set a breakpoint at callee's return
address (the address at which the caller will address (the address at which the caller will
resume). */ resume). */
insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()), insert_step_resume_breakpoint (get_prev_frame
ecs); (get_current_frame ()), ecs);
keep_going (ecs); keep_going (ecs);
return; return;
} }
/* If we are in a function call trampoline (a stub between the /* If we are in a function call trampoline (a stub between the
calling routine and the real function), locate the real calling routine and the real function), locate the real
function. That's what tells us (a) whether we want to step function. That's what tells us (a) whether we want to step
into it at all, and (b) what prologue we want to run to the into it at all, and (b) what prologue we want to run to the
end of, if we do step into it. */ end of, if we do step into it. */
real_stop_pc = skip_language_trampoline (stop_pc); real_stop_pc = skip_language_trampoline (stop_pc);
if (real_stop_pc == 0) if (real_stop_pc == 0)
real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc); real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
@ -2390,16 +2348,16 @@ process_event_stop_test:
if (breakpoints_inserted) if (breakpoints_inserted)
insert_breakpoints (); insert_breakpoints ();
keep_going (ecs); keep_going (ecs);
return; return;
} }
/* If we have line number information for the function we are /* If we have line number information for the function we are
thinking of stepping into, step into it. thinking of stepping into, step into it.
If there are several symtabs at that PC (e.g. with include If there are several symtabs at that PC (e.g. with include
files), just want to know whether *any* of them have line files), just want to know whether *any* of them have line
numbers. find_pc_line handles this. */ numbers. find_pc_line handles this. */
{ {
struct symtab_and_line tmp_sal; struct symtab_and_line tmp_sal;
@ -2412,8 +2370,8 @@ process_event_stop_test:
} }
/* If we have no line number and the step-stop-if-no-debug is /* If we have no line number and the step-stop-if-no-debug is
set, we stop the step so that the user has a chance to switch set, we stop the step so that the user has a chance to switch
in assembly mode. */ in assembly mode. */
if (step_over_calls == STEP_OVER_UNDEBUGGABLE && step_stop_if_no_debug) if (step_over_calls == STEP_OVER_UNDEBUGGABLE && step_stop_if_no_debug)
{ {
stop_step = 1; stop_step = 1;
@ -2423,8 +2381,9 @@ process_event_stop_test:
} }
/* Set a breakpoint at callee's return address (the address at /* Set a breakpoint at callee's return address (the address at
which the caller will resume). */ which the caller will resume). */
insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()), ecs); insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()),
ecs);
keep_going (ecs); keep_going (ecs);
return; return;
} }
@ -2487,8 +2446,8 @@ process_event_stop_test:
{ {
/* Set a breakpoint at callee's return address (the address /* Set a breakpoint at callee's return address (the address
at which the caller will resume). */ at which the caller will resume). */
insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()), insert_step_resume_breakpoint (get_prev_frame
ecs); (get_current_frame ()), ecs);
keep_going (ecs); keep_going (ecs);
return; return;
} }
@ -2566,15 +2525,15 @@ process_event_stop_test:
stackless leaf function. I think the logic should instead look stackless leaf function. I think the logic should instead look
at the unwound frame ID has that should give a more robust at the unwound frame ID has that should give a more robust
indication of what happened. */ indication of what happened. */
if (step-ID == current-ID) if (step - ID == current - ID)
still stepping in same function; still stepping in same function;
else if (step-ID == unwind (current-ID)) else if (step - ID == unwind (current - ID))
stepped into a function; stepped into a function;
else else
stepped out of a function; stepped out of a function;
/* Of course this assumes that the frame ID unwind code is robust /* Of course this assumes that the frame ID unwind code is robust
and we're willing to introduce frame unwind logic into this and we're willing to introduce frame unwind logic into this
function. Fortunately, those days are nearly upon us. */ function. Fortunately, those days are nearly upon us. */
#endif #endif
{ {
struct frame_id current_frame = get_frame_id (get_current_frame ()); struct frame_id current_frame = get_frame_id (get_current_frame ());
@ -2642,7 +2601,7 @@ step_into_function (struct execution_control_state *ecs)
{ {
ecs->stop_func_start ecs->stop_func_start
= gdbarch_adjust_breakpoint_address (current_gdbarch, = gdbarch_adjust_breakpoint_address (current_gdbarch,
ecs->stop_func_start); ecs->stop_func_start);
} }
if (ecs->stop_func_start == stop_pc) if (ecs->stop_func_start == stop_pc)
@ -3024,8 +2983,8 @@ normal_stop (void)
{ {
case PRINT_UNKNOWN: case PRINT_UNKNOWN:
/* FIXME: cagney/2002-12-01: Given that a frame ID does /* FIXME: cagney/2002-12-01: Given that a frame ID does
(or should) carry around the function and does (or (or should) carry around the function and does (or
should) use that when doing a frame comparison. */ should) use that when doing a frame comparison. */
if (stop_step if (stop_step
&& frame_id_eq (step_frame_id, && frame_id_eq (step_frame_id,
get_frame_id (get_current_frame ())) get_frame_id (get_current_frame ()))