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:
parent
f855931bbd
commit
8fb3e588da
|
@ -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>
|
||||
|
||||
* doublest.h (floatformat_ieee_quad): Rename
|
||||
|
|
91
gdb/infrun.c
91
gdb/infrun.c
|
@ -580,8 +580,8 @@ resume (int step, enum target_signal sig)
|
|||
|
||||
resume_ptid = RESUME_ALL; /* Default */
|
||||
|
||||
if ((step || singlestep_breakpoints_inserted_p) &&
|
||||
(stepping_past_singlestep_breakpoint
|
||||
if ((step || singlestep_breakpoints_inserted_p)
|
||||
&& (stepping_past_singlestep_breakpoint
|
||||
|| (!breakpoints_inserted && breakpoint_here_p (read_pc ()))))
|
||||
{
|
||||
/* Stepping past a breakpoint without inserting breakpoints.
|
||||
|
@ -592,9 +592,9 @@ resume (int step, enum target_signal sig)
|
|||
resume_ptid = inferior_ptid;
|
||||
}
|
||||
|
||||
if ((scheduler_mode == schedlock_on) ||
|
||||
(scheduler_mode == schedlock_step &&
|
||||
(step || singlestep_breakpoints_inserted_p)))
|
||||
if ((scheduler_mode == schedlock_on)
|
||||
|| (scheduler_mode == schedlock_step
|
||||
&& (step || singlestep_breakpoints_inserted_p)))
|
||||
{
|
||||
/* User-settable 'scheduler' mode requires solo thread resume. */
|
||||
resume_ptid = inferior_ptid;
|
||||
|
@ -649,8 +649,8 @@ prepare_to_proceed (void)
|
|||
/* Make sure we were stopped either at a breakpoint, or because
|
||||
of a Ctrl-C. */
|
||||
if (wait_status.kind != TARGET_WAITKIND_STOPPED
|
||||
|| (wait_status.value.sig != TARGET_SIGNAL_TRAP &&
|
||||
wait_status.value.sig != TARGET_SIGNAL_INT))
|
||||
|| (wait_status.value.sig != TARGET_SIGNAL_TRAP
|
||||
&& wait_status.value.sig != TARGET_SIGNAL_INT))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -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 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 prepare_to_wait (struct execution_control_state *ecs);
|
||||
static void keep_going (struct execution_control_state *ecs);
|
||||
|
@ -1313,31 +1314,6 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
ui_out_text (uiout, "[New ");
|
||||
ui_out_text (uiout, target_pid_or_tid_to_str (ecs->ptid));
|
||||
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)
|
||||
|
@ -1588,7 +1564,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
|
||||
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, saved_singlestep_ptid));
|
||||
|
||||
|
@ -1840,12 +1817,11 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
stack. */
|
||||
|
||||
if (stop_signal == TARGET_SIGNAL_TRAP
|
||||
|| (breakpoints_inserted &&
|
||||
(stop_signal == TARGET_SIGNAL_ILL
|
||||
|| (breakpoints_inserted
|
||||
&& (stop_signal == TARGET_SIGNAL_ILL
|
||||
|| stop_signal == TARGET_SIGNAL_SEGV
|
||||
|| stop_signal == TARGET_SIGNAL_EMT))
|
||||
|| stop_soon == STOP_QUIETLY
|
||||
|| stop_soon == STOP_QUIETLY_NO_SIGSTOP)
|
||||
|| stop_soon == STOP_QUIETLY || stop_soon == STOP_QUIETLY_NO_SIGSTOP)
|
||||
{
|
||||
if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
|
||||
{
|
||||
|
@ -2014,12 +1990,6 @@ process_event_stop_test:
|
|||
delete_step_resume_breakpoint (&step_resume_breakpoint);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* 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 */
|
||||
keep_going (ecs);
|
||||
|
@ -2029,17 +1999,6 @@ process_event_stop_test:
|
|||
case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE:
|
||||
remove_breakpoints ();
|
||||
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 ();
|
||||
ecs->handling_longjmp = 0; /* FIXME */
|
||||
if (what.main_action == BPSTAT_WHAT_CLEAR_LONGJMP_RESUME)
|
||||
|
@ -2166,8 +2125,8 @@ process_event_stop_test:
|
|||
the call that caused this catchpoint to trigger. That
|
||||
gives the user a more useful vantage from which to
|
||||
examine their program's state. */
|
||||
else if (what.main_action ==
|
||||
BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK)
|
||||
else if (what.main_action
|
||||
== BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK)
|
||||
{
|
||||
/* ??rehrauer: If I could figure out how to get the
|
||||
right return PC from here, we could just set a temp
|
||||
|
@ -2312,8 +2271,7 @@ process_event_stop_test:
|
|||
return;
|
||||
}
|
||||
|
||||
if (frame_id_eq (frame_unwind_id (get_current_frame ()),
|
||||
step_frame_id))
|
||||
if (frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id))
|
||||
{
|
||||
/* It's a subroutine call. */
|
||||
CORE_ADDR real_stop_pc;
|
||||
|
@ -2350,8 +2308,8 @@ process_event_stop_test:
|
|||
/* We're doing a "next", set a breakpoint at callee's return
|
||||
address (the address at 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);
|
||||
return;
|
||||
}
|
||||
|
@ -2361,8 +2319,8 @@ process_event_stop_test:
|
|||
/* We're doing a "next", set a breakpoint at callee's return
|
||||
address (the address at 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);
|
||||
return;
|
||||
}
|
||||
|
@ -2424,7 +2382,8 @@ process_event_stop_test:
|
|||
|
||||
/* Set a breakpoint at callee's return address (the address at
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
@ -2487,8 +2446,8 @@ process_event_stop_test:
|
|||
{
|
||||
/* Set a breakpoint at callee's return address (the address
|
||||
at 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);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue