aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-options.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-05-21 06:54:13 +0000
committerAndrew Cagney <cagney@redhat.com>1997-05-21 06:54:13 +0000
commit50a2a691824992f474b19bf40bbff016b2f67150 (patch)
tree00df34e93ad0cb95e742316790b57f1ced5d7bb8 /sim/common/sim-options.h
parent003c91bec4849e4a5b54d6e81383a4ff4376e996 (diff)
downloadgdb-50a2a691824992f474b19bf40bbff016b2f67150.zip
gdb-50a2a691824992f474b19bf40bbff016b2f67150.tar.gz
gdb-50a2a691824992f474b19bf40bbff016b2f67150.tar.bz2
Watchpoint interface.
Diffstat (limited to 'sim/common/sim-options.h')
-rw-r--r--sim/common/sim-options.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/sim/common/sim-options.h b/sim/common/sim-options.h
index f6f4dde..586b91c 100644
--- a/sim/common/sim-options.h
+++ b/sim/common/sim-options.h
@@ -29,13 +29,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
sim_open handles the large majority of them and it also parses the
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. */
+ arg#2 is the option index; arg#3 is the option's argument, NULL if
+ optional and missing; arg#4 is nonzero if being called as a
+ command. */
-typedef SIM_RC (OPTION_HANDLER) PARAMS ((SIM_DESC, int, char *));
+typedef SIM_RC (OPTION_HANDLER) PARAMS ((SIM_DESC, int, char *, int));
/* Declare option handlers with a macro so it's usable on k&r systems. */
-#define DECLARE_OPTION_HANDLER(fn) SIM_RC fn PARAMS ((SIM_DESC, int, char *))
+#define DECLARE_OPTION_HANDLER(fn) SIM_RC fn PARAMS ((SIM_DESC, int, char *, int))
typedef struct {
/* The long option information. */
@@ -49,6 +50,12 @@ typedef struct {
const char *doc;
/* A function to process the option. */
OPTION_HANDLER *handler;
+ /* The documented name of the option. If this is NULL, opt.name is
+ listed; otherwize this is listed as the name of the option.
+ Ex: given the options --set-pc, set-sp, et.al. the first option
+ would have doc_opt set to `--set-REGNAME' with the others set to
+ "". Only --set-REGNAME would then be listed. */
+ const char *doc_name;
} OPTION;
/* All options that don't have a short form equivalent begin with this for