cosmetic fixups, mainly long lines.

This commit is contained in:
Michael Snyder 1999-01-06 03:06:20 +00:00
parent d036abbfd1
commit 1f205f9d6e
1 changed files with 181 additions and 139 deletions

View File

@ -387,7 +387,8 @@ follow_inferior_fork (parent_pid, child_pid, has_forked, has_vforked)
from the breakpoint package's viewpoint, that's a switch of from the breakpoint package's viewpoint, that's a switch of
"threads". We must update the bp's notion of which thread "threads". We must update the bp's notion of which thread
it is for, or it'll be ignored when it triggers... */ 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); breakpoint_re_set_thread (step_resume_breakpoint);
/* Reinsert all breakpoints in the child. (The user may've set /* Reinsert all breakpoints in the child. (The user may've set
@ -503,7 +504,8 @@ follow_exec (pid, execd_pathname)
/* Did this exec() follow a vfork()? If so, we must follow the /* Did this exec() follow a vfork()? If so, we must follow the
vfork now too. Do it before following the exec. */ vfork now too. Do it before following the exec. */
if (follow_vfork_when_exec && (pending_follow.kind == TARGET_WAITKIND_VFORKED)) if (follow_vfork_when_exec &&
(pending_follow.kind == TARGET_WAITKIND_VFORKED))
{ {
pending_follow.kind = TARGET_WAITKIND_SPURIOUS; pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
follow_vfork (inferior_pid, pending_follow.fork_event.child_pid); follow_vfork (inferior_pid, pending_follow.fork_event.child_pid);
@ -659,7 +661,8 @@ resume (step, sig)
If so, then it actually ought to be waiting for us; we respond to If so, then it actually ought to be waiting for us; we respond to
parent vfork events. We don't actually want to resume the child parent vfork events. We don't actually want to resume the child
in this situation; we want to just get its exec event. */ in this situation; we want to just get its exec event. */
if (! saw_child_exec && (inferior_pid == pending_follow.fork_event.child_pid)) if (! saw_child_exec &&
(inferior_pid == pending_follow.fork_event.child_pid))
should_resume = 0; should_resume = 0;
} }
break; break;
@ -993,8 +996,8 @@ wait_for_inferior ()
|| trap_expected)) \ || trap_expected)) \
|| stepping_through_solib_after_catch \ || stepping_through_solib_after_catch \
|| bpstat_should_step ()) || bpstat_should_step ())
;
thread_step_needed = 0; thread_step_needed = 0;
#ifdef HPUXHPPA #ifdef HPUXHPPA
/* We'll update this if & when we switch to a new thread. */ /* We'll update this if & when we switch to a new thread. */
@ -1058,20 +1061,32 @@ stepped_after_stopped_by_watchpoint = 0;
#ifdef HPUXHPPA #ifdef HPUXHPPA
fprintf_unfiltered (gdb_stderr, "[New %s]\n", target_pid_or_tid_to_str (pid)); fprintf_unfiltered (gdb_stderr, "[New %s]\n",
target_pid_or_tid_to_str (pid));
#else #else
printf_filtered ("[New %s]\n", target_pid_to_str (pid)); printf_filtered ("[New %s]\n", target_pid_to_str (pid));
#endif #endif
#if 0 #if 0
/* We may want to consider not doing a resume here in order to give /* NOTE: This block is ONLY meant to be invoked in case of a
the user a chance to play with the new thread. It might be good "thread creation event"! If it is invoked for any other
to make that a user-settable option. */ 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. */
/* At this point, all threads are stopped (happens automatically in /* We may want to consider not doing a resume here in order
either the OS or the native code). Therefore we need to continue to give the user a chance to play with the new thread.
all threads in order to make progress. */ 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 (-1, 0, TARGET_SIGNAL_0); target_resume (-1, 0, TARGET_SIGNAL_0);
continue; continue;
@ -1192,14 +1207,15 @@ stepped_after_stopped_by_watchpoint = 0;
stop_pc = read_pc_pid (pid); stop_pc = read_pc_pid (pid);
saved_inferior_pid = inferior_pid; saved_inferior_pid = inferior_pid;
inferior_pid = pid; inferior_pid = pid;
stop_bpstat = bpstat_stop_status (&stop_pc, stop_bpstat = bpstat_stop_status
(&stop_pc,
#if DECR_PC_AFTER_BREAK #if DECR_PC_AFTER_BREAK
(prev_pc != stop_pc - DECR_PC_AFTER_BREAK (prev_pc != stop_pc - DECR_PC_AFTER_BREAK
&& CURRENTLY_STEPPING ()) && CURRENTLY_STEPPING ())
#else /* DECR_PC_AFTER_BREAK zero */ #else /* DECR_PC_AFTER_BREAK zero */
0 0
#endif /* DECR_PC_AFTER_BREAK zero */ #endif /* DECR_PC_AFTER_BREAK zero */
); );
random_signal = ! bpstat_explains_signal (stop_bpstat); random_signal = ! bpstat_explains_signal (stop_bpstat);
inferior_pid = saved_inferior_pid; inferior_pid = saved_inferior_pid;
goto process_event_stop_test; goto process_event_stop_test;
@ -1246,14 +1262,15 @@ stepped_after_stopped_by_watchpoint = 0;
} }
stop_pc = read_pc (); stop_pc = read_pc ();
stop_bpstat = bpstat_stop_status (&stop_pc, stop_bpstat = bpstat_stop_status
(&stop_pc,
#if DECR_PC_AFTER_BREAK #if DECR_PC_AFTER_BREAK
(prev_pc != stop_pc - DECR_PC_AFTER_BREAK (prev_pc != stop_pc - DECR_PC_AFTER_BREAK
&& CURRENTLY_STEPPING ()) && CURRENTLY_STEPPING ())
#else /* DECR_PC_AFTER_BREAK zero */ #else /* DECR_PC_AFTER_BREAK zero */
0 0
#endif /* DECR_PC_AFTER_BREAK zero */ #endif /* DECR_PC_AFTER_BREAK zero */
); );
random_signal = ! bpstat_explains_signal (stop_bpstat); random_signal = ! bpstat_explains_signal (stop_bpstat);
goto process_event_stop_test; goto process_event_stop_test;
@ -1303,7 +1320,8 @@ stepped_after_stopped_by_watchpoint = 0;
suffices. */ suffices. */
if (RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK()) if (RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK())
target_resume (pid, 1, TARGET_SIGNAL_0); target_resume (pid, 1, TARGET_SIGNAL_0);
continue; /* We expect the parent vfork event to be available now. */ /* We expect the parent vfork event to be available now. */
continue;
} }
/* This causes the eventpoints and symbol table to be reset. Must /* This causes the eventpoints and symbol table to be reset. Must
@ -1314,14 +1332,15 @@ stepped_after_stopped_by_watchpoint = 0;
stop_pc = read_pc_pid (pid); stop_pc = read_pc_pid (pid);
saved_inferior_pid = inferior_pid; saved_inferior_pid = inferior_pid;
inferior_pid = pid; inferior_pid = pid;
stop_bpstat = bpstat_stop_status (&stop_pc, stop_bpstat = bpstat_stop_status
(&stop_pc,
#if DECR_PC_AFTER_BREAK #if DECR_PC_AFTER_BREAK
(prev_pc != stop_pc - DECR_PC_AFTER_BREAK (prev_pc != stop_pc - DECR_PC_AFTER_BREAK
&& CURRENTLY_STEPPING ()) && CURRENTLY_STEPPING ())
#else /* DECR_PC_AFTER_BREAK zero */ #else /* DECR_PC_AFTER_BREAK zero */
0 0
#endif /* DECR_PC_AFTER_BREAK zero */ #endif /* DECR_PC_AFTER_BREAK zero */
); );
random_signal = ! bpstat_explains_signal (stop_bpstat); random_signal = ! bpstat_explains_signal (stop_bpstat);
inferior_pid = saved_inferior_pid; inferior_pid = saved_inferior_pid;
goto process_event_stop_test; goto process_event_stop_test;
@ -1353,19 +1372,19 @@ stepped_after_stopped_by_watchpoint = 0;
continue; continue;
/* Before examining the threads further, step this thread to /* Before examining the threads further, step this thread to
get it entirely out of the syscall. (We get notice of the get it entirely out of the syscall. (We get notice of the
event when the thread is just on the verge of exiting a event when the thread is just on the verge of exiting a
syscall. Stepping one instruction seems to get it back syscall. Stepping one instruction seems to get it back
into user code.) into user code.)
Note that although the logical place to reenable h/w watches Note that although the logical place to reenable h/w watches
is here, we cannot. We cannot reenable them before stepping is here, we cannot. We cannot reenable them before stepping
the thread (this causes the next wait on the thread to hang). the thread (this causes the next wait on the thread to hang).
Nor can we enable them after stepping until we've done a Nor can we enable them after stepping until we've done a wait.
wait. Thus, we simply set the flag enable_hw_watchpoints_after_wait Thus, we simply set the flag enable_hw_watchpoints_after_wait
here, which will be serviced immediately after the target here, which will be serviced immediately after the target
is waited on. */ is waited on. */
case TARGET_WAITKIND_SYSCALL_RETURN: case TARGET_WAITKIND_SYSCALL_RETURN:
target_resume (pid, 1, TARGET_SIGNAL_0); target_resume (pid, 1, TARGET_SIGNAL_0);
@ -1410,50 +1429,53 @@ stepped_after_stopped_by_watchpoint = 0;
&& breakpoint_here_p (stop_pc - DECR_PC_AFTER_BREAK)) && breakpoint_here_p (stop_pc - DECR_PC_AFTER_BREAK))
{ {
random_signal = 0; random_signal = 0;
if (!breakpoint_thread_match (stop_pc - DECR_PC_AFTER_BREAK, pid)) if (!breakpoint_thread_match (stop_pc - DECR_PC_AFTER_BREAK,
pid))
{ {
int remove_status; int remove_status;
/* Saw a breakpoint, but it was hit by the wrong thread. Just continue. */ /* Saw a breakpoint, but it was hit by the wrong thread.
Just continue. */
write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK, pid); write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK, pid);
remove_status = remove_breakpoints (); remove_status = remove_breakpoints ();
/* Did we fail to remove breakpoints? If so, try to set the /* Did we fail to remove breakpoints? If so, try
PC past the bp. (There's at least one situation in which to set the PC past the bp. (There's at least
we can fail to remove the bp's: On HP-UX's that use ttrace, one situation in which we can fail to remove
we can't change the address space of a vforking child process the bp's: On HP-UX's that use ttrace, we can't
until the child exits (well, okay, not then either :-) or change the address space of a vforking child
execs. */ process until the child exits (well, okay, not
if (remove_status != 0) then either :-) or execs. */
{ if (remove_status != 0)
write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK + 4, pid); {
} write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK + 4, pid);
else }
{
target_resume (pid, 1, TARGET_SIGNAL_0); /* Single step */
/* FIXME: What if a signal arrives instead of the single-step
happening? */
if (target_wait_hook)
target_wait_hook (pid, &w);
else else
target_wait (pid, &w); { /* Single step */
insert_breakpoints (); target_resume (pid, 1, TARGET_SIGNAL_0);
} /* FIXME: What if a signal arrives instead of the
single-step happening? */
if (target_wait_hook)
target_wait_hook (pid, &w);
else
target_wait (pid, &w);
insert_breakpoints ();
}
/* We need to restart all the threads now. */ /* We need to restart all the threads now. */
target_resume (-1, 0, TARGET_SIGNAL_0); target_resume (-1, 0, TARGET_SIGNAL_0);
continue; continue;
} }
else else
{ {
/* This breakpoint matches--either it is the right /* This breakpoint matches--either it is the right
thread or it's a generic breakpoint for all threads. thread or it's a generic breakpoint for all threads.
Remember that we'll need to step just _this_ thread Remember that we'll need to step just _this_ thread
on any following user continuation! */ on any following user continuation! */
thread_step_needed = 1; thread_step_needed = 1;
} }
} }
} }
else else
random_signal = 1; random_signal = 1;
@ -1962,13 +1984,15 @@ process_event_stop_test:
/* This proably demands a more elegant solution, but, yeah /* This proably demands a more elegant solution, but, yeah
right... right...
This function's use of the simple variable step_resume_breakpoint This function's use of the simple variable
doesn't seem to accomodate simultaneously active step-resume bp's, step_resume_breakpoint doesn't seem to accomodate
although the breakpoint list certainly can. simultaneously active step-resume bp's, although the
breakpoint list certainly can.
If we reach here and step_resume_breakpoint is already NULL, then If we reach here and step_resume_breakpoint is already
apparently we have multiple active step-resume bp's. We'll just NULL, then apparently we have multiple active
delete the breakpoint we stopped at, and carry on. */ step-resume bp's. We'll just delete the breakpoint we
stopped at, and carry on. */
if (step_resume_breakpoint == NULL) if (step_resume_breakpoint == NULL)
{ {
step_resume_breakpoint = step_resume_breakpoint =
@ -2117,7 +2141,8 @@ process_event_stop_test:
just stop silently, unless the user was doing an si/ni, in which just stop silently, unless the user was doing an si/ni, in which
case she'd better know what she's doing. */ case she'd better know what she's doing. */
if (CALL_DUMMY_HAS_COMPLETED (stop_pc, read_sp (), FRAME_FP (get_current_frame ())) if (CALL_DUMMY_HAS_COMPLETED (stop_pc, read_sp (),
FRAME_FP (get_current_frame ()))
&& !step_range_end) && !step_range_end)
{ {
stop_print_frame = 0; stop_print_frame = 0;
@ -2151,8 +2176,8 @@ process_event_stop_test:
if (stop_pc >= step_range_start if (stop_pc >= step_range_start
&& stop_pc < step_range_end && stop_pc < step_range_end
#if 0 #if 0
/* I haven't a clue what might trigger this clause, and it seems wrong anyway, /* I haven't a clue what might trigger this clause, and it seems wrong
so I've disabled it until someone complains. -Stu 10/24/95 */ anyway, so I've disabled it until someone complains. -Stu 10/24/95 */
/* The step range might include the start of the /* The step range might include the start of the
function, so if we are at the start of the function, so if we are at the start of the
@ -2201,7 +2226,7 @@ process_event_stop_test:
{ {
CORE_ADDR current_frame = FRAME_FP (get_current_frame()); CORE_ADDR current_frame = FRAME_FP (get_current_frame());
if (INNER_THAN (current_frame, step_frame_address)) if (INNER_THAN (current_frame, step_frame_address))
{ {
@ -2223,7 +2248,8 @@ process_event_stop_test:
sr_sal.line = 0; sr_sal.line = 0;
sr_sal.pc = prev_pc; sr_sal.pc = prev_pc;
/* We could probably be setting the frame to /* We could probably be setting the frame to
step_frame_address; I don't think anyone thought to try it. */ step_frame_address; I don't think anyone thought to
try it. */
step_resume_breakpoint = step_resume_breakpoint =
set_momentary_breakpoint (sr_sal, NULL, bp_step_resume); set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
if (breakpoints_inserted) if (breakpoints_inserted)
@ -2231,18 +2257,21 @@ process_event_stop_test:
} }
else else
{ {
/* We just stepped out of a signal handler and into its calling /* We just stepped out of a signal handler and into
trampoline. its calling trampoline.
Normally, we'd jump to step_over_function from here, Normally, we'd jump to step_over_function from
but for some reason GDB can't unwind the stack correctly to find here, but for some reason GDB can't unwind the
the real PC for the point user code where the signal trampoline will stack correctly to find the real PC for the point
return -- FRAME_SAVED_PC fails, at least on HP-UX 10.20. But signal user code where the signal trampoline will return
trampolines are pretty small stubs of code, anyway, so it's OK instead -- FRAME_SAVED_PC fails, at least on HP-UX 10.20.
to just single-step out. Note: assuming such trampolines don't But signal trampolines are pretty small stubs of
exhibit recursion on any platform... */ code, anyway, so it's OK instead to just
find_pc_partial_function (stop_pc, &stop_func_name, &stop_func_start, single-step out. Note: assuming such trampolines
&stop_func_end); don't exhibit recursion on any platform... */
find_pc_partial_function (stop_pc, &stop_func_name,
&stop_func_start,
&stop_func_end);
/* Readjust stepping range */ /* Readjust stepping range */
step_range_start = stop_func_start; step_range_start = stop_func_start;
step_range_end = stop_func_end; step_range_end = stop_func_end;
@ -2264,11 +2293,12 @@ process_event_stop_test:
} }
#if 0 #if 0
/* I disabled this test because it was too complicated and slow. The /* I disabled this test because it was too complicated and slow.
SKIP_PROLOGUE was especially slow, because it caused unnecessary The SKIP_PROLOGUE was especially slow, because it caused
prologue examination on various architectures. The code in the #else unnecessary prologue examination on various architectures.
clause has been tested on the Sparc, Mips, PA, and Power The code in the #else clause has been tested on the Sparc,
architectures, so it's pretty likely to be correct. -Stu 10/24/95 */ Mips, PA, and Power architectures, so it's pretty likely to
be correct. -Stu 10/24/95 */
/* See if we left the step range due to a subroutine call that /* See if we left the step range due to a subroutine call that
we should proceed to the end of. */ we should proceed to the end of. */
@ -2287,7 +2317,8 @@ process_event_stop_test:
SKIP_PROLOGUE (prologue_pc); SKIP_PROLOGUE (prologue_pc);
} }
if (!(INNER_THAN (step_sp, read_sp ())) /* don't mistake (sig)return as a call */ if (!(INNER_THAN (step_sp, read_sp ())) /* don't mistake (sig)return
as a call */
&& (/* Might be a non-recursive call. If the symbols are missing && (/* Might be a non-recursive call. If the symbols are missing
enough that stop_func_start == prev_func_start even though enough that stop_func_start == prev_func_start even though
they are really two functions, we will treat some calls as they are really two functions, we will treat some calls as
@ -2421,29 +2452,32 @@ step_over_function:
step_resume_breakpoint = step_resume_breakpoint =
set_momentary_breakpoint (sr_sal, set_momentary_breakpoint (sr_sal,
stopped_by_random_signal ? NULL : get_current_frame (), stopped_by_random_signal ?
NULL : get_current_frame (),
bp_step_resume); bp_step_resume);
/* We've just entered a callee, and we wish to resume until /* We've just entered a callee, and we wish to resume until
it returns to the caller. Setting a step_resume bp on it returns to the caller. Setting a step_resume bp on
the return PC will catch a return from the callee. the return PC will catch a return from the callee.
However, if the callee is recursing, we want to be careful However, if the callee is recursing, we want to be
not to catch returns of those recursive calls, but of THIS careful not to catch returns of those recursive calls,
instance of the call. but of THIS instance of the call.
To do this, we set the step_resume bp's frame to our current To do this, we set the step_resume bp's frame to our
caller's frame (step_frame_address, which is set by the "next" current caller's frame (step_frame_address, which is
or "until" command, before execution begins). set by the "next" or "until" command, before execution
begins).
But ... don't do it if we're single-stepping out of a sigtramp, But ... don't do it if we're single-stepping out of a
because the reason we're single-stepping is precisely because sigtramp, because the reason we're single-stepping is
unwinding is a problem (HP-UX 10.20, e.g.) and the frame address precisely because unwinding is a problem (HP-UX 10.20,
is likely to be incorrect. No danger of sigtramp recursion */ e.g.) and the frame address is likely to be incorrect.
No danger of sigtramp recursion. */
if (stepping_through_sigtramp) if (stepping_through_sigtramp)
{ {
step_resume_breakpoint->frame = NULL; step_resume_breakpoint->frame = (CORE_ADDR) NULL;
stepping_through_sigtramp = 0; stepping_through_sigtramp = 0;
} }
else if (!IN_SOLIB_DYNSYM_RESOLVE_CODE (sr_sal.pc)) else if (!IN_SOLIB_DYNSYM_RESOLVE_CODE (sr_sal.pc))
@ -2717,9 +2751,9 @@ step_into_function:
stop_signal = TARGET_SIGNAL_0; stop_signal = TARGET_SIGNAL_0;
#ifdef SHIFT_INST_REGS #ifdef SHIFT_INST_REGS
/* I'm not sure when this following segment applies. I do know, now, /* I'm not sure when this following segment applies. I do know,
that we shouldn't rewrite the regs when we were stopped by a now, that we shouldn't rewrite the regs when we were stopped
random signal from the inferior process. */ by a random signal from the inferior process. */
/* FIXME: Shouldn't this be based on the valid bit of the SXIP? /* FIXME: Shouldn't this be based on the valid bit of the SXIP?
(this is only used on the 88k). */ (this is only used on the 88k). */
@ -2857,7 +2891,8 @@ normal_stop ()
target_has_execution) target_has_execution)
{ {
target_terminal_ours_for_output (); target_terminal_ours_for_output ();
printf_filtered ("[Switched to %s]\n", target_pid_or_tid_to_str (inferior_pid)); printf_filtered ("[Switched to %s]\n",
target_pid_or_tid_to_str (inferior_pid));
switched_from_inferior_pid = inferior_pid; switched_from_inferior_pid = inferior_pid;
} }
#endif #endif
@ -2881,9 +2916,10 @@ The same program may be running in another process.\n");
if (remove_breakpoints ()) if (remove_breakpoints ())
{ {
target_terminal_ours_for_output (); target_terminal_ours_for_output ();
printf_filtered ("Cannot remove breakpoints because program is no longer writable.\n\ printf_filtered ("Cannot remove breakpoints because ");
It might be running in another process.\n\ printf_filtered ("program is no longer writable.\n");
Further execution is probably impossible.\n"); printf_filtered ("It might be running in another process.\n");
printf_filtered ("Further execution is probably impossible.\n");
} }
} }
breakpoints_inserted = 0; breakpoints_inserted = 0;
@ -2990,9 +3026,9 @@ Further execution is probably impossible.\n");
POP_FRAME ends with a setting of the current frame, so we POP_FRAME ends with a setting of the current frame, so we
can use that next. */ can use that next. */
POP_FRAME; POP_FRAME;
/* Set stop_pc to what it was before we called the function. Can't rely /* Set stop_pc to what it was before we called the function.
on restore_inferior_status because that only gets called if we don't Can't rely on restore_inferior_status because that only gets
stop in the called function. */ called if we don't stop in the called function. */
stop_pc = read_pc(); stop_pc = read_pc();
select_frame (get_current_frame (), 0); select_frame (get_current_frame (), 0);
} }
@ -3047,7 +3083,8 @@ sig_print_info (oursig)
name_padding = 0; name_padding = 0;
printf_filtered ("%s", name); 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_stop[oursig] ? "Yes" : "No");
printf_filtered ("%s\t", signal_print[oursig] ? "Yes" : "No"); printf_filtered ("%s\t", signal_print[oursig] ? "Yes" : "No");
printf_filtered ("%s\t\t", signal_program[oursig] ? "Yes" : "No"); printf_filtered ("%s\t\t", signal_program[oursig] ? "Yes" : "No");
@ -3146,17 +3183,18 @@ handle_command (args, from_tty)
} }
else if (digits > 0) else if (digits > 0)
{ {
/* It is numeric. The numeric signal refers to our own internal /* It is numeric. The numeric signal refers to our own
signal numbering from target.h, not to host/target signal number. internal signal numbering from target.h, not to host/target
This is a feature; users really should be using symbolic names signal number. This is a feature; users really should be
anyway, and the common ones like SIGHUP, SIGINT, SIGALRM, etc. using symbolic names anyway, and the common ones like
will work right anyway. */ SIGHUP, SIGINT, SIGALRM, etc. will work right anyway. */
sigfirst = siglast = (int) target_signal_from_command (atoi (*argv)); sigfirst = siglast = (int)
target_signal_from_command (atoi (*argv));
if ((*argv)[digits] == '-') if ((*argv)[digits] == '-')
{ {
siglast = siglast = (int)
(int) target_signal_from_command (atoi ((*argv) + digits + 1)); target_signal_from_command (atoi ((*argv) + digits + 1));
} }
if (sigfirst > siglast) if (sigfirst > siglast)
{ {
@ -3252,7 +3290,7 @@ xdb_handle_command (args, from_tty)
{ {
nomem (0); nomem (0);
} }
old_chain = make_cleanup (freeargv, (char *) argv); old_chain = make_cleanup ((make_cleanup_func) freeargv, (char *) argv);
if (argv[1] != (char *)NULL) if (argv[1] != (char *)NULL)
{ {
char *argBuf; char *argBuf;
@ -3415,11 +3453,13 @@ restore_selected_frame (args)
/* If inf_status->selected_frame_address is NULL, there was no /* If inf_status->selected_frame_address is NULL, there was no
previously selected frame. */ previously selected frame. */
if (frame == NULL || if (frame == NULL ||
/* FRAME_FP (frame) != fr->frame_address ||*/ /* elz: deleted this check as a quick fix /* FRAME_FP (frame) != fr->frame_address || */
to the problem that for function called by hand /* elz: deleted this check as a quick fix to the problem that
gdb creates no internal frame structure for function called by hand gdb creates no internal frame
and the real stack and gdb's idea of stack structure and the real stack and gdb's idea of stack are
are different if nested calls by hands are made*/ different if nested calls by hands are made.
mvs: this worries me. */
level != 0) level != 0)
{ {
warning ("Unable to restore previously selected frame.\n"); warning ("Unable to restore previously selected frame.\n");
@ -3620,8 +3660,9 @@ to the user would be loading/unloading of a new library.\n",
/* ??rehrauer: The "both" option is broken, by what may be a 10.20 /* ??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 kernel problem. It's also not terribly useful without a GUI to
help the user drive two debuggers. So for now, I'm disabling help the user drive two debuggers. So for now, I'm disabling
the "both" option. the "both" option. */
/* "Set debugger response to a program call of fork or vfork.\n\ /* "Set debugger response to a program call of fork \
or vfork.\n\
A fork or vfork creates a new process. follow-fork-mode can be:\n\ A fork or vfork creates a new process. follow-fork-mode can be:\n\
parent - the original process is debugged after a fork\n\ parent - the original process is debugged after a fork\n\
child - the new process is debugged after a fork\n\ child - the new process is debugged after a fork\n\
@ -3634,7 +3675,8 @@ debugger copy's prompt will be changed.\n\
For \"parent\" or \"child\", the unfollowed process will run free.\n\ For \"parent\" or \"child\", the unfollowed process will run free.\n\
By default, the debugger will follow the parent process.", By default, the debugger will follow the parent process.",
*/ */
"Set debugger response to a program call of fork or vfork.\n\ "Set debugger response to a program call of fork \
or vfork.\n\
A fork or vfork creates a new process. follow-fork-mode can be:\n\ A fork or vfork creates a new process. follow-fork-mode can be:\n\
parent - the original process is debugged after a fork\n\ parent - the original process is debugged after a fork\n\
child - the new process is debugged after a fork\n\ child - the new process is debugged after a fork\n\