diff options
author | Tom Tromey <tromey@redhat.com> | 2001-11-22 00:23:13 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2001-11-22 00:23:13 +0000 |
commit | 50403ddfe2da12ab15ebb791522e6abbf598a4f8 (patch) | |
tree | 4680f26790c0accedcc000b17816feec2d5ed078 /gdb/command.h | |
parent | c0bc83636fee301315268aaf447d49c142865c78 (diff) | |
download | gdb-50403ddfe2da12ab15ebb791522e6abbf598a4f8.tar.gz |
Fix for PR gdb/209, PR gdb/156:
* gdbarch.c, gdbarch.h: Rebuilt.
* gdbarch.sh: Added `construct_inferior_arguments'.
* cli/cli-decode.h (cmd_list_element): Added pre_show_hook.
Typo fix.
* cli/cli-setshow.c (do_setshow_command): Call the pre_show_hook.
* infcmd.c (_initialize_infcmd): Set sfunc on `set args' command.
(inferior_argc, inferior_argv): New globals.
(notice_args_set): New function.
(set_inferior_args): Clear inferior_argc and inferior_argv.
(set_inferior_args_vector): New function.
(get_inferior_args): Handle inferior argument vector.
(run_command): Use get_inferior_args().
(notice_args_read): New function.
(_initialize_infcmd): Don't call set_inferior_args.
* command.h: Typo fix.
(cmd_list_element): Added pre_show_hook.
* main.c (captured_main): Added --args option.
(print_gdb_help): Document --args.
* inferior.h (construct_inferior_arguments): Declare.
(set_inferior_args_vector): Likewise.
* fork-child.c (construct_inferior_arguments): New function.
Diffstat (limited to 'gdb/command.h')
-rw-r--r-- | gdb/command.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/command.h b/gdb/command.h index 20ebef2b46f..ffbabba061e 100644 --- a/gdb/command.h +++ b/gdb/command.h @@ -134,7 +134,7 @@ struct cmd_list_element /* If type is not_set_cmd, call it like this: */ void (*cfunc) (char *args, int from_tty); - /* If type is cmd_set or show_cmd, first set the variables, and + /* If type is set_cmd or show_cmd, first set the variables, and then call this. */ void (*sfunc) (char *args, int from_tty, struct cmd_list_element * c); } @@ -172,6 +172,10 @@ struct cmd_list_element /* if this command is deprecated, this is the replacement name */ char *replacement; + /* If this command represents a show command, then this function + is called before the variable's value is examined. */ + void (*pre_show_hook) (struct cmd_list_element *c); + /* Hook for another command to be executed before this command. */ struct cmd_list_element *hook_pre; |