mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
bd712aed2f
* NEWS: Add entry. * event-top.c: #include "maint.h". * main.c: #include "maint.h". * maint.c: #include <sys/time.h>, <time.h>, block.h, top.h, timeval-utils.h, maint.h, cli/cli-setshow.h. (per_command_time, per_command_space): New static globals. (per_command_symtab): New static global. (per_command_setlist, per_command_showlist): New static globals. (struct cmd_stats): Move here from utils.c. (set_per_command_time): Renamed from set_display_time in utils.c and moved here. All callers updated. (set_per_command_space): Renamed from set_display_space in utils.c and moved here. All callers updated. (count_symtabs_and_blocks): New function. (report_command_stats): Moved here from utils.c. Add support for printing symtab stats. Only print data if enabled before command executed. (make_command_stats_cleanup): Ditto. (sert_per_command_cmd, show_per_command_cmd): New functions. (_initialize_maint_cmds): Add new commands mt set per-command {space,time,symtab} {on,off}. * maint.h: New file. * top.c: #include "maint.h". * utils.c (reset_prompt_for_continue_wait_time): New function. (get_prompt_for_continue_wait_time): New function. * utils.h (reset_prompt_for_continue_wait_time): Declare (get_prompt_for_continue_wait_time): Declare. (make_command_stats_cleanup): Moved to maint.h. (set_display_time, set_display_space): Moved to maint.h and renamed to set_per_command_time, set_per_command_space. * cli/cli-setshow.c (parse_cli_boolean_value): Renamed from parse_binary_operation and made non-static. Don't call error, just return an error marker. All callers updated. * cli/cli-setshow.h (parse_cli_boolean_value): Declare. doc/ * gdb.texinfo (Maintenance Commands): Add docs for "mt set per-command {space,time,symtab} {on,off}". testsuite/ * gdb.base/maint.exp: Update tests for per-command stats.
35 lines
1.3 KiB
C
35 lines
1.3 KiB
C
/* Header file for GDB CLI set and show commands implementation.
|
|
Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#if !defined (CLI_SETSHOW_H)
|
|
#define CLI_SETSHOW_H 1
|
|
|
|
struct cmd_list_element;
|
|
|
|
/* Parse ARG, an option to a boolean variable.
|
|
Returns 1 for true, 0 for false, and -1 if invalid. */
|
|
extern int parse_cli_boolean_value (char *arg);
|
|
|
|
extern void do_set_command (char *arg, int from_tty,
|
|
struct cmd_list_element *c);
|
|
extern void do_show_command (char *arg, int from_tty,
|
|
struct cmd_list_element *c);
|
|
|
|
extern void cmd_show_list (struct cmd_list_element *list, int from_tty,
|
|
char *prefix);
|
|
|
|
#endif /* !defined (CLI_SETSHOW_H) */
|