Don't suppress *running when doing finish.
* infcall.c (call_function_by_hand): Set both suppress_resume_observer and suppress_stop_observer. * infcmd.c (suppress_run_stop_observers): Split into... (suppress_resume_observer, suppress_stop_observer): ...those. (finish_command_continuation): Clear suppress_stop_observer. (finish_command): Set suppress_stop_observer. * inferior.h (suppress_run_stop_observers): Split into... (suppress_resume_observer, suppress_stop_observer): ...those. * infrun.c (normal_stop): Check for suppress_stop_observer. * thread.c (set_running): Check for suppress_resume_observer.
This commit is contained in:
parent
fa452fa683
commit
8f6a8e8417
@ -1,3 +1,17 @@
|
||||
2008-06-14 Vladimir Prus <vladimir@codesourcery.com>
|
||||
|
||||
Don't suppress *running when doing finish.
|
||||
* infcall.c (call_function_by_hand): Set both
|
||||
suppress_resume_observer and suppress_stop_observer.
|
||||
* infcmd.c (suppress_run_stop_observers): Split into...
|
||||
(suppress_resume_observer, suppress_stop_observer): ...those.
|
||||
(finish_command_continuation): Clear suppress_stop_observer.
|
||||
(finish_command): Set suppress_stop_observer.
|
||||
* inferior.h (suppress_run_stop_observers): Split into...
|
||||
(suppress_resume_observer, suppress_stop_observer): ...those.
|
||||
* infrun.c (normal_stop): Check for suppress_stop_observer.
|
||||
* thread.c (set_running): Check for suppress_resume_observer.
|
||||
|
||||
2008-06-12 Pedro Alves <pedro_alves@portugalmail.pt>
|
||||
Pierre Muller <muller@ics.u-strasbg.fr>
|
||||
|
||||
|
@ -720,9 +720,10 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
|
||||
if (target_can_async_p ())
|
||||
saved_async = target_async_mask (0);
|
||||
|
||||
old_cleanups2 = make_cleanup_restore_integer
|
||||
(&suppress_run_stop_observers);
|
||||
suppress_run_stop_observers = 1;
|
||||
old_cleanups2 = make_cleanup_restore_integer (&suppress_resume_observer);
|
||||
suppress_resume_observer = 1;
|
||||
make_cleanup_restore_integer (&suppress_stop_observer);
|
||||
suppress_stop_observer = 1;
|
||||
proceed (real_pc, TARGET_SIGNAL_0, 0);
|
||||
do_cleanups (old_cleanups2);
|
||||
|
||||
|
13
gdb/infcmd.c
13
gdb/infcmd.c
@ -207,9 +207,10 @@ int step_multi;
|
||||
|
||||
struct gdb_environ *inferior_environ;
|
||||
|
||||
/* When set, normal_stop will not call the normal_stop observer.
|
||||
Resume observer likewise will not be called. */
|
||||
int suppress_run_stop_observers = 0;
|
||||
/* When set, no calls to target_resumed observer will be made. */
|
||||
int suppress_resume_observer = 0;
|
||||
/* When set, normal_stop will not call the normal_stop observer. */
|
||||
int suppress_stop_observer = 0;
|
||||
|
||||
/* Accessor routines. */
|
||||
|
||||
@ -1304,7 +1305,7 @@ finish_command_continuation (struct continuation_arg *arg, int error_p)
|
||||
observer_notify_normal_stop (stop_bpstat);
|
||||
}
|
||||
|
||||
suppress_run_stop_observers = 0;
|
||||
suppress_stop_observer = 0;
|
||||
delete_breakpoint (breakpoint);
|
||||
}
|
||||
|
||||
@ -1371,8 +1372,8 @@ finish_command (char *arg, int from_tty)
|
||||
}
|
||||
|
||||
proceed_to_finish = 1; /* We want stop_registers, please... */
|
||||
make_cleanup_restore_integer (&suppress_run_stop_observers);
|
||||
suppress_run_stop_observers = 1;
|
||||
make_cleanup_restore_integer (&suppress_stop_observer);
|
||||
suppress_stop_observer = 1;
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
|
||||
|
||||
arg1 =
|
||||
|
@ -393,7 +393,11 @@ void displaced_step_dump_bytes (struct ui_file *file,
|
||||
|
||||
|
||||
/* When set, normal_stop will not call the normal_stop observer. */
|
||||
extern int suppress_run_stop_observers;
|
||||
extern int suppress_stop_observer;
|
||||
|
||||
/* When set, no calls to target_resumed observer will be made. */
|
||||
extern int suppress_resume_observer;
|
||||
|
||||
|
||||
/* Possible values for gdbarch_call_dummy_location. */
|
||||
#define ON_STACK 1
|
||||
|
@ -3772,7 +3772,7 @@ Further execution is probably impossible.\n"));
|
||||
|
||||
done:
|
||||
annotate_stopped ();
|
||||
if (!suppress_run_stop_observers && !step_multi)
|
||||
if (!suppress_stop_observer && !step_multi)
|
||||
observer_notify_normal_stop (stop_bpstat);
|
||||
/* Delete the breakpoint we stopped at, if it wants to be deleted.
|
||||
Delete any breakpoint that is to be deleted at the next stop. */
|
||||
|
@ -431,7 +431,7 @@ set_running (ptid_t ptid, int running)
|
||||
the main thread is always present in the thread list. If it's
|
||||
not, the first call to context_switch will mess up GDB internal
|
||||
state. */
|
||||
if (running && !main_thread_running && !suppress_run_stop_observers)
|
||||
if (running && !main_thread_running && !suppress_resume_observer)
|
||||
observer_notify_target_resumed (ptid);
|
||||
main_thread_running = running;
|
||||
return;
|
||||
@ -449,14 +449,14 @@ set_running (ptid_t ptid, int running)
|
||||
any_started = 1;
|
||||
tp->running_ = running;
|
||||
}
|
||||
if (any_started && !suppress_run_stop_observers)
|
||||
if (any_started && !suppress_resume_observer)
|
||||
observer_notify_target_resumed (ptid);
|
||||
}
|
||||
else
|
||||
{
|
||||
tp = find_thread_pid (ptid);
|
||||
gdb_assert (tp);
|
||||
if (running && !tp->running_ && !suppress_run_stop_observers)
|
||||
if (running && !tp->running_ && !suppress_resume_observer)
|
||||
observer_notify_target_resumed (ptid);
|
||||
tp->running_ = running;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user