summaryrefslogtreecommitdiff
path: root/gdb/command.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-16 17:20:59 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-16 17:20:59 +0000
commit06d6d281b1ca65f33d6ad7a99862f2e12180b01d (patch)
tree79d1f8c10189c8b24da81ad26edd6e467e68c43a /gdb/command.h
parent9c2f71c14b50bad796054eb1f72c0b1e82ad94eb (diff)
downloadgdb-06d6d281b1ca65f33d6ad7a99862f2e12180b01d.tar.gz
2005-02-16 Andrew Cagney <cagney@gnu.org>
Merge setshow print and show parameters. * command.h (show_value_ftype): Define. (deprecated_show_value_hack): Declare. (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd) (add_setshow_boolean_cmd, add_setshow_filename_cmd) (add_setshow_string_cmd, add_setshow_uinteger_cmd) (add_setshow_zinteger_cmd): Change type of show_func to show_value_ftype. * cli/cli-decode.h (struct cmd_list_element): Replace fprint_setshow with show_value_func. * cli/cli-decode.c (add_setshow_cmd_full): Update show_func parameter. Set show_value_func. Do not set cmd_sfunc. (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd) (add_setshow_boolean_cmd, add_setshow_filename_cmd) (add_setshow_string_cmd, add_setshow_uinteger_cmd) (add_setshow_zinteger_cmd): Update. * complaints.c (complaints_show_value): Replace fprint_setshow_complaints. (_initialize_complaints): Update. * mips-tdep.c (show_mask_address): Update. * arm-tdep.c (show_fp_model): Update. * cli/cli-setshow.c (do_setshow_command): Call show_value_func instead of fprint_setshow. Use deprecated_show_value_hack. (deprecated_show_value_hack): New function. * remote.c (add_packet_config_cmd, show_remote_cmd): (show_remote_protocol_P_packet_cmd) (show_remote_protocol_P_packet_cmd) (show_remote_protocol_Z_access_wp_packet_cmd) (show_remote_protocol_Z_hardware_bp_packet_cmd) (show_remote_protocol_Z_packet_cmd) (show_remote_protocol_Z_read_wp_packet_cmd) (show_remote_protocol_Z_software_bp_packet_cmd) (show_remote_protocol_Z_write_wp_packet_cmd) (show_remote_protocol_binary_download_cmd) (show_remote_protocol_p_packet_cmd) (show_remote_protocol_qPart_auxv_packet_cmd) (show_remote_protocol_qSymbol_packet_cmd) (show_remote_protocol_vcont_packet_cmd): Update.
Diffstat (limited to 'gdb/command.h')
-rw-r--r--gdb/command.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/gdb/command.h b/gdb/command.h
index 355355eb9f9..e065dcde541 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -230,6 +230,17 @@ typedef void (fprint_setshow_ftype) (struct cmd_list_element *cmd,
struct ui_file *file,
const char *value);
+/* Method for show a set/show variable's VALUE on FILE. If this
+ method isn't supplied deprecated_show_value_hack() is called (which
+ is not good). */
+typedef void (show_value_ftype) (struct ui_file *file,
+ int from_tty,
+ struct cmd_list_element *cmd,
+ const char *value);
+/* NOTE: i18n: This function is not i18n friendly. Callers should
+ instead print the value out directly. */
+extern show_value_ftype deprecated_show_value_hack;
+
extern void add_setshow_enum_cmd (char *name,
enum command_class class,
const char *enumlist[],
@@ -239,7 +250,7 @@ extern void add_setshow_enum_cmd (char *name,
const char *help_doc,
fprint_setshow_ftype *fprint_setshow,
cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
+ show_value_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
@@ -251,7 +262,7 @@ extern void add_setshow_auto_boolean_cmd (char *name,
const char *help_doc,
fprint_setshow_ftype *fprint_setshow,
cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
+ show_value_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
@@ -261,7 +272,7 @@ extern void add_setshow_boolean_cmd (char *name,
const char *set_doc, const char *show_doc,
const char *help_doc, fprint_setshow_ftype *fprint_setshow,
cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
+ show_value_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
@@ -273,7 +284,7 @@ extern void add_setshow_filename_cmd (char *name,
const char *help_doc,
fprint_setshow_ftype *fprint_setshow,
cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
+ show_value_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
@@ -285,7 +296,7 @@ extern void add_setshow_string_cmd (char *name,
const char *help_doc,
fprint_setshow_ftype *fprint_setshow,
cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
+ show_value_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
@@ -297,7 +308,7 @@ extern void add_setshow_uinteger_cmd (char *name,
const char *help_doc,
fprint_setshow_ftype *fprint_setshow,
cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
+ show_value_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
@@ -309,7 +320,7 @@ extern void add_setshow_zinteger_cmd (char *name,
const char *help_doc,
fprint_setshow_ftype *fprint_setshow,
cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
+ show_value_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);