diff options
author | Jason Molenda <jmolenda@apple.com> | 2000-01-06 03:07:20 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2000-01-06 03:07:20 +0000 |
commit | c3f6f71df382eaaaac4440a91e6f310d03fb8da6 (patch) | |
tree | f4c8a0660080321182558bd52319654a94e01ea5 /gdb/infrun.c | |
parent | 1b45fe546b666d1bd83d474b66525f1a69dbd92f (diff) | |
download | gdb-c3f6f71df382eaaaac4440a91e6f310d03fb8da6.zip gdb-c3f6f71df382eaaaac4440a91e6f310d03fb8da6.tar.gz gdb-c3f6f71df382eaaaac4440a91e6f310d03fb8da6.tar.bz2 |
import gdb-2000-01-05 snapshot
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 591f819..be1e6c7 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -92,17 +92,7 @@ int sync_execution = 0; when the inferior stopped in a different thread than it had been running in. */ -static int switched_from_inferior_pid; - -/* This will be true for configurations that may actually report an - inferior pid different from the original. At present this is only - true for HP-UX native. */ - -#ifndef MAY_SWITCH_FROM_INFERIOR_PID -#define MAY_SWITCH_FROM_INFERIOR_PID (0) -#endif - -static int may_switch_from_inferior_pid = MAY_SWITCH_FROM_INFERIOR_PID; +static int previous_inferior_pid; /* This is true for configurations that may follow through execl() and similar functions. At present this is only true for HP-UX native. */ @@ -1250,8 +1240,7 @@ wait_for_inferior (void) thread_step_needed = 0; /* We'll update this if & when we switch to a new thread. */ - if (may_switch_from_inferior_pid) - switched_from_inferior_pid = inferior_pid; + previous_inferior_pid = inferior_pid; overlay_cache_invalid = 1; @@ -1312,8 +1301,7 @@ fetch_inferior_event (client_data) thread_step_needed = 0; /* We'll update this if & when we switch to a new thread. */ - if (may_switch_from_inferior_pid) - switched_from_inferior_pid = inferior_pid; + previous_inferior_pid = inferior_pid; overlay_cache_invalid = 1; @@ -1944,15 +1932,12 @@ handle_inferior_event (struct execution_control_state *ecs) &ecs->stepping_through_solib_catchpoints, &ecs->stepping_through_sigtramp); } - if (may_switch_from_inferior_pid) - switched_from_inferior_pid = inferior_pid; inferior_pid = ecs->pid; if (context_hook) context_hook (pid_to_thread_id (ecs->pid)); - printf_filtered ("[Switching to %s]\n", target_pid_to_str (ecs->pid)); flush_cached_frames (); } @@ -3300,14 +3285,13 @@ normal_stop (void) (Note that there's no point in saying anything if the inferior has exited!) */ - if (may_switch_from_inferior_pid - && (switched_from_inferior_pid != inferior_pid) + if ((previous_inferior_pid != inferior_pid) && target_has_execution) { target_terminal_ours_for_output (); - printf_filtered ("[Switched to %s]\n", + printf_filtered ("[Switching to %s]\n", target_pid_or_tid_to_str (inferior_pid)); - switched_from_inferior_pid = inferior_pid; + previous_inferior_pid = inferior_pid; } /* Make sure that the current_frame's pc is correct. This |