Rename some command functions

This patch renames a few functions implementing CLI commands to follow
the style <command-name>_command, so that they are easier to search for.

gdb/ChangeLog:

	* breakpoint.c (breakpoints_info): Rename to ...
	(info_breakpoints_command): ... this.
	(watchpoints_info): Rename to ...
	(info_watchpoints_command): ... this.
	(tracepoints_info): Rename to ...
	(info_tracepoints_command): ... this.
	(_initialize_breakpoint): Adjust.
	* dcache.c (dcache_info): Rename to ...
	(info_display_command): ... this.
	(_initialize_dcache): Adjust.
	* frame.h (args_info): Rename to ...
	(info_args_command): ... this.
	(locals_info): Rename to ...
	(info_locals_command): ... this.
	* infcmd.c (nofp_registers_info): Rename to ...
	(info_registers_command): ... this.
	(float_info): Rename to ...
	(info_float_command): ... this.
	(program_info): Rename to ...
	(info_program_command): ... this.
	(all_registers_info): Rename to ...
	(info_all_registers_command): ... this.
	(vector_info): Rename to ...
	(info_vector_command): ... this.
	(float_info): Rename to ...
	(info_float_command): ... this.
	(_initialize_infcmd): Adjust.
	* inferior.h (term_info): Rename to ...
	(info_terminal_command): ... this.
	* inflow.c (term_info): Rename to ...
	(info_terminal_command): ... this.
	(_initialize_inflow): Adjust.
	* infrun.c (signals_info): Rename to ...
	(info_signals_command): ... this.
	(_initialize_infrun): Adjust.
	* objc-lang.c (classes_info): Rename to ...
	(info_classes_command): ... this.
	(selectors_info): Rename to ...
	(info_selectors_command): ... this.
	(_initialize_objc_language): Adjust.
	* printcmd.c (sym_info): Rename to ...
	(info_symbol_command): ... this.
	(address_info): Rename to ...
	(info_address_command): ... this.
	(display_info): Rename to ...
	(info_display_command): ... this.
	(_initialize_printcmd): Adjust.
	* reverse.c (bookmarks_info): Rename to ...
	(info_breakpoints_command): ... this.
	(_initialize_reverse): Adjust.
	* ser-go32.c (dos_info): Rename to ...
	(info_serial_command): ... this.
	(_initialize_ser_dos): Adjust.
	* skip.c (skip_info): Rename to ...
	(info_skip_command): ... this.
	(_initialize_step_skip): Adjust.
	* source.c (line_info): Rename to ...
	(info_line_command): ... this.
	(source_info): Rename to ...
	(info_source_command)
	* stack.c (frame_info): Rename to ...
	(info_frame_command): ... this.
	(locals_info): Rename to ...
	(info_locals_command): ... this.
	(args_info): Rename to ...
	(info_args_command): ... this.
	(_initialize_stack): Adjust.
	* symtab.c (sources_info): Rename to ...
	(info_sources_command): ... this.
	(variables_info): Rename to ...
	(info_variables_command): ... this.
	(functions_info): Rename to ...
	(info_functions_command): ... this.
	(types_info): Rename to ...
	(info_types_command): ... this.
	(_initialize_symtab): Adjust.
	* target.c (target_info): Rename to ...
	(info_target_command): ... this.
	(initialize_targets): Adjust.
	* tracepoint.c (tvariables_info): Rename to ...
	(info_tvariables_command): ... this.
	(scope_info): Rename to ...
	(info_scope_command): ... this.
	(trace_dump_actions): Adjust.
	(_initialize_tracepoint): Adjust.
This commit is contained in:
Simon Marchi 2017-08-22 22:09:55 +02:00
parent 8dfb7cbf84
commit 11db943032
18 changed files with 169 additions and 81 deletions

View file

@ -1,3 +1,91 @@
2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
* breakpoint.c (breakpoints_info): Rename to ...
(info_breakpoints_command): ... this.
(watchpoints_info): Rename to ...
(info_watchpoints_command): ... this.
(tracepoints_info): Rename to ...
(info_tracepoints_command): ... this.
(_initialize_breakpoint): Adjust.
* dcache.c (dcache_info): Rename to ...
(info_display_command): ... this.
(_initialize_dcache): Adjust.
* frame.h (args_info): Rename to ...
(info_args_command): ... this.
(locals_info): Rename to ...
(info_locals_command): ... this.
* infcmd.c (nofp_registers_info): Rename to ...
(info_registers_command): ... this.
(float_info): Rename to ...
(info_float_command): ... this.
(program_info): Rename to ...
(info_program_command): ... this.
(all_registers_info): Rename to ...
(info_all_registers_command): ... this.
(vector_info): Rename to ...
(info_vector_command): ... this.
(float_info): Rename to ...
(info_float_command): ... this.
(_initialize_infcmd): Adjust.
* inferior.h (term_info): Rename to ...
(info_terminal_command): ... this.
* inflow.c (term_info): Rename to ...
(info_terminal_command): ... this.
(_initialize_inflow): Adjust.
* infrun.c (signals_info): Rename to ...
(info_signals_command): ... this.
(_initialize_infrun): Adjust.
* objc-lang.c (classes_info): Rename to ...
(info_classes_command): ... this.
(selectors_info): Rename to ...
(info_selectors_command): ... this.
(_initialize_objc_language): Adjust.
* printcmd.c (sym_info): Rename to ...
(info_symbol_command): ... this.
(address_info): Rename to ...
(info_address_command): ... this.
(display_info): Rename to ...
(info_display_command): ... this.
(_initialize_printcmd): Adjust.
* reverse.c (bookmarks_info): Rename to ...
(info_breakpoints_command): ... this.
(_initialize_reverse): Adjust.
* ser-go32.c (dos_info): Rename to ...
(info_serial_command): ... this.
(_initialize_ser_dos): Adjust.
* skip.c (skip_info): Rename to ...
(info_skip_command): ... this.
(_initialize_step_skip): Adjust.
* source.c (line_info): Rename to ...
(info_line_command): ... this.
(source_info): Rename to ...
(info_source_command)
* stack.c (frame_info): Rename to ...
(info_frame_command): ... this.
(locals_info): Rename to ...
(info_locals_command): ... this.
(args_info): Rename to ...
(info_args_command): ... this.
(_initialize_stack): Adjust.
* symtab.c (sources_info): Rename to ...
(info_sources_command): ... this.
(variables_info): Rename to ...
(info_variables_command): ... this.
(functions_info): Rename to ...
(info_functions_command): ... this.
(types_info): Rename to ...
(info_types_command): ... this.
(_initialize_symtab): Adjust.
* target.c (target_info): Rename to ...
(info_target_command): ... this.
(initialize_targets): Adjust.
* tracepoint.c (tvariables_info): Rename to ...
(info_tvariables_command): ... this.
(scope_info): Rename to ...
(info_scope_command): ... this.
(trace_dump_actions): Adjust.
(_initialize_tracepoint): Adjust.
2017-08-22 Tom Tromey <tom@tromey.com> 2017-08-22 Tom Tromey <tom@tromey.com>
* breakpoint.h (install_breakpoint): Update. * breakpoint.h (install_breakpoint): Update.

View file

@ -183,9 +183,9 @@ static int breakpoint_location_address_range_overlap (struct bp_location *,
struct address_space *, struct address_space *,
CORE_ADDR, int); CORE_ADDR, int);
static void breakpoints_info (char *, int); static void info_breakpoints_command (char *, int);
static void watchpoints_info (char *, int); static void info_watchpoints_command (char *, int);
static int breakpoint_1 (char *, int, static int breakpoint_1 (char *, int,
int (*) (const struct breakpoint *)); int (*) (const struct breakpoint *));
@ -279,7 +279,7 @@ static int is_hardware_watchpoint (const struct breakpoint *bpt);
static void insert_breakpoint_locations (void); static void insert_breakpoint_locations (void);
static void tracepoints_info (char *, int); static void info_tracepoints_command (char *, int);
static void delete_trace_command (char *, int); static void delete_trace_command (char *, int);
@ -6958,7 +6958,7 @@ default_collect_info (void)
} }
static void static void
breakpoints_info (char *args, int from_tty) info_breakpoints_command (char *args, int from_tty)
{ {
breakpoint_1 (args, 0, NULL); breakpoint_1 (args, 0, NULL);
@ -6966,7 +6966,7 @@ breakpoints_info (char *args, int from_tty)
} }
static void static void
watchpoints_info (char *args, int from_tty) info_watchpoints_command (char *args, int from_tty)
{ {
int num_printed = breakpoint_1 (args, 0, is_watchpoint); int num_printed = breakpoint_1 (args, 0, is_watchpoint);
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;
@ -15222,7 +15222,7 @@ create_tracepoint_from_upload (struct uploaded_tp *utp)
omitted. */ omitted. */
static void static void
tracepoints_info (char *args, int from_tty) info_tracepoints_command (char *args, int from_tty)
{ {
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;
int num_printed; int num_printed;
@ -16104,7 +16104,7 @@ Break in function/address or break at a line in the current file."),
_("Break in function or address."), &stoplist); _("Break in function or address."), &stoplist);
add_cmd ("at", class_breakpoint, stopat_command, add_cmd ("at", class_breakpoint, stopat_command,
_("Break at a line in the current file."), &stoplist); _("Break at a line in the current file."), &stoplist);
add_com ("status", class_info, breakpoints_info, _("\ add_com ("status", class_info, info_breakpoints_command, _("\
Status of user-settable breakpoints, or breakpoint number NUMBER.\n\ Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
The \"Type\" column indicates one of:\n\ The \"Type\" column indicates one of:\n\
\tbreakpoint - normal breakpoint\n\ \tbreakpoint - normal breakpoint\n\
@ -16121,7 +16121,7 @@ Convenience variable \"$bpnum\" contains the number of the last\n\
breakpoint set.")); breakpoint set."));
} }
add_info ("breakpoints", breakpoints_info, _("\ add_info ("breakpoints", info_breakpoints_command, _("\
Status of specified breakpoints (all user-settable breakpoints if no argument).\n\ Status of specified breakpoints (all user-settable breakpoints if no argument).\n\
The \"Type\" column indicates one of:\n\ The \"Type\" column indicates one of:\n\
\tbreakpoint - normal breakpoint\n\ \tbreakpoint - normal breakpoint\n\
@ -16227,7 +16227,7 @@ If -l or -location is given, this evaluates EXPRESSION and watches\n\
the memory to which it refers.")); the memory to which it refers."));
set_cmd_completer (c, expression_completer); set_cmd_completer (c, expression_completer);
add_info ("watchpoints", watchpoints_info, _("\ add_info ("watchpoints", info_watchpoints_command, _("\
Status of specified watchpoints (all watchpoints if no argument).")); Status of specified watchpoints (all watchpoints if no argument)."));
/* XXX: cagney/2005-02-23: This should be a boolean, and should /* XXX: cagney/2005-02-23: This should be a boolean, and should
@ -16289,7 +16289,7 @@ Do \"help breakpoints\" for info on other commands dealing with breakpoints.\n\
Do \"help tracepoints\" for info on other tracepoint commands.")); Do \"help tracepoints\" for info on other tracepoint commands."));
set_cmd_completer (c, location_completer); set_cmd_completer (c, location_completer);
add_info ("tracepoints", tracepoints_info, _("\ add_info ("tracepoints", info_tracepoints_command, _("\
Status of specified tracepoints (all tracepoints if no argument).\n\ Status of specified tracepoints (all tracepoints if no argument).\n\
Convenience variable \"$tpnum\" contains the number of the\n\ Convenience variable \"$tpnum\" contains the number of the\n\
last tracepoint set.")); last tracepoint set."));

View file

@ -125,7 +125,7 @@ static int dcache_read_line (DCACHE *dcache, struct dcache_block *db);
static struct dcache_block *dcache_alloc (DCACHE *dcache, CORE_ADDR addr); static struct dcache_block *dcache_alloc (DCACHE *dcache, CORE_ADDR addr);
static void dcache_info (char *exp, int tty); static void info_dcache_command (char *exp, int tty);
void _initialize_dcache (void); void _initialize_dcache (void);
@ -642,7 +642,7 @@ dcache_info_1 (DCACHE *dcache, char *exp)
} }
static void static void
dcache_info (char *exp, int tty) info_dcache_command (char *exp, int tty)
{ {
dcache_info_1 (target_dcache_get (), exp); dcache_info_1 (target_dcache_get (), exp);
} }
@ -702,7 +702,7 @@ exists only for compatibility reasons."),
show_dcache_enabled_p, show_dcache_enabled_p,
&setlist, &showlist); &setlist, &showlist);
add_info ("dcache", dcache_info, add_info ("dcache", info_dcache_command,
_("\ _("\
Print information on the dcache performance.\n\ Print information on the dcache performance.\n\
With no arguments, this command prints the cache configuration and a\n\ With no arguments, this command prints the cache configuration and a\n\

View file

@ -784,9 +784,9 @@ extern void read_frame_arg (struct symbol *sym, struct frame_info *frame,
extern void read_frame_local (struct symbol *sym, struct frame_info *frame, extern void read_frame_local (struct symbol *sym, struct frame_info *frame,
struct frame_arg *argp); struct frame_arg *argp);
extern void args_info (char *, int); extern void info_args_command (char *, int);
extern void locals_info (char *, int); extern void info_locals_command (char *, int);
extern void return_command (char *, int); extern void return_command (char *, int);

View file

@ -62,7 +62,7 @@
/* Local functions: */ /* Local functions: */
static void nofp_registers_info (char *, int); static void info_registers_command (char *, int);
static void until_next_command (int); static void until_next_command (int);
@ -74,7 +74,7 @@ static void path_command (char *, int);
static void unset_command (char *, int); static void unset_command (char *, int);
static void float_info (char *, int); static void info_float_command (char *, int);
static void disconnect_command (char *, int); static void disconnect_command (char *, int);
@ -84,7 +84,7 @@ static void set_environment_command (char *, int);
static void environment_info (char *, int); static void environment_info (char *, int);
static void program_info (char *, int); static void info_program_command (char *, int);
static void finish_command (char *, int); static void finish_command (char *, int);
@ -2060,7 +2060,7 @@ finish_command (char *arg, int from_tty)
static void static void
program_info (char *args, int from_tty) info_program_command (char *args, int from_tty)
{ {
bpstat bs; bpstat bs;
int num, stat; int num, stat;
@ -2502,13 +2502,13 @@ registers_info (char *addr_exp, int fpregs)
} }
static void static void
all_registers_info (char *addr_exp, int from_tty) info_all_registers_command (char *addr_exp, int from_tty)
{ {
registers_info (addr_exp, 1); registers_info (addr_exp, 1);
} }
static void static void
nofp_registers_info (char *addr_exp, int from_tty) info_registers_command (char *addr_exp, int from_tty)
{ {
registers_info (addr_exp, 0); registers_info (addr_exp, 0);
} }
@ -2543,7 +2543,7 @@ print_vector_info (struct ui_file *file,
} }
static void static void
vector_info (char *args, int from_tty) info_vector_command (char *args, int from_tty)
{ {
if (!target_has_registers) if (!target_has_registers)
error (_("The program has no registers now.")); error (_("The program has no registers now."));
@ -3090,7 +3090,7 @@ default_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
} }
static void static void
float_info (char *args, int from_tty) info_float_command (char *args, int from_tty)
{ {
struct frame_info *frame; struct frame_info *frame;
@ -3421,24 +3421,24 @@ If non-stop mode is enabled, interrupt only the current thread,\n\
otherwise all the threads in the program are stopped. To \n\ otherwise all the threads in the program are stopped. To \n\
interrupt all running threads in non-stop mode, use the -a option.")); interrupt all running threads in non-stop mode, use the -a option."));
c = add_info ("registers", nofp_registers_info, _("\ c = add_info ("registers", info_registers_command, _("\
List of integer registers and their contents, for selected stack frame.\n\ List of integer registers and their contents, for selected stack frame.\n\
Register name as argument means describe only that register.")); Register name as argument means describe only that register."));
add_info_alias ("r", "registers", 1); add_info_alias ("r", "registers", 1);
set_cmd_completer (c, reg_or_group_completer); set_cmd_completer (c, reg_or_group_completer);
c = add_info ("all-registers", all_registers_info, _("\ c = add_info ("all-registers", info_all_registers_command, _("\
List of all registers and their contents, for selected stack frame.\n\ List of all registers and their contents, for selected stack frame.\n\
Register name as argument means describe only that register.")); Register name as argument means describe only that register."));
set_cmd_completer (c, reg_or_group_completer); set_cmd_completer (c, reg_or_group_completer);
add_info ("program", program_info, add_info ("program", info_program_command,
_("Execution status of the program.")); _("Execution status of the program."));
add_info ("float", float_info, add_info ("float", info_float_command,
_("Print the status of the floating point unit\n")); _("Print the status of the floating point unit\n"));
add_info ("vector", vector_info, add_info ("vector", info_vector_command,
_("Print the status of the vector unit\n")); _("Print the status of the vector unit\n"));
add_prefix_cmd ("proc", class_info, info_proc_cmd, add_prefix_cmd ("proc", class_info, info_proc_cmd,

View file

@ -121,7 +121,7 @@ extern void default_print_float_info (struct gdbarch *gdbarch,
extern void child_terminal_info (struct target_ops *self, const char *, int); extern void child_terminal_info (struct target_ops *self, const char *, int);
extern void term_info (char *, int); extern void info_terminal_command (char *, int);
extern void child_terminal_ours (struct target_ops *self); extern void child_terminal_ours (struct target_ops *self);

View file

@ -536,7 +536,7 @@ copy_terminal_info (struct inferior *to, struct inferior *from)
} }
void void
term_info (char *arg, int from_tty) info_terminal_command (char *arg, int from_tty)
{ {
target_terminal_info (arg, from_tty); target_terminal_info (arg, from_tty);
} }
@ -820,7 +820,7 @@ initialize_stdin_serial (void)
void void
_initialize_inflow (void) _initialize_inflow (void)
{ {
add_info ("terminal", term_info, add_info ("terminal", info_terminal_command,
_("Print inferior's saved terminal status.")); _("Print inferior's saved terminal status."));
terminal_is_ours = 1; terminal_is_ours = 1;

View file

@ -70,7 +70,7 @@
/* Prototypes for local functions */ /* Prototypes for local functions */
static void signals_info (char *, int); static void info_signals_command (char *, int);
static void handle_command (char *, int); static void handle_command (char *, int);
@ -8710,7 +8710,7 @@ Use \"info signals\" for a list of symbolic signals."));
targets, all signals should be in the signal tables). */ targets, all signals should be in the signal tables). */
static void static void
signals_info (char *signum_exp, int from_tty) info_signals_command (char *signum_exp, int from_tty)
{ {
enum gdb_signal oursig; enum gdb_signal oursig;
@ -9200,7 +9200,7 @@ _initialize_infrun (void)
infrun_async_inferior_event_token infrun_async_inferior_event_token
= create_async_event_handler (infrun_async_inferior_event_handler, NULL); = create_async_event_handler (infrun_async_inferior_event_handler, NULL);
add_info ("signals", signals_info, _("\ add_info ("signals", info_signals_command, _("\
What debugger does when program gets various signals.\n\ What debugger does when program gets various signals.\n\
Specify a signal as argument to print info on that signal only.")); Specify a signal as argument to print info on that signal only."));
add_info_alias ("handle", "signals", 0); add_info_alias ("handle", "signals", 0);

View file

@ -559,7 +559,7 @@ compare_selectors (const void *a, const void *b)
*/ */
static void static void
selectors_info (char *regexp, int from_tty) info_selectors_command (char *regexp, int from_tty)
{ {
struct objfile *objfile; struct objfile *objfile;
struct minimal_symbol *msymbol; struct minimal_symbol *msymbol;
@ -721,7 +721,7 @@ compare_classes (const void *a, const void *b)
*/ */
static void static void
classes_info (char *regexp, int from_tty) info_classes_command (char *regexp, int from_tty)
{ {
struct objfile *objfile; struct objfile *objfile;
struct minimal_symbol *msymbol; struct minimal_symbol *msymbol;
@ -1377,9 +1377,9 @@ extern initialize_file_ftype _initialize_objc_language;
void void
_initialize_objc_language (void) _initialize_objc_language (void)
{ {
add_info ("selectors", selectors_info, /* INFO SELECTORS command. */ add_info ("selectors", info_selectors_command,
_("All Objective-C selectors, or those matching REGEXP.")); _("All Objective-C selectors, or those matching REGEXP."));
add_info ("classes", classes_info, /* INFO CLASSES command. */ add_info ("classes", info_classes_command,
_("All Objective-C classes, or those matching REGEXP.")); _("All Objective-C classes, or those matching REGEXP."));
add_com ("print-object", class_vars, print_object_command, add_com ("print-object", class_vars, print_object_command,
_("Ask an Objective-C object to print itself.")); _("Ask an Objective-C object to print itself."));

View file

@ -1290,7 +1290,7 @@ set_command (char *exp, int from_tty)
} }
static void static void
sym_info (char *arg, int from_tty) info_symbol_command (char *arg, int from_tty)
{ {
struct minimal_symbol *msymbol; struct minimal_symbol *msymbol;
struct objfile *objfile; struct objfile *objfile;
@ -1383,7 +1383,7 @@ sym_info (char *arg, int from_tty)
} }
static void static void
address_info (char *exp, int from_tty) info_address_command (char *exp, int from_tty)
{ {
struct gdbarch *gdbarch; struct gdbarch *gdbarch;
int regno; int regno;
@ -2050,7 +2050,7 @@ disable_current_display (void)
} }
static void static void
display_info (char *ignore, int from_tty) info_display_command (char *ignore, int from_tty)
{ {
struct display *d; struct display *d;
@ -2673,10 +2673,10 @@ _initialize_printcmd (void)
observer_attach_free_objfile (clear_dangling_display_expressions); observer_attach_free_objfile (clear_dangling_display_expressions);
add_info ("address", address_info, add_info ("address", info_address_command,
_("Describe where symbol SYM is stored.")); _("Describe where symbol SYM is stored."));
add_info ("symbol", sym_info, _("\ add_info ("symbol", info_symbol_command, _("\
Describe what symbol is at location ADDR.\n\ Describe what symbol is at location ADDR.\n\
Only for symbols with fixed locations (global or static scope).")); Only for symbols with fixed locations (global or static scope)."));
@ -2700,7 +2700,7 @@ with this command or \"print\"."));
_("Print line number and file of definition of variable.")); _("Print line number and file of definition of variable."));
#endif #endif
add_info ("display", display_info, _("\ add_info ("display", info_display_command, _("\
Expressions to display when program stops, with code numbers.")); Expressions to display when program stops, with code numbers."));
add_cmd ("undisplay", class_vars, undisplay_command, _("\ add_cmd ("undisplay", class_vars, undisplay_command, _("\

View file

@ -307,7 +307,7 @@ bookmark_1 (int bnum)
/* Implement "info bookmarks" command. */ /* Implement "info bookmarks" command. */
static void static void
bookmarks_info (char *args, int from_tty) info_bookmarks_command (char *args, int from_tty)
{ {
if (!bookmark_chain) if (!bookmark_chain)
printf_filtered (_("No bookmarks.\n")); printf_filtered (_("No bookmarks.\n"));
@ -371,7 +371,7 @@ Execute backward until just before selected stack frame is called."));
Set a bookmark in the program's execution history.\n\ Set a bookmark in the program's execution history.\n\
A bookmark represents a point in the execution history \n\ A bookmark represents a point in the execution history \n\
that can be returned to at a later point in the debug session.")); that can be returned to at a later point in the debug session."));
add_info ("bookmarks", bookmarks_info, _("\ add_info ("bookmarks", info_bookmarks_command, _("\
Status of user-settable bookmarks.\n\ Status of user-settable bookmarks.\n\
Bookmarks are user-settable markers representing a point in the \n\ Bookmarks are user-settable markers representing a point in the \n\
execution history that can be returned to later in the same debug \n\ execution history that can be returned to later in the same debug \n\

View file

@ -899,7 +899,7 @@ gdb_pipe (int pdes[2])
} }
static void static void
dos_info (char *arg, int from_tty) info_serial_command (char *arg, int from_tty)
{ {
struct dos_ttystate *port; struct dos_ttystate *port;
#ifdef DOS_STATS #ifdef DOS_STATS
@ -999,6 +999,6 @@ Show COM4 interrupt request."), NULL,
NULL, /* FIXME: i18n: */ NULL, /* FIXME: i18n: */
&setlist, &showlist); &setlist, &showlist);
add_info ("serial", dos_info, add_info ("serial", info_serial_command,
_("Print DOS serial port status.")); _("Print DOS serial port status."));
} }

View file

@ -353,7 +353,7 @@ skip_command (char *arg, int from_tty)
} }
static void static void
skip_info (char *arg, int from_tty) info_skip_command (char *arg, int from_tty)
{ {
int num_printable_entries = 0; int num_printable_entries = 0;
struct value_print_options opts; struct value_print_options opts;
@ -659,7 +659,7 @@ If you don't specify any numbers or ranges, we'll delete all skip entries.\n\n\
Usage: skip delete [NUMBERS AND/OR RANGES]"), Usage: skip delete [NUMBERS AND/OR RANGES]"),
&skiplist); &skiplist);
add_info ("skip", skip_info, _("\ add_info ("skip", info_skip_command, _("\
Display the status of skips. You can specify numbers (e.g. \"skip info 1 3\"), \ Display the status of skips. You can specify numbers (e.g. \"skip info 1 3\"), \
ranges (e.g. \"skip info 4-8\"), or both (e.g. \"skip info 1 3 4-8\").\n\n\ ranges (e.g. \"skip info 4-8\"), or both (e.g. \"skip info 1 3 4-8\").\n\n\
If you don't specify any numbers or ranges, we'll show all skips.\n\n\ If you don't specify any numbers or ranges, we'll show all skips.\n\n\

View file

@ -60,9 +60,9 @@ static void reverse_search_command (char *, int);
static void forward_search_command (char *, int); static void forward_search_command (char *, int);
static void line_info (char *, int); static void info_line_command (char *, int);
static void source_info (char *, int); static void info_source_command (char *, int);
/* Path of directories to search for source files. /* Path of directories to search for source files.
Same format as the PATH environment variable's value. */ Same format as the PATH environment variable's value. */
@ -649,7 +649,7 @@ add_path (char *dirname, char **which_path, int parse_separators)
static void static void
source_info (char *ignore, int from_tty) info_source_command (char *ignore, int from_tty)
{ {
struct symtab *s = current_source_symtab; struct symtab *s = current_source_symtab;
struct compunit_symtab *cust; struct compunit_symtab *cust;
@ -1490,7 +1490,7 @@ print_source_lines (struct symtab *s, int line, int stopline,
/* Print info on range of pc's in a specified line. */ /* Print info on range of pc's in a specified line. */
static void static void
line_info (char *arg, int from_tty) info_line_command (char *arg, int from_tty)
{ {
struct symtabs_and_lines sals; struct symtabs_and_lines sals;
struct symtab_and_line sal; struct symtab_and_line sal;
@ -2025,10 +2025,10 @@ Setting the value to an empty string sets it to $cdir:$cwd, the default."),
show_directories_command, show_directories_command,
&setlist, &showlist); &setlist, &showlist);
add_info ("source", source_info, add_info ("source", info_source_command,
_("Information about the current source file.")); _("Information about the current source file."));
add_info ("line", line_info, _("\ add_info ("line", info_line_command, _("\
Core addresses of the code for a source line.\n\ Core addresses of the code for a source line.\n\
Line can be specified as\n\ Line can be specified as\n\
LINENUM, to list around that line in current file,\n\ LINENUM, to list around that line in current file,\n\

View file

@ -1396,7 +1396,7 @@ parse_frame_specification (const char *frame_exp, int *selected_frame_p)
ADDR_EXP. Absolutely all information in the frame is printed. */ ADDR_EXP. Absolutely all information in the frame is printed. */
static void static void
frame_info (char *addr_exp, int from_tty) info_frame_command (char *addr_exp, int from_tty)
{ {
struct frame_info *fi; struct frame_info *fi;
struct symtab_and_line sal; struct symtab_and_line sal;
@ -2132,7 +2132,7 @@ print_frame_local_vars (struct frame_info *frame, int num_tabs,
} }
void void
locals_info (char *args, int from_tty) info_locals_command (char *args, int from_tty)
{ {
print_frame_local_vars (get_selected_frame (_("No frame selected.")), print_frame_local_vars (get_selected_frame (_("No frame selected.")),
0, gdb_stdout); 0, gdb_stdout);
@ -2214,7 +2214,7 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
} }
void void
args_info (char *ignore, int from_tty) info_args_command (char *ignore, int from_tty)
{ {
print_frame_arg_vars (get_selected_frame (_("No frame selected.")), print_frame_arg_vars (get_selected_frame (_("No frame selected.")),
gdb_stdout); gdb_stdout);
@ -2630,12 +2630,12 @@ on this backtrace.\n"));
add_info ("stack", backtrace_command, add_info ("stack", backtrace_command,
_("Backtrace of the stack, or innermost COUNT frames.")); _("Backtrace of the stack, or innermost COUNT frames."));
add_info_alias ("s", "stack", 1); add_info_alias ("s", "stack", 1);
add_info ("frame", frame_info, add_info ("frame", info_frame_command,
_("All about selected stack frame, or frame at ADDR.")); _("All about selected stack frame, or frame at ADDR."));
add_info_alias ("f", "frame", 1); add_info_alias ("f", "frame", 1);
add_info ("locals", locals_info, add_info ("locals", info_locals_command,
_("Local variables of current stack frame.")); _("Local variables of current stack frame."));
add_info ("args", args_info, add_info ("args", info_args_command,
_("Argument variables of current stack frame.")); _("Argument variables of current stack frame."));
if (dbx_commands) if (dbx_commands)

View file

@ -4044,7 +4044,7 @@ output_partial_symbol_filename (const char *filename, const char *fullname,
} }
static void static void
sources_info (char *ignore, int from_tty) info_sources_command (char *ignore, int from_tty)
{ {
struct compunit_symtab *cu; struct compunit_symtab *cu;
struct symtab *s; struct symtab *s;
@ -4610,20 +4610,20 @@ symtab_symbol_info (char *regexp, enum search_domain kind, int from_tty)
} }
static void static void
variables_info (char *regexp, int from_tty) info_variables_command (char *regexp, int from_tty)
{ {
symtab_symbol_info (regexp, VARIABLES_DOMAIN, from_tty); symtab_symbol_info (regexp, VARIABLES_DOMAIN, from_tty);
} }
static void static void
functions_info (char *regexp, int from_tty) info_functions_command (char *regexp, int from_tty)
{ {
symtab_symbol_info (regexp, FUNCTIONS_DOMAIN, from_tty); symtab_symbol_info (regexp, FUNCTIONS_DOMAIN, from_tty);
} }
static void static void
types_info (char *regexp, int from_tty) info_types_command (char *regexp, int from_tty)
{ {
symtab_symbol_info (regexp, TYPES_DOMAIN, from_tty); symtab_symbol_info (regexp, TYPES_DOMAIN, from_tty);
} }
@ -5893,13 +5893,13 @@ _initialize_symtab (void)
symbol_cache_key symbol_cache_key
= register_program_space_data_with_cleanup (NULL, symbol_cache_cleanup); = register_program_space_data_with_cleanup (NULL, symbol_cache_cleanup);
add_info ("variables", variables_info, _("\ add_info ("variables", info_variables_command, _("\
All global and static variable names, or those matching REGEXP.")); All global and static variable names, or those matching REGEXP."));
if (dbx_commands) if (dbx_commands)
add_com ("whereis", class_info, variables_info, _("\ add_com ("whereis", class_info, info_variables_command, _("\
All global and static variable names, or those matching REGEXP.")); All global and static variable names, or those matching REGEXP."));
add_info ("functions", functions_info, add_info ("functions", info_functions_command,
_("All function names, or those matching REGEXP.")); _("All function names, or those matching REGEXP."));
/* FIXME: This command has at least the following problems: /* FIXME: This command has at least the following problems:
@ -5910,10 +5910,10 @@ All global and static variable names, or those matching REGEXP."));
print "struct foo *". print "struct foo *".
I also think "ptype" or "whatis" is more likely to be useful (but if I also think "ptype" or "whatis" is more likely to be useful (but if
there is much disagreement "info types" can be fixed). */ there is much disagreement "info types" can be fixed). */
add_info ("types", types_info, add_info ("types", info_types_command,
_("All type names, or those matching REGEXP.")); _("All type names, or those matching REGEXP."));
add_info ("sources", sources_info, add_info ("sources", info_sources_command,
_("Source files in the program.")); _("Source files in the program."));
add_com ("rbreak", class_breakpoint, rbreak_command, add_com ("rbreak", class_breakpoint, rbreak_command,

View file

@ -48,7 +48,7 @@
#include <algorithm> #include <algorithm>
#include "byte-vector.h" #include "byte-vector.h"
static void target_info (char *, int); static void info_target_command (char *, int);
static void generic_tls_error (void) ATTRIBUTE_NORETURN; static void generic_tls_error (void) ATTRIBUTE_NORETURN;
@ -2125,7 +2125,7 @@ target_remove_breakpoint (struct gdbarch *gdbarch,
} }
static void static void
target_info (char *args, int from_tty) info_target_command (char *args, int from_tty)
{ {
struct target_ops *t; struct target_ops *t;
int has_all_mem = 0; int has_all_mem = 0;
@ -4131,8 +4131,8 @@ initialize_targets (void)
init_dummy_target (); init_dummy_target ();
push_target (&dummy_target); push_target (&dummy_target);
add_info ("target", target_info, targ_desc); add_info ("target", info_target_command, targ_desc);
add_info ("files", target_info, targ_desc); add_info ("files", info_target_command, targ_desc);
add_setshow_zuinteger_cmd ("target", class_maintenance, &targetdebug, _("\ add_setshow_zuinteger_cmd ("target", class_maintenance, &targetdebug, _("\
Set target debugging."), _("\ Set target debugging."), _("\

View file

@ -527,7 +527,7 @@ tvariables_info_1 (void)
/* List all the trace state variables. */ /* List all the trace state variables. */
static void static void
tvariables_info (char *args, int from_tty) info_tvariables_command (char *args, int from_tty)
{ {
tvariables_info_1 (); tvariables_info_1 ();
} }
@ -2560,7 +2560,7 @@ tfind_outside_command (char *args, int from_tty)
/* info scope command: list the locals for a scope. */ /* info scope command: list the locals for a scope. */
static void static void
scope_info (char *args, int from_tty) info_scope_command (char *args, int from_tty)
{ {
struct symtabs_and_lines sals; struct symtabs_and_lines sals;
struct symbol *sym; struct symbol *sym;
@ -2795,9 +2795,9 @@ trace_dump_actions (struct command_line *action,
else if (0 == strncasecmp (action_exp, "$_ret", 5)) else if (0 == strncasecmp (action_exp, "$_ret", 5))
; ;
else if (0 == strncasecmp (action_exp, "$loc", 4)) else if (0 == strncasecmp (action_exp, "$loc", 4))
locals_info (NULL, from_tty); info_locals_command (NULL, from_tty);
else if (0 == strncasecmp (action_exp, "$arg", 4)) else if (0 == strncasecmp (action_exp, "$arg", 4))
args_info (NULL, from_tty); info_args_command (NULL, from_tty);
else else
{ /* variable */ { /* variable */
if (next_comma != NULL) if (next_comma != NULL)
@ -4213,7 +4213,7 @@ _initialize_tracepoint (void)
traceframe_number = -1; traceframe_number = -1;
tracepoint_number = -1; tracepoint_number = -1;
add_info ("scope", scope_info, add_info ("scope", info_scope_command,
_("List the variables local to a scope")); _("List the variables local to a scope"));
add_cmd ("tracepoints", class_trace, NULL, add_cmd ("tracepoints", class_trace, NULL,
@ -4236,7 +4236,7 @@ Arguments are the names of the variables to delete.\n\
If no arguments are supplied, delete all variables."), &deletelist); If no arguments are supplied, delete all variables."), &deletelist);
/* FIXME add a trace variable completer. */ /* FIXME add a trace variable completer. */
add_info ("tvariables", tvariables_info, _("\ add_info ("tvariables", info_tvariables_command, _("\
Status of trace state variables and their values.\n\ Status of trace state variables and their values.\n\
")); "));