summaryrefslogtreecommitdiff
path: root/gdb/utils.h
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-03-21 17:37:29 +0000
committerDoug Evans <dje@google.com>2013-03-21 17:37:29 +0000
commit1666412afbfb0047bf0fb2f7e5789494eeed44f8 (patch)
tree0ec6d427ab940bacc4ef28304ff85cde9e064935 /gdb/utils.h
parentf9ac4527d2df88424339547974ccd98f555eabd0 (diff)
downloadgdb-1666412afbfb0047bf0fb2f7e5789494eeed44f8.tar.gz
New commands "mt set per-command {space,time,symtab} {on,off}".
* 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.
Diffstat (limited to 'gdb/utils.h')
-rw-r--r--gdb/utils.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/utils.h b/gdb/utils.h
index 52bcaff6c4b..9015c86b906 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -53,6 +53,11 @@ extern char *safe_strerror (int);
bfd_check_format_matches, and will be freed. */
extern const char *gdb_bfd_errmsg (bfd_error_type error_tag, char **matching);
+
+/* Reset the prompt_for_continue clock. */
+void reset_prompt_for_continue_wait_time (void);
+/* Return the time spent in prompt_for_continue. */
+struct timeval get_prompt_for_continue_wait_time (void);
/* Parsing utilites. */
@@ -110,8 +115,6 @@ extern struct cleanup *make_cleanup_htab_delete (htab_t htab);
extern void free_current_contents (void *);
-extern struct cleanup *make_command_stats_cleanup (int);
-
extern void init_page_info (void);
extern struct cleanup *make_cleanup_restore_page_info (void);
@@ -136,10 +139,6 @@ char *ldirname (const char *filename);
struct ui_file;
-extern void set_display_time (int);
-
-extern void set_display_space (int);
-
extern int query (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern int nquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern int yquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2);