aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-05-09 14:25:37 +0000
committerPedro Alves <palves@redhat.com>2011-05-09 14:25:37 +0000
commite4c8541fca4c7a63ffdabf9b43798c0f9ac2665f (patch)
tree6144a270cced46b513be921522226e9834a8fe49 /gdb/infrun.c
parentfbd9ad907dc6a283dc1bec51ecd91355ac866949 (diff)
downloadgdb-e4c8541fca4c7a63ffdabf9b43798c0f9ac2665f.zip
gdb-e4c8541fca4c7a63ffdabf9b43798c0f9ac2665f.tar.gz
gdb-e4c8541fca4c7a63ffdabf9b43798c0f9ac2665f.tar.bz2
2011-05-09 Pedro Alves <pedro@codesourcery.com>
* inferior.h (wait_for_inferior): Remove `thread_exec_as_sigtrap' parameter. * infrun.c (proceed, start_remote): Adjust. (wait_for_inferior): Remove `thread_exec_as_sigtrap' parameter, and adjust to not handle it. * solib-irix.c (irix_solib_create_inferior_hook): Adjust. * solib-osf.c (osf_solib_create_inferior_hook): Adjust. * solib-sunos.c (sunos_solib_create_inferior_hook): Adjust. * solib-svr4.c (svr4_solib_create_inferior_hook): Adjust. * windows-nat.c (do_initial_windows_stuff): Adjust. * infcmd.c (attach_command): Adjust. (notice_new_inferior): Adjust.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 2d6d523..3b779de 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2205,7 +2205,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
does not support asynchronous execution. */
if (!target_can_async_p ())
{
- wait_for_inferior (0);
+ wait_for_inferior ();
normal_stop ();
}
}
@@ -2236,7 +2236,7 @@ start_remote (int from_tty)
target_open() return to the caller an indication that the target
is currently running and GDB state should be set to the same as
for an async run. */
- wait_for_inferior (0);
+ wait_for_inferior ();
/* Now that the inferior has stopped, do any bookkeeping like
loading shared libraries. We want to do this before normal_stop,
@@ -2604,18 +2604,13 @@ prepare_for_detach (void)
/* Wait for control to return from inferior to debugger.
- If TREAT_EXEC_AS_SIGTRAP is non-zero, then handle EXEC signals
- as if they were SIGTRAP signals. This can be useful during
- the startup sequence on some targets such as HP/UX, where
- we receive an EXEC event instead of the expected SIGTRAP.
-
If inferior gets a signal, we may decide to start it up again
instead of returning. That is why there is a loop in this function.
When this function actually returns it means the inferior
should be left stopped and GDB should read more commands. */
void
-wait_for_inferior (int treat_exec_as_sigtrap)
+wait_for_inferior (void)
{
struct cleanup *old_cleanups;
struct execution_control_state ecss;
@@ -2623,8 +2618,7 @@ wait_for_inferior (int treat_exec_as_sigtrap)
if (debug_infrun)
fprintf_unfiltered
- (gdb_stdlog, "infrun: wait_for_inferior (treat_exec_as_sigtrap=%d)\n",
- treat_exec_as_sigtrap);
+ (gdb_stdlog, "infrun: wait_for_inferior ()\n");
old_cleanups =
make_cleanup (delete_step_thread_step_resume_breakpoint_cleanup, NULL);
@@ -2656,13 +2650,6 @@ wait_for_inferior (int treat_exec_as_sigtrap)
if (debug_infrun)
print_target_wait_results (waiton_ptid, ecs->ptid, &ecs->ws);
- if (treat_exec_as_sigtrap && ecs->ws.kind == TARGET_WAITKIND_EXECD)
- {
- xfree (ecs->ws.value.execd_pathname);
- ecs->ws.kind = TARGET_WAITKIND_STOPPED;
- ecs->ws.value.sig = TARGET_SIGNAL_TRAP;
- }
-
/* If an error happens while handling the event, propagate GDB's
knowledge of the executing state to the frontend/user running
state. */