aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-06-13 20:19:19 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-06-13 20:19:19 +0000
commit8f6a8e8417fa1e8191993f4869628460605e6221 (patch)
tree3e380f8cf21b6666371b7e76d15eb8e93f73de04 /gdb
parentfa452fa6833cbb3088361ac35f4c51716afde520 (diff)
downloadgdb-8f6a8e8417fa1e8191993f4869628460605e6221.zip
gdb-8f6a8e8417fa1e8191993f4869628460605e6221.tar.gz
gdb-8f6a8e8417fa1e8191993f4869628460605e6221.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog14
-rw-r--r--gdb/infcall.c7
-rw-r--r--gdb/infcmd.c13
-rw-r--r--gdb/inferior.h6
-rw-r--r--gdb/infrun.c2
-rw-r--r--gdb/thread.c6
6 files changed, 34 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a207f34..e69b4ea 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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>
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 33a098f..559b4a2 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -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);
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index a4f40a5..d9c9cb7 100644
--- a/gdb/infcmd.c
+++ b/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 =
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 1042a44..dd07efa 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -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
diff --git a/gdb/infrun.c b/gdb/infrun.c
index cfc3d9b..e951ede 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -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. */
diff --git a/gdb/thread.c b/gdb/thread.c
index 64d41eb..80d745d 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -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;
}