diff options
author | Fernando Nasser <fnasser@redhat.com> | 2000-11-06 22:44:34 +0000 |
---|---|---|
committer | Fernando Nasser <fnasser@redhat.com> | 2000-11-06 22:44:34 +0000 |
commit | 73bc900df9bcfe3ce24453219d2303fafb1395de (patch) | |
tree | 907962cd2f5627b8eaa9fb92616a178ae33bf764 /gdb/infrun.c | |
parent | 7152f1dc4515cb14067fed4c5d5b5374f0d475b4 (diff) | |
download | gdb-73bc900df9bcfe3ce24453219d2303fafb1395de.zip gdb-73bc900df9bcfe3ce24453219d2303fafb1395de.tar.gz gdb-73bc900df9bcfe3ce24453219d2303fafb1395de.tar.bz2 |
2000-11-06 Fernando Nasser <fnasser@cygnus.com>
From Steven Johnson <sbjohnson@ozemail.com.au>:
This set of changes add "hookpost-" as an expansion on the original
hooking of commands to GDB. A Hook may now be run "AFTER" execution of
a command as well as before.
* command.h (struct cmd_list_element): Changed elements hook and hookee
to hook_pre and hookee_pre respectively. Added hook_post and hookee_post
for the post hook command operation. Added hook_in so that an executing
hook can be flagged to prevent recursion.
* command.c (add_cmd): Changed initilization of cmd_list_element to
reflect above changes.
(delete_cmd): Remove both pre and post hooks.
(help_cmd): Notify that the command has pre and/or post hooks.
* infrun.c (normal_stop): Change references to hook_pre from hook.
* top.c (execute_command): Run both pre and post hooks.
(define_command): Allow definition of both pre and post hooks.
The definition of pre-hooks is done as before, with the "hook-"
prefix for backward compatibility.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index c3cf023..57233a8 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3446,9 +3446,9 @@ and/or watchpoints.\n"); /* Look up the hook_stop and run it if it exists. */ - if (stop_command && stop_command->hook) + if (stop_command && stop_command->hook_pre) { - catch_errors (hook_stop_stub, stop_command->hook, + catch_errors (hook_stop_stub, stop_command->hook_pre, "Error while running hook_stop:\n", RETURN_MASK_ALL); } |