diff options
author | Richard Earnshaw <richard.earnshaw@arm.com> | 2003-03-22 18:01:38 +0000 |
---|---|---|
committer | Richard Earnshaw <richard.earnshaw@arm.com> | 2003-03-22 18:01:38 +0000 |
commit | 26304000ed5ef37999a9805f31acefc594ee287e (patch) | |
tree | 61ff11ed52232544e6376a3a0a9314be756b919e /gdb/arm-tdep.c | |
parent | afd7eef09b6bc1a50559581a56ecb14725037c74 (diff) | |
download | gdb-26304000ed5ef37999a9805f31acefc594ee287e.zip gdb-26304000ed5ef37999a9805f31acefc594ee287e.tar.gz gdb-26304000ed5ef37999a9805f31acefc594ee287e.tar.bz2 |
* arm-tdep.c (show_arm_command): Don't print out help. Instead, show
the current setting of each value.
(_initialize_arm_tdep): Delete variable new_cmd and add new vars
new_set and new_show. Use add_setshow_cmd_full and
add_setshow_boolean_cmd as appropriate. Deprecate "set/show apcs32"
commands and add new version as subcommands of "set/show arm".
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 55 |
1 files changed, 35 insertions, 20 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 583400c..53a3692 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -2530,7 +2530,7 @@ set_arm_command (char *args, int from_tty) static void show_arm_command (char *args, int from_tty) { - help_list (showarmcmdlist, "show arm ", all_commands, gdb_stdout); + cmd_show_list (showarmcmdlist, from_tty, ""); } /* If the user changes the register disassembly style used for info @@ -3015,7 +3015,7 @@ _initialize_arm_tdep (void) { struct ui_file *stb; long length; - struct cmd_list_element *new_cmd; + struct cmd_list_element *new_set, *new_show; const char *setname; const char *setdesc; const char **regnames; @@ -3088,27 +3088,39 @@ _initialize_arm_tdep (void) ui_file_delete (stb); /* Add the deprecated disassembly-flavor command. */ - new_cmd = add_set_enum_cmd ("disassembly-flavor", no_class, + new_set = add_set_enum_cmd ("disassembly-flavor", no_class, valid_disassembly_styles, &disassembly_style, helptext, &setlist); - set_cmd_sfunc (new_cmd, set_disassembly_style_sfunc); - deprecate_cmd (new_cmd, "set arm disassembly"); - deprecate_cmd (add_show_from_set (new_cmd, &showlist), + set_cmd_sfunc (new_set, set_disassembly_style_sfunc); + deprecate_cmd (new_set, "set arm disassembly"); + deprecate_cmd (add_show_from_set (new_set, &showlist), "show arm disassembly"); /* And now add the new interface. */ - new_cmd = add_set_enum_cmd ("disassembly", no_class, valid_disassembly_styles, - &disassembly_style, helptext, &setarmcmdlist); - - add_show_from_set (new_cmd, &showarmcmdlist); - - /* ??? Maybe this should be a boolean. */ - add_show_from_set (add_set_cmd ("apcs32", no_class, - var_zinteger, (char *) &arm_apcs_32, - "Set usage of ARM 32-bit mode.\n", &setlist), - &showlist); + new_set = add_set_enum_cmd ("disassembly", no_class, + valid_disassembly_styles, &disassembly_style, + helptext, &setarmcmdlist); + + add_show_from_set (new_set, &showarmcmdlist); + + add_setshow_cmd_full ("apcs32", no_class, + var_boolean, (char *) &arm_apcs_32, + "Set usage of ARM 32-bit mode.", + "Show usage of ARM 32-bit mode.", + NULL, NULL, + &setlist, &showlist, &new_set, &new_show); + deprecate_cmd (new_set, "set arm apcs32"); + deprecate_cmd (new_show, "show arm apcs32"); + + add_setshow_boolean_cmd ("apcs32", no_class, &arm_apcs_32, + "Set usage of ARM 32-bit mode. " + "When off, a 26-bit PC will be used.", + "Show usage of ARM 32-bit mode. " + "When off, a 26-bit PC will be used.", + NULL, NULL, + &setarmcmdlist, &showarmcmdlist); /* Add the deprecated "othernames" command. */ deprecate_cmd (add_com ("othernames", class_obscure, arm_othernames, @@ -3116,8 +3128,11 @@ _initialize_arm_tdep (void) "set arm disassembly"); /* Debugging flag. */ - add_show_from_set (add_set_cmd ("arm", class_maintenance, var_zinteger, - &arm_debug, "Set arm debugging.\n" - "When non-zero, arm specific debugging is enabled.", - &setdebuglist), &showdebuglist); + add_setshow_boolean_cmd ("arm", class_maintenance, &arm_debug, + "Set ARM debugging. " + "When on, arm-specific debugging is enabled.", + "Show ARM debugging. " + "When on, arm-specific debugging is enabled.", + NULL, NULL, + &setdebuglist, &showdebuglist); } |