* infrun.c: Re-indent using gdb_indent.sh.
This commit is contained in:
parent
46c415d23a
commit
488f131ba0
2 changed files with 1546 additions and 1560 deletions
|
@ -1,3 +1,7 @@
|
|||
2002-07-18 Joel Brobecker <brobecker@gnat.com>
|
||||
|
||||
* infrun.c: Re-indent using gdb_indent.sh.
|
||||
|
||||
2002-07-18 Joel Brobecker <brobecker@gnat.com>
|
||||
|
||||
* infrun.c (handle_inferior_event): Remove unneeded extra brace.
|
||||
|
|
184
gdb/infrun.c
184
gdb/infrun.c
|
@ -404,8 +404,7 @@ static const char follow_fork_mode_both[] = "both";
|
|||
static const char follow_fork_mode_child[] = "child";
|
||||
static const char follow_fork_mode_parent[] = "parent";
|
||||
|
||||
static const char *follow_fork_mode_kind_names[] =
|
||||
{
|
||||
static const char *follow_fork_mode_kind_names[] = {
|
||||
follow_fork_mode_ask,
|
||||
/* ??rehrauer: The "both" option is broken, by what may be a 10.20
|
||||
kernel problem. It's also not terribly useful without a GUI to
|
||||
|
@ -512,8 +511,7 @@ follow_inferior_fork (int parent_pid, int child_pid, int has_forked,
|
|||
from the breakpoint package's viewpoint, that's a switch of
|
||||
"threads". We must update the bp's notion of which thread
|
||||
it is for, or it'll be ignored when it triggers... */
|
||||
if (step_resume_breakpoint &&
|
||||
(!has_vforked || !follow_vfork_when_exec))
|
||||
if (step_resume_breakpoint && (!has_vforked || !follow_vfork_when_exec))
|
||||
breakpoint_re_set_thread (step_resume_breakpoint);
|
||||
|
||||
/* Reinsert all breakpoints in the child. (The user may've set
|
||||
|
@ -577,9 +575,7 @@ follow_inferior_fork (int parent_pid, int child_pid, int has_forked,
|
|||
if (has_vforked)
|
||||
{
|
||||
target_post_follow_vfork (parent_pid,
|
||||
followed_parent,
|
||||
child_pid,
|
||||
followed_child);
|
||||
followed_parent, child_pid, followed_child);
|
||||
}
|
||||
|
||||
pending_follow.fork_event.saw_parent_fork = 0;
|
||||
|
@ -734,8 +730,7 @@ static const char schedlock_off[] = "off";
|
|||
static const char schedlock_on[] = "on";
|
||||
static const char schedlock_step[] = "step";
|
||||
static const char *scheduler_mode = schedlock_off;
|
||||
static const char *scheduler_enums[] =
|
||||
{
|
||||
static const char *scheduler_enums[] = {
|
||||
schedlock_off,
|
||||
schedlock_on,
|
||||
schedlock_step,
|
||||
|
@ -757,8 +752,7 @@ set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c)
|
|||
if (!target_can_lock_scheduler)
|
||||
{
|
||||
scheduler_mode = schedlock_off;
|
||||
error ("Target '%s' cannot support this command.",
|
||||
target_shortname);
|
||||
error ("Target '%s' cannot support this command.", target_shortname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1194,7 +1188,8 @@ static void step_over_function (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);
|
||||
static void print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info);
|
||||
static void print_stop_reason (enum inferior_stop_reason stop_reason,
|
||||
int stop_info);
|
||||
|
||||
/* Wait for control to return from inferior to debugger.
|
||||
If inferior gets a signal, we may decide to start it up again
|
||||
|
@ -1294,7 +1289,8 @@ fetch_inferior_event (void *client_data)
|
|||
}
|
||||
|
||||
if (target_wait_hook)
|
||||
async_ecs->ptid = target_wait_hook (async_ecs->waiton_ptid, async_ecs->wp);
|
||||
async_ecs->ptid =
|
||||
target_wait_hook (async_ecs->waiton_ptid, async_ecs->wp);
|
||||
else
|
||||
async_ecs->ptid = target_wait (async_ecs->waiton_ptid, async_ecs->wp);
|
||||
|
||||
|
@ -1346,7 +1342,8 @@ static void
|
|||
check_for_old_step_resume_breakpoint (void)
|
||||
{
|
||||
if (step_resume_breakpoint)
|
||||
warning ("GDB bug: infrun.c (wait_for_inferior): dropping old step_resume breakpoint");
|
||||
warning
|
||||
("GDB bug: infrun.c (wait_for_inferior): dropping old step_resume breakpoint");
|
||||
}
|
||||
|
||||
/* Return the cached copy of the last pid/waitstatus returned by
|
||||
|
@ -1384,8 +1381,7 @@ context_switch (struct execution_control_state *ecs)
|
|||
ecs->stepping_through_solib_after_catch,
|
||||
ecs->stepping_through_solib_catchpoints,
|
||||
ecs->stepping_through_sigtramp,
|
||||
ecs->current_line, ecs->current_symtab,
|
||||
step_sp);
|
||||
ecs->current_line, ecs->current_symtab, step_sp);
|
||||
|
||||
/* Load infrun state for the new thread. */
|
||||
load_infrun_state (ecs->ptid, &prev_pc,
|
||||
|
@ -1397,8 +1393,7 @@ context_switch (struct execution_control_state *ecs)
|
|||
&ecs->stepping_through_solib_after_catch,
|
||||
&ecs->stepping_through_solib_catchpoints,
|
||||
&ecs->stepping_through_sigtramp,
|
||||
&ecs->current_line, &ecs->current_symtab,
|
||||
&step_sp);
|
||||
&ecs->current_line, &ecs->current_symtab, &step_sp);
|
||||
}
|
||||
inferior_ptid = ecs->ptid;
|
||||
}
|
||||
|
@ -1458,8 +1453,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
&& !in_thread_list (ecs->ptid));
|
||||
|
||||
if (ecs->ws.kind != TARGET_WAITKIND_EXITED
|
||||
&& ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
|
||||
&& ecs->new_thread_event)
|
||||
&& ecs->ws.kind != TARGET_WAITKIND_SIGNALLED && ecs->new_thread_event)
|
||||
{
|
||||
add_thread (ecs->ptid);
|
||||
|
||||
|
@ -1637,8 +1631,9 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
pending_follow.fork_event.saw_child_fork = 1;
|
||||
pending_follow.fork_event.child_pid = PIDGET (ecs->ptid);
|
||||
pending_follow.fork_event.parent_pid = ecs->ws.value.related_pid;
|
||||
target_post_startup_inferior (
|
||||
pid_to_ptid (pending_follow.fork_event.child_pid));
|
||||
target_post_startup_inferior (pid_to_ptid
|
||||
(pending_follow.fork_event.
|
||||
child_pid));
|
||||
follow_vfork_when_exec = !target_can_follow_vfork_prior_to_exec ();
|
||||
if (follow_vfork_when_exec)
|
||||
{
|
||||
|
@ -1674,7 +1669,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
{
|
||||
inferior_ignoring_leading_exec_events--;
|
||||
if (pending_follow.kind == TARGET_WAITKIND_VFORKED)
|
||||
ENSURE_VFORKING_PARENT_REMAINS_STOPPED (pending_follow.fork_event.parent_pid);
|
||||
ENSURE_VFORKING_PARENT_REMAINS_STOPPED (pending_follow.fork_event.
|
||||
parent_pid);
|
||||
target_resume (ecs->ptid, 0, TARGET_SIGNAL_0);
|
||||
prepare_to_wait (ecs);
|
||||
return;
|
||||
|
@ -1857,8 +1853,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
if (remove_status != 0)
|
||||
{
|
||||
/* FIXME! This is obviously non-portable! */
|
||||
write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK + 4,
|
||||
ecs->ptid);
|
||||
write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK + 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
|
||||
|
@ -1867,12 +1862,10 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
/* 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);
|
||||
currently_stepping (ecs), TARGET_SIGNAL_0);
|
||||
else
|
||||
target_resume (RESUME_ALL,
|
||||
currently_stepping (ecs),
|
||||
TARGET_SIGNAL_0);
|
||||
currently_stepping (ecs), TARGET_SIGNAL_0);
|
||||
prepare_to_wait (ecs);
|
||||
return;
|
||||
}
|
||||
|
@ -1910,8 +1903,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
|
||||
/* If it's a random signal for a non-current thread, notify user
|
||||
if he's expressed an interest. */
|
||||
if (ecs->random_signal
|
||||
&& signal_print[stop_signal])
|
||||
if (ecs->random_signal && signal_print[stop_signal])
|
||||
{
|
||||
/* ??rehrauer: I don't understand the rationale for this code. If the
|
||||
inferior will stop as a result of this signal, then the act of handling
|
||||
|
@ -1936,8 +1928,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
/* If it's not SIGTRAP and not a signal we want to stop for, then
|
||||
continue the thread. */
|
||||
|
||||
if (stop_signal != TARGET_SIGNAL_TRAP
|
||||
&& !signal_stop[stop_signal])
|
||||
if (stop_signal != TARGET_SIGNAL_TRAP && !signal_stop[stop_signal])
|
||||
{
|
||||
if (printed)
|
||||
target_terminal_inferior ();
|
||||
|
@ -2075,9 +2066,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
if (stop_signal == TARGET_SIGNAL_TRAP
|
||||
|| (breakpoints_inserted &&
|
||||
(stop_signal == TARGET_SIGNAL_ILL
|
||||
|| stop_signal == TARGET_SIGNAL_EMT
|
||||
))
|
||||
|| stop_soon_quietly)
|
||||
|| stop_signal == TARGET_SIGNAL_EMT)) || stop_soon_quietly)
|
||||
{
|
||||
if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
|
||||
{
|
||||
|
@ -2112,8 +2101,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
singlestepping a trap instruction, and singlestepping thru a
|
||||
jump to the instruction following a trap instruction. */
|
||||
|
||||
stop_bpstat = bpstat_stop_status
|
||||
(&stop_pc,
|
||||
stop_bpstat = bpstat_stop_status (&stop_pc,
|
||||
/* Pass TRUE if our reason for stopping is something other
|
||||
than hitting a breakpoint. We do this by checking that
|
||||
1) stepping is going on and 2) we didn't hit a breakpoint
|
||||
|
@ -2121,10 +2109,12 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
sigtramp, which is detected by a new stack pointer value
|
||||
below any usual function calling stack adjustments. */
|
||||
(currently_stepping (ecs)
|
||||
&& prev_pc != stop_pc - DECR_PC_AFTER_BREAK
|
||||
&& prev_pc !=
|
||||
stop_pc - DECR_PC_AFTER_BREAK
|
||||
&& !(step_range_end
|
||||
&& INNER_THAN (read_sp (), (step_sp - 16))))
|
||||
);
|
||||
&& INNER_THAN (read_sp (),
|
||||
(step_sp -
|
||||
16)))));
|
||||
/* Following in case break condition called a
|
||||
function. */
|
||||
stop_print_frame = 1;
|
||||
|
@ -2141,15 +2131,15 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
|
||||
else
|
||||
{
|
||||
ecs->random_signal
|
||||
= !(bpstat_explains_signal (stop_bpstat)
|
||||
ecs->random_signal = !(bpstat_explains_signal (stop_bpstat)
|
||||
/* End of a stack dummy. Some systems (e.g. Sony
|
||||
news) give another signal besides SIGTRAP, so
|
||||
check here as well as above. */
|
||||
|| (!CALL_DUMMY_BREAKPOINT_OFFSET_P
|
||||
&& PC_IN_CALL_DUMMY (stop_pc, read_sp (),
|
||||
FRAME_FP (get_current_frame ())))
|
||||
);
|
||||
FRAME_FP
|
||||
(get_current_frame
|
||||
()))));
|
||||
if (!ecs->random_signal)
|
||||
stop_signal = TARGET_SIGNAL_TRAP;
|
||||
}
|
||||
|
@ -2300,8 +2290,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
disable_longjmp_breakpoint ();
|
||||
remove_breakpoints ();
|
||||
breakpoints_inserted = 0;
|
||||
if (!GET_LONGJMP_TARGET_P ()
|
||||
|| !GET_LONGJMP_TARGET (&jmp_buf_pc))
|
||||
if (!GET_LONGJMP_TARGET_P () || !GET_LONGJMP_TARGET (&jmp_buf_pc))
|
||||
{
|
||||
keep_going (ecs);
|
||||
return;
|
||||
|
@ -2324,8 +2313,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
#if 0
|
||||
/* FIXME - Need to implement nested temporary breakpoints */
|
||||
if (step_over_calls > 0)
|
||||
set_longjmp_resume_breakpoint (jmp_buf_pc,
|
||||
get_current_frame ());
|
||||
set_longjmp_resume_breakpoint (jmp_buf_pc, get_current_frame ());
|
||||
else
|
||||
#endif /* 0 */
|
||||
set_longjmp_resume_breakpoint (jmp_buf_pc, NULL);
|
||||
|
@ -2465,7 +2453,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
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
|
||||
|
@ -2480,7 +2469,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
friends) until we reach non-dld code. At that point,
|
||||
we can stop stepping. */
|
||||
bpstat_get_triggered_catchpoints (stop_bpstat,
|
||||
&ecs->stepping_through_solib_catchpoints);
|
||||
&ecs->
|
||||
stepping_through_solib_catchpoints);
|
||||
ecs->stepping_through_solib_after_catch = 1;
|
||||
|
||||
/* Be sure to lift all breakpoints, so the inferior does
|
||||
|
@ -2589,8 +2579,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
Note that step_range_end is the address of the first instruction
|
||||
beyond the step range, and NOT the address of the last instruction
|
||||
within it! */
|
||||
if (stop_pc >= step_range_start
|
||||
&& stop_pc < step_range_end)
|
||||
if (stop_pc >= step_range_start && stop_pc < step_range_end)
|
||||
{
|
||||
/* We might be doing a BPSTAT_WHAT_SINGLE and getting a signal.
|
||||
So definately need to check for sigtramp here. */
|
||||
|
@ -2605,7 +2594,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
loader dynamic symbol resolution code, we keep on single stepping
|
||||
until we exit the run time loader code and reach the callee's
|
||||
address. */
|
||||
if (step_over_calls == STEP_OVER_UNDEBUGGABLE && IN_SOLIB_DYNSYM_RESOLVE_CODE (stop_pc))
|
||||
if (step_over_calls == STEP_OVER_UNDEBUGGABLE
|
||||
&& IN_SOLIB_DYNSYM_RESOLVE_CODE (stop_pc))
|
||||
{
|
||||
CORE_ADDR pc_after_resolver = SKIP_SOLIB_RESOLVER (stop_pc);
|
||||
|
||||
|
@ -2887,7 +2877,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
}
|
||||
|
||||
if ((stop_pc == ecs->sal.pc)
|
||||
&& (ecs->current_line != ecs->sal.line || ecs->current_symtab != ecs->sal.symtab))
|
||||
&& (ecs->current_line != ecs->sal.line
|
||||
|| ecs->current_symtab != ecs->sal.symtab))
|
||||
{
|
||||
/* We are at the start of a different line. So stop. Note that
|
||||
we don't stop if we step into the middle of a different line.
|
||||
|
@ -3206,8 +3197,7 @@ 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 (stop_signal == TARGET_SIGNAL_TRAP
|
||||
&& !signal_program[stop_signal])
|
||||
if (stop_signal == TARGET_SIGNAL_TRAP && !signal_program[stop_signal])
|
||||
stop_signal = TARGET_SIGNAL_0;
|
||||
|
||||
#ifdef SHIFT_INST_REGS
|
||||
|
@ -3218,8 +3208,7 @@ keep_going (struct execution_control_state *ecs)
|
|||
(this is only used on the 88k). */
|
||||
|
||||
if (!bpstat_explains_signal (stop_bpstat)
|
||||
&& (stop_signal != TARGET_SIGNAL_CHLD)
|
||||
&& !stopped_by_random_signal)
|
||||
&& (stop_signal != TARGET_SIGNAL_CHLD) && !stopped_by_random_signal)
|
||||
SHIFT_INST_REGS ();
|
||||
#endif /* SHIFT_INST_REGS */
|
||||
|
||||
|
@ -3290,11 +3279,13 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
|
|||
ui_out_field_string (uiout, "reason", "exited-signalled");
|
||||
ui_out_text (uiout, "\nProgram terminated with signal ");
|
||||
annotate_signal_name ();
|
||||
ui_out_field_string (uiout, "signal-name", target_signal_to_name (stop_info));
|
||||
ui_out_field_string (uiout, "signal-name",
|
||||
target_signal_to_name (stop_info));
|
||||
annotate_signal_name_end ();
|
||||
ui_out_text (uiout, ", ");
|
||||
annotate_signal_string ();
|
||||
ui_out_field_string (uiout, "signal-meaning", target_signal_to_string (stop_info));
|
||||
ui_out_field_string (uiout, "signal-meaning",
|
||||
target_signal_to_string (stop_info));
|
||||
annotate_signal_string_end ();
|
||||
ui_out_text (uiout, ".\n");
|
||||
ui_out_text (uiout, "The program no longer exists.\n");
|
||||
|
@ -3307,7 +3298,8 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
|
|||
if (ui_out_is_mi_like_p (uiout))
|
||||
ui_out_field_string (uiout, "reason", "exited");
|
||||
ui_out_text (uiout, "\nProgram exited with code ");
|
||||
ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) stop_info);
|
||||
ui_out_field_fmt (uiout, "exit-code", "0%o",
|
||||
(unsigned int) stop_info);
|
||||
ui_out_text (uiout, ".\n");
|
||||
}
|
||||
else
|
||||
|
@ -3325,11 +3317,13 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
|
|||
annotate_signal_name ();
|
||||
if (ui_out_is_mi_like_p (uiout))
|
||||
ui_out_field_string (uiout, "reason", "signal-received");
|
||||
ui_out_field_string (uiout, "signal-name", target_signal_to_name (stop_info));
|
||||
ui_out_field_string (uiout, "signal-name",
|
||||
target_signal_to_name (stop_info));
|
||||
annotate_signal_name_end ();
|
||||
ui_out_text (uiout, ", ");
|
||||
annotate_signal_string ();
|
||||
ui_out_field_string (uiout, "signal-meaning", target_signal_to_string (stop_info));
|
||||
ui_out_field_string (uiout, "signal-meaning",
|
||||
target_signal_to_string (stop_info));
|
||||
annotate_signal_string_end ();
|
||||
ui_out_text (uiout, ".\n");
|
||||
break;
|
||||
|
@ -3441,8 +3435,7 @@ and/or watchpoints.\n");
|
|||
bpstat_print() contains the logic deciding in detail
|
||||
what to print, based on the event(s) that just occurred. */
|
||||
|
||||
if (stop_print_frame
|
||||
&& selected_frame)
|
||||
if (stop_print_frame && selected_frame)
|
||||
{
|
||||
int bpstat_ret;
|
||||
int source_flag;
|
||||
|
@ -3470,8 +3463,7 @@ and/or watchpoints.\n");
|
|||
do_frame_printing = 0;
|
||||
break;
|
||||
default:
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"Unknown value.");
|
||||
internal_error (__FILE__, __LINE__, "Unknown value.");
|
||||
}
|
||||
/* For mi, have the same behavior every time we stop:
|
||||
print everything but the source line. */
|
||||
|
@ -3543,7 +3535,8 @@ signal_pass_state (int signo)
|
|||
return signal_program[signo];
|
||||
}
|
||||
|
||||
int signal_stop_update (signo, state)
|
||||
int
|
||||
signal_stop_update (signo, state)
|
||||
int signo;
|
||||
int state;
|
||||
{
|
||||
|
@ -3552,7 +3545,8 @@ int signal_stop_update (signo, state)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int signal_print_update (signo, state)
|
||||
int
|
||||
signal_print_update (signo, state)
|
||||
int signo;
|
||||
int state;
|
||||
{
|
||||
|
@ -3561,7 +3555,8 @@ int signal_print_update (signo, state)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int signal_pass_update (signo, state)
|
||||
int
|
||||
signal_pass_update (signo, state)
|
||||
int signo;
|
||||
int state;
|
||||
{
|
||||
|
@ -3587,8 +3582,7 @@ sig_print_info (enum target_signal oursig)
|
|||
name_padding = 0;
|
||||
|
||||
printf_filtered ("%s", name);
|
||||
printf_filtered ("%*.*s ", name_padding, name_padding,
|
||||
" ");
|
||||
printf_filtered ("%*.*s ", name_padding, name_padding, " ");
|
||||
printf_filtered ("%s\t", signal_stop[oursig] ? "Yes" : "No");
|
||||
printf_filtered ("%s\t", signal_print[oursig] ? "Yes" : "No");
|
||||
printf_filtered ("%s\t\t", signal_program[oursig] ? "Yes" : "No");
|
||||
|
@ -3734,9 +3728,7 @@ handle_command (char *args, int from_tty)
|
|||
if (!allsigs && !sigs[signum])
|
||||
{
|
||||
if (query ("%s is used by the debugger.\n\
|
||||
Are you sure you want to change it? ",
|
||||
target_signal_to_name
|
||||
((enum target_signal) signum)))
|
||||
Are you sure you want to change it? ", target_signal_to_name ((enum target_signal) signum)))
|
||||
{
|
||||
sigs[signum] = 1;
|
||||
}
|
||||
|
@ -3880,8 +3872,7 @@ signals_info (char *signum_exp, int from_tty)
|
|||
QUIT;
|
||||
|
||||
if (oursig != TARGET_SIGNAL_UNKNOWN
|
||||
&& oursig != TARGET_SIGNAL_DEFAULT
|
||||
&& oursig != TARGET_SIGNAL_0)
|
||||
&& oursig != TARGET_SIGNAL_DEFAULT && oursig != TARGET_SIGNAL_0)
|
||||
sig_print_info (oursig);
|
||||
}
|
||||
|
||||
|
@ -4032,7 +4023,8 @@ restore_inferior_status (struct inferior_status *inf_status)
|
|||
/* The point of catch_errors is that if the stack is clobbered,
|
||||
walking the stack might encounter a garbage pointer and
|
||||
error() trying to dereference it. */
|
||||
if (catch_errors (restore_selected_frame, &inf_status->selected_frame_id,
|
||||
if (catch_errors
|
||||
(restore_selected_frame, &inf_status->selected_frame_id,
|
||||
"Unable to restore previously selected frame:\n",
|
||||
RETURN_MASK_ERROR) == 0)
|
||||
/* Error in restoring the selected frame. Select the innermost
|
||||
|
@ -4149,8 +4141,8 @@ save_inferior_ptid (void)
|
|||
*saved_ptid_ptr = inferior_ptid;
|
||||
return make_cleanup (restore_inferior_ptid, saved_ptid_ptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
build_infrun (void)
|
||||
{
|
||||
|
@ -4179,8 +4171,7 @@ Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\
|
|||
from 1-15 are allowed for compatibility with old versions of GDB.\n\
|
||||
Numeric ranges may be specified with the form LOW-HIGH (e.g. 1-5).\n\
|
||||
The special arg \"all\" is recognized to mean all signals except those\n\
|
||||
used by the debugger, typically SIGTRAP and SIGINT.\n",
|
||||
"Recognized actions include \"stop\", \"nostop\", \"print\", \"noprint\",\n\
|
||||
used by the debugger, typically SIGTRAP and SIGINT.\n", "Recognized actions include \"stop\", \"nostop\", \"print\", \"noprint\",\n\
|
||||
\"pass\", \"nopass\", \"ignore\", or \"noignore\".\n\
|
||||
Stop means reenter debugger if this signal happens (implies print).\n\
|
||||
Print means print a message if this signal happens.\n\
|
||||
|
@ -4199,8 +4190,7 @@ Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\
|
|||
from 1-15 are allowed for compatibility with old versions of GDB.\n\
|
||||
Numeric ranges may be specified with the form LOW-HIGH (e.g. 1-5).\n\
|
||||
The special arg \"all\" is recognized to mean all signals except those\n\
|
||||
used by the debugger, typically SIGTRAP and SIGINT.\n",
|
||||
"Recognized actions include \"s\" (toggles between stop and nostop), \n\
|
||||
used by the debugger, typically SIGTRAP and SIGINT.\n", "Recognized actions include \"s\" (toggles between stop and nostop), \n\
|
||||
\"r\" (toggles between print and noprint), \"i\" (toggles between pass and \
|
||||
nopass), \"Q\" (noprint)\n\
|
||||
Stop means reenter debugger if this signal happens (implies print).\n\
|
||||
|
@ -4211,14 +4201,13 @@ Pass and Stop may be combined.", NULL));
|
|||
}
|
||||
|
||||
if (!dbx_commands)
|
||||
stop_command = add_cmd ("stop", class_obscure, not_just_help_class_command,
|
||||
"There is no `stop' command, but you can set a hook on `stop'.\n\
|
||||
stop_command =
|
||||
add_cmd ("stop", class_obscure, not_just_help_class_command, "There is no `stop' command, but you can set a hook on `stop'.\n\
|
||||
This allows you to set a list of commands to be run each time execution\n\
|
||||
of the program stops.", &cmdlist);
|
||||
|
||||
numsigs = (int) TARGET_SIGNAL_LAST;
|
||||
signal_stop = (unsigned char *)
|
||||
xmalloc (sizeof (signal_stop[0]) * numsigs);
|
||||
signal_stop = (unsigned char *) xmalloc (sizeof (signal_stop[0]) * numsigs);
|
||||
signal_print = (unsigned char *)
|
||||
xmalloc (sizeof (signal_print[0]) * numsigs);
|
||||
signal_program = (unsigned char *)
|
||||
|
@ -4271,15 +4260,12 @@ of the program stops.", &cmdlist);
|
|||
"Set stopping for shared library events.\n\
|
||||
If nonzero, gdb will give control to the user when the dynamic linker\n\
|
||||
notifies gdb of shared library events. The most common event of interest\n\
|
||||
to the user would be loading/unloading of a new library.\n",
|
||||
&setlist),
|
||||
&showlist);
|
||||
to the user would be loading/unloading of a new library.\n", &setlist), &showlist);
|
||||
#endif
|
||||
|
||||
c = add_set_enum_cmd ("follow-fork-mode",
|
||||
class_run,
|
||||
follow_fork_mode_kind_names,
|
||||
&follow_fork_mode_string,
|
||||
follow_fork_mode_kind_names, &follow_fork_mode_string,
|
||||
/* ??rehrauer: The "both" option is broken, by what may be a 10.20
|
||||
kernel problem. It's also not terribly useful without a GUI to
|
||||
help the user drive two debuggers. So for now, I'm disabling
|
||||
|
@ -4305,20 +4291,17 @@ A fork or vfork creates a new process. follow-fork-mode can be:\n\
|
|||
child - the new process is debugged after a fork\n\
|
||||
ask - the debugger will ask for one of the above choices\n\
|
||||
For \"parent\" or \"child\", the unfollowed process will run free.\n\
|
||||
By default, the debugger will follow the parent process.",
|
||||
&setlist);
|
||||
By default, the debugger will follow the parent process.", &setlist);
|
||||
add_show_from_set (c, &showlist);
|
||||
|
||||
c = add_set_enum_cmd ("scheduler-locking", class_run,
|
||||
scheduler_enums, /* array of string names */
|
||||
c = add_set_enum_cmd ("scheduler-locking", class_run, scheduler_enums, /* array of string names */
|
||||
&scheduler_mode, /* current mode */
|
||||
"Set mode for locking scheduler during execution.\n\
|
||||
off == no locking (threads may preempt at any time)\n\
|
||||
on == full locking (no thread except the current thread may run)\n\
|
||||
step == scheduler locked during every single-step operation.\n\
|
||||
In this mode, no other thread may run during a step command.\n\
|
||||
Other threads may run while stepping over a function call ('next').",
|
||||
&setlist);
|
||||
Other threads may run while stepping over a function call ('next').", &setlist);
|
||||
|
||||
set_cmd_sfunc (c, set_schedlock_func); /* traps on target vector */
|
||||
add_show_from_set (c, &showlist);
|
||||
|
@ -4328,8 +4311,7 @@ step == scheduler locked during every single-step operation.\n\
|
|||
"Set mode of the step operation. When set, doing a step over a\n\
|
||||
function without debug line information will stop at the first\n\
|
||||
instruction of that function. Otherwise, the function is skipped and\n\
|
||||
the step command stops at a different source line.",
|
||||
&setlist);
|
||||
the step command stops at a different source line.", &setlist);
|
||||
add_show_from_set (c, &showlist);
|
||||
|
||||
/* ptid initializations */
|
||||
|
|
Loading…
Reference in a new issue