* infrun.c (normal_stop): Run hook-stop last.

gdb/testsuite/
	* gdb.base/hook-stop-continue.c: New.
	* gdb.base/hook-stop-continue.exp: New.
This commit is contained in:
Pedro Alves
2008-09-09 18:58:20 +00:00
parent ba8cb4bac5
commit d51fd4c898
5 changed files with 118 additions and 10 deletions

View File

@@ -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