aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-09-09 18:58:20 +0000
committerPedro Alves <palves@redhat.com>2008-09-09 18:58:20 +0000
commitd51fd4c8986ceb1bfb32deb975b54c79c32ee5ce (patch)
tree8b35bca16df211556927795276b30471bcfb632b /gdb/infrun.c
parentba8cb4bac543f3f56102145410291726ad2240cd (diff)
downloadgdb-d51fd4c8986ceb1bfb32deb975b54c79c32ee5ce.zip
gdb-d51fd4c8986ceb1bfb32deb975b54c79c32ee5ce.tar.gz
gdb-d51fd4c8986ceb1bfb32deb975b54c79c32ee5ce.tar.bz2
gdb/
* infrun.c (normal_stop): Run hook-stop last. gdb/testsuite/ * gdb.base/hook-stop-continue.c: New. * gdb.base/hook-stop-continue.exp: New.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index ede6309..62c4ab3 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3799,17 +3799,8 @@ Further execution is probably impossible.\n"));
if (target_has_stack && !stop_stack_dummy)
set_current_sal_from_frame (get_current_frame (), 1);
- /* 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;
- }
+ goto done;
if (last.kind == TARGET_WAITKIND_SIGNALLED
|| last.kind == TARGET_WAITKIND_EXITED)
@@ -3962,6 +3953,13 @@ done:
else
set_running (inferior_ptid, 0);
}
+
+ /* 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