aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-01-23 15:47:03 +0000
committerPedro Alves <palves@redhat.com>2009-01-23 15:47:03 +0000
commitdd7e2d2bc7ef0a69396a4e9fda0a0039e919cd19 (patch)
tree7de5faf786bbf76b3acd8091007f751397fba7e8 /gdb/infrun.c
parent750bdd572d62dde1688ba1f42d380e33c0577212 (diff)
downloadgdb-dd7e2d2bc7ef0a69396a4e9fda0a0039e919cd19.zip
gdb-dd7e2d2bc7ef0a69396a4e9fda0a0039e919cd19.tar.gz
gdb-dd7e2d2bc7ef0a69396a4e9fda0a0039e919cd19.tar.bz2
2009-01-23 Pedro Alves <pedro@codesourcery.com>
PR gdb/9664: * infrun.c (normal_stop): Tag threads as stopped, and run the hook-stop before printing the stack frame. 2009-01-23 Pedro Alves <pedro@codesourcery.com> PR gdb/9664: * gdb.base/hook-stop-frame.c, gdb.base/hook-stop-frame.exp: New.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 92092ab..c11c71a 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -4269,6 +4269,15 @@ Further execution is probably impossible.\n"));
if (target_has_stack && !stop_stack_dummy)
set_current_sal_from_frame (get_current_frame (), 1);
+ /* Let the user/frontend see the threads as stopped. */
+ do_cleanups (old_chain);
+
+ /* Look up the hook_stop and run it (CLI internally handles problem
+ of stop_command's pre-hook not existing). */
+ if (stop_command)
+ catch_errors (hook_stop_stub, stop_command,
+ "Error while running hook_stop:\n", RETURN_MASK_ALL);
+
if (!target_has_stack)
goto done;
@@ -4425,16 +4434,6 @@ done:
Delete any breakpoint that is to be deleted at the next stop. */
breakpoint_auto_delete (inferior_thread ()->stop_bpstat);
}
-
- /* Tell the frontend about the new thread states. */
- do_cleanups (old_chain);
-
- /* Look up the hook_stop and run it (CLI internally handles problem
- of stop_command's pre-hook not existing). */
- if (stop_command)
- catch_errors (hook_stop_stub, stop_command,
- "Error while running hook_stop:\n", RETURN_MASK_ALL);
-
}
static int