From d51fd4c8986ceb1bfb32deb975b54c79c32ee5ce Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 9 Sep 2008 18:58:20 +0000 Subject: 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. --- gdb/infrun.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'gdb/infrun.c') 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 -- cgit v1.1