summaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-06-05 08:25:00 -0600
committerTom Tromey <tromey@redhat.com>2014-06-13 09:29:19 -0600
commit635c7e8a0521e985921ea3189ab2db5e05fdd41f (patch)
tree3992abc1799bc705db6afcf31762959e4d2cc6c2 /gdb/maint.c
parentf26c187e2933a0e99a9fbe1ccbcd97260c74b913 (diff)
make calls to help_list use enumerator
Currently there are many calls to help_list that pass the constant -1 as the "class" value. However, the parameter is declared as being of type enum command_class, and uses of the constant violate this abstraction. This patch fixes the error everywhere it occurs in the gdb sources. Tested by rebuilding. 2014-06-13 Tom Tromey <tromey@redhat.com> * cp-support.c (maint_cplus_command): Pass all_commands, not -1, to help_list. * guile/guile.c (info_guile_command): Pass all_commands, not -1, to help_list. * tui/tui-win.c (tui_command): Pass all_commands, not -1, to help_list. * tui/tui-regs.c (tui_reg_command): Pass all_commands, not -1, to help_list.Pass all_commands, not -1, to help_list. * cli/cli-dump.c (dump_command, append_command) (srec_dump_command, ihex_dump_command, tekhex_dump_command) (binary_dump_command, binary_append_command): Pass all_commands, not -1, to help_list. * cli/cli-cmds.c (info_command, set_debug): Pass all_commands, not -1, to help_list. * valprint.c (set_print, set_print_raw): Pass all_commands, not -1, to help_list. * typeprint.c (set_print_type): Pass all_commands, not -1, to help_list. * top.c (set_history): Pass all_commands, not -1, to help_list. * target-descriptions.c (set_tdesc_cmd, unset_tdesc_cmd): Pass all_commands, not -1, to help_list. * symfile.c (overlay_command): Pass all_commands, not -1, to help_list. * spu-tdep.c (info_spu_command): Pass all_commands, not -1, to help_list. * serial.c (serial_set_cmd): Pass all_commands, not -1, to help_list. * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Pass all_commands, not -1, to help_list. * remote.c (remote_command, set_remote_cmd): Pass all_commands, not -1, to help_list. * ravenscar-thread.c (set_ravenscar_command): Pass all_commands, not -1, to help_list. * maint.c (maintenance_command, maintenance_info_command) (maintenance_print_command, maintenance_set_cmd): Pass all_commands, not -1, to help_list. * macrocmd.c (macro_command): Pass all_commands, not -1, to help_list. * language.c (set_check): Pass all_commands, not -1, to help_list. * infcmd.c (unset_command): Pass all_commands, not -1, to help_list. * frame.c (set_backtrace_cmd): Pass all_commands, not -1, to help_list. * dwarf2read.c (set_dwarf2_cmd): Pass all_commands, not -1, to help_list. * dcache.c (set_dcache_command): Pass all_commands, not -1, to help_list. * breakpoint.c (save_command): Pass all_commands, not -1, to help_list. * ada-lang.c (maint_set_ada_cmd, set_ada_command): Pass all_commands, not -1, to help_list.
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index 873c33cce9..30a9d3bbd5 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -88,7 +88,7 @@ maintenance_command (char *args, int from_tty)
{
printf_unfiltered (_("\"maintenance\" must be followed by "
"the name of a maintenance command.\n"));
- help_list (maintenancelist, "maintenance ", -1, gdb_stdout);
+ help_list (maintenancelist, "maintenance ", all_commands, gdb_stdout);
}
#ifndef _WIN32
@@ -192,7 +192,8 @@ maintenance_info_command (char *arg, int from_tty)
{
printf_unfiltered (_("\"maintenance info\" must be followed "
"by the name of an info command.\n"));
- help_list (maintenanceinfolist, "maintenance info ", -1, gdb_stdout);
+ help_list (maintenanceinfolist, "maintenance info ", all_commands,
+ gdb_stdout);
}
/* Mini tokenizing lexer for 'maint info sections' command. */
@@ -439,7 +440,8 @@ maintenance_print_command (char *arg, int from_tty)
{
printf_unfiltered (_("\"maintenance print\" must be followed "
"by the name of a print command.\n"));
- help_list (maintenanceprintlist, "maintenance print ", -1, gdb_stdout);
+ help_list (maintenanceprintlist, "maintenance print ", all_commands,
+ gdb_stdout);
}
/* The "maintenance translate-address" command converts a section and address
@@ -664,7 +666,8 @@ maintenance_set_cmd (char *args, int from_tty)
{
printf_unfiltered (_("\"maintenance set\" must be followed "
"by the name of a set command.\n"));
- help_list (maintenance_set_cmdlist, "maintenance set ", -1, gdb_stdout);
+ help_list (maintenance_set_cmdlist, "maintenance set ", all_commands,
+ gdb_stdout);
}
static void