+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>
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);
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;
\f
/* Accessor routines. */
observer_notify_normal_stop (stop_bpstat);
}
- suppress_run_stop_observers = 0;
+ suppress_stop_observer = 0;
delete_breakpoint (breakpoint);
}
}
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 =
/* 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;
+
\f
/* Possible values for gdbarch_call_dummy_location. */
#define ON_STACK 1
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. */
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;
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;
}