aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-04-08 18:52:04 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-04-08 18:52:04 +0000
commitc54cfec8d4215ef2b4f8019a3431749b44ee0247 (patch)
tree1a427559c4b7a76401c704d73cdee043ddb44d36 /gdb/infrun.c
parent9cc92a36ed6e61f930a367557dc8e92dcdda5a79 (diff)
downloadgdb-c54cfec8d4215ef2b4f8019a3431749b44ee0247.zip
gdb-c54cfec8d4215ef2b4f8019a3431749b44ee0247.tar.gz
gdb-c54cfec8d4215ef2b4f8019a3431749b44ee0247.tar.bz2
2003-04-08 Elena Zannoni <ezannoni@redhat.com>
* infrun.c (stop_soon_quietly): Make it an enum, to better override the default behavior of handle_inferior_event. (clear_proceed_status): Update uses of stop_soon_quietly to reflect that it is now an enum. (start_remote): Ditto. (handle_inferior_event): Change logic a bit if stop_soon_quietly is set to handle the new GNU/Linux kernel behavior for attach/sigstop. Update uses of stop_soon_quietly. * inferior.h (enum stop_kind): New enum. * infcmd.c (attach_command): Use STOP_QUIETLY_NO_SIGSTOP. Reset normal handle_inferior_event behavior, afterwards. * fork-child.c (startup_inferior): Update. * alpha-tdep.c (heuristic_proc_start): Update. * solib-svr4.c (svr4_solib_create_inferior_hook): Update. * solib-sunos.c (sunos_solib_create_inferior_hook): Update. * solib-osf.c (osf_solib_create_inferior_hook): Update. * solib-irix.c (irix_solib_create_inferior_hook): Update. * remote-vx.c (vx_create_inferior): Update. * mips-tdep.c (heuristic_proc_start): Update.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 74f1de1..92bbcdd 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -286,7 +286,7 @@ int stop_after_trap;
when running in the shell before the child program has been exec'd;
and when running some kinds of remote stuff (FIXME?). */
-int stop_soon_quietly;
+enum stop_kind stop_soon_quietly;
/* Nonzero if proceed is being used for a "finish" command or a similar
situation when stop_registers should be saved. */
@@ -659,7 +659,7 @@ clear_proceed_status (void)
step_frame_id = null_frame_id;
step_over_calls = STEP_OVER_UNDEBUGGABLE;
stop_after_trap = 0;
- stop_soon_quietly = 0;
+ stop_soon_quietly = NO_STOP_QUIETLY;
proceed_to_finish = 0;
breakpoint_proceeded = 1; /* We're about to proceed... */
@@ -802,7 +802,7 @@ start_remote (void)
{
init_thread_list ();
init_wait_for_inferior ();
- stop_soon_quietly = 1;
+ stop_soon_quietly = STOP_QUIETLY;
trap_expected = 0;
/* Always go on waiting for the target, regardless of the mode. */
@@ -1258,7 +1258,7 @@ handle_inferior_event (struct execution_control_state *ecs)
might be the shell which has just loaded some objects,
otherwise add the symbols for the newly loaded objects. */
#ifdef SOLIB_ADD
- if (!stop_soon_quietly)
+ if (stop_soon_quietly == NO_STOP_QUIETLY)
{
/* Remove breakpoints, SOLIB_ADD might adjust
breakpoint addresses via breakpoint_re_set. */
@@ -1757,7 +1757,9 @@ 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 == STOP_QUIETLY
+ || stop_soon_quietly == STOP_QUIETLY_NO_SIGSTOP)
{
if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
{
@@ -1765,12 +1767,27 @@ handle_inferior_event (struct execution_control_state *ecs)
stop_stepping (ecs);
return;
}
- if (stop_soon_quietly)
+
+ /* This is originated from start_remote(), start_inferior() and
+ shared libraries hook functions. */
+ if (stop_soon_quietly == STOP_QUIETLY)
{
stop_stepping (ecs);
return;
}
+ /* This originates from attach_command(). We need to overwrite
+ the stop_signal here, because some kernels don't ignore a
+ SIGSTOP in a subsequent ptrace(PTRACE_SONT,SOGSTOP) call.
+ See more comments in inferior.h. */
+ if (stop_soon_quietly == STOP_QUIETLY_NO_SIGSTOP)
+ {
+ stop_stepping (ecs);
+ if (stop_signal == TARGET_SIGNAL_STOP)
+ stop_signal = TARGET_SIGNAL_0;
+ return;
+ }
+
/* Don't even think about breakpoints
if just proceeded over a breakpoint.