diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-05-08 05:28:20 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-05-08 05:28:20 +0000 |
commit | 43c53e07db6bdb75bd0fa4ee0165be0bc76ab9f0 (patch) | |
tree | 01396e67b23885e0578c685f4b9203fa6389b373 /sim/common/sim-options.h | |
parent | 1c877a7aae88483420be05c2a8f5014a228aaaaa (diff) | |
download | gdb-43c53e07db6bdb75bd0fa4ee0165be0bc76ab9f0.zip gdb-43c53e07db6bdb75bd0fa4ee0165be0bc76ab9f0.tar.gz gdb-43c53e07db6bdb75bd0fa4ee0165be0bc76ab9f0.tar.bz2 |
Add function sim_args_command() which takes a `(gdb) sim <command>' and
parses it using rules found in the simulator command-line-options
databse.
Diffstat (limited to 'sim/common/sim-options.h')
-rw-r--r-- | sim/common/sim-options.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sim/common/sim-options.h b/sim/common/sim-options.h index ea0b21a..f6f4dde 100644 --- a/sim/common/sim-options.h +++ b/sim/common/sim-options.h @@ -27,7 +27,10 @@ with this program; if not, write to the Free Software Foundation, Inc., Options for the standalone simulator are parsed by sim_open since sim_open handles the large majority of them and it also parses the - options when invoked by gdb [or any external program]. */ + options when invoked by gdb [or any external program]. + + Per getopt: arg#2 is the option index; arg#3 is the option's + argument, NULL if optional and missing. */ typedef SIM_RC (OPTION_HANDLER) PARAMS ((SIM_DESC, int, char *)); @@ -68,9 +71,8 @@ typedef struct option_list { TABLE is an array of OPTIONS terminated by a NULL `opt.name' entry. */ SIM_RC sim_add_option_table PARAMS ((SIM_DESC sd, const OPTION *table)); -/* Initialize common parts before argument processing. - Called by sim_open. */ -SIM_RC sim_pre_argv_init PARAMS ((SIM_DESC sd, const char *myname)); +/* Install handler for the standard options. */ +MODULE_INSTALL_FN standard_install; /* Called by sim_open to parse the arguments. */ SIM_RC sim_parse_args PARAMS ((SIM_DESC sd, char **argv)); @@ -78,4 +80,8 @@ SIM_RC sim_parse_args PARAMS ((SIM_DESC sd, char **argv)); /* Print help messages for the options. */ void sim_print_help PARAMS ((SIM_DESC sd)); +/* Try to parse the command as if it is an option, Only fail when + totally unsuccessful */ +SIM_RC sim_args_command PARAMS ((SIM_DESC sd, char *cmd)); + #endif /* SIM_OPTIONS_H */ |