GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include <ctype.h>
#include <signal.h>
#include <sys/time.h>
#include <time.h>
#include "command.h"
#include "gdbcmd.h"
#include "symtab.h"
#include "block.h"
#include "gdbtypes.h"
#include "demangle.h"
#include "gdbcore.h"
#include "expression.h"
#include "language.h"
#include "symfile.h"
#include "objfiles.h"
#include "value.h"
#include "gdb_assert.h"
#include "top.h"
#include "timeval-utils.h"
#include "maint.h"
#include "cli/cli-decode.h"
#include "cli/cli-utils.h"
#include "cli/cli-setshow.h"
Go to the source code of this file.
Classes | |
struct | cmd_stats |
Functions | |
void | _initialize_maint_cmds (void) |
static void | maintenance_command (char *, int) |
static void | maintenance_internal_error (char *args, int from_tty) |
static void | maintenance_demangle (char *, int) |
static void | maintenance_time_display (char *, int) |
static void | maintenance_space_display (char *, int) |
static void | maintenance_info_command (char *, int) |
static void | maintenance_info_sections (char *, int) |
static void | maintenance_print_command (char *, int) |
static void | maintenance_do_deprecate (char *, int) |
static void | show_watchdog (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | maintenance_dump_me (char *args, int from_tty) |
static void | maintenance_internal_warning (char *args, int from_tty) |
static int | match_substring (const char *string, const char *substr) |
static int | match_bfd_flags (char *string, flagword flags) |
static void | print_bfd_flags (flagword flags) |
static void | maint_print_section_info (const char *name, flagword flags, CORE_ADDR addr, CORE_ADDR endaddr, unsigned long filepos, int addr_size) |
static void | print_bfd_section_info (bfd *abfd, asection *asect, void *arg) |
static void | print_objfile_section_info (bfd *abfd, struct obj_section *asect, char *string) |
static void | maintenance_print_statistics (char *args, int from_tty) |
static void | maintenance_print_architecture (char *args, int from_tty) |
static void | maintenance_translate_address (char *arg, int from_tty) |
static void | maintenance_deprecate (char *args, int from_tty) |
static void | maintenance_undeprecate (char *args, int from_tty) |
static void | maintenance_set_cmd (char *args, int from_tty) |
static void | maintenance_show_cmd (char *args, int from_tty) |
static void | show_maintenance_profile_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *c) |
void | set_per_command_time (int new_value) |
void | set_per_command_space (int new_value) |
static void | count_symtabs_and_blocks (int *nr_symtabs_ptr, int *nr_primary_symtabs_ptr, int *nr_blocks_ptr) |
static void | report_command_stats (void *arg) |
struct cleanup * | make_command_stats_cleanup (int msg_type) |
static void | set_per_command_cmd (char *args, int from_tty) |
static void | show_per_command_cmd (char *args, int from_tty) |
Variables | |
int | watchdog = 0 |
struct cmd_list_element * | maintenance_set_cmdlist |
struct cmd_list_element * | maintenance_show_cmdlist |
static int | maintenance_profile_p |
static int | per_command_time |
static int | per_command_space |
static int | per_command_symtab |
static struct cmd_list_element * | per_command_setlist |
static struct cmd_list_element * | per_command_showlist |
void _initialize_maint_cmds | ( | void | ) |
static void count_symtabs_and_blocks | ( | int * | nr_symtabs_ptr, |
int * | nr_primary_symtabs_ptr, | ||
int * | nr_blocks_ptr | ||
) | [static] |
Definition at line 800 of file maint.c.
References ALL_SYMTABS, BLOCKVECTOR, BLOCKVECTOR_NBLOCKS, and symtab::primary.
Referenced by make_command_stats_cleanup(), and report_command_stats().
static void maint_print_section_info | ( | const char * | name, |
flagword | flags, | ||
CORE_ADDR | addr, | ||
CORE_ADDR | endaddr, | ||
unsigned long | filepos, | ||
int | addr_size | ||
) | [static] |
Definition at line 301 of file maint.c.
References hex_string_custom(), print_bfd_flags(), and printf_filtered().
Referenced by print_bfd_section_info(), and print_objfile_section_info().
static void maintenance_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 87 of file maint.c.
References _, gdb_stdout, help_list(), maintenancelist, and printf_unfiltered().
static void maintenance_demangle | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 143 of file maint.c.
References _, current_language, language_demangle(), printf_unfiltered(), and xfree().
static void maintenance_deprecate | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 535 of file maint.c.
References _, maintenance_do_deprecate(), and printf_unfiltered().
static void maintenance_do_deprecate | ( | char * | text, |
int | deprecate | ||
) | [static] |
Definition at line 570 of file maint.c.
References _, CMD_DEPRECATED, DEPRECATED_WARN_USER, cmd_list_element::flags, len, lookup_cmd_composition(), MALLOCED_REPLACEMENT, printf_filtered(), cmd_list_element::replacement, strchr(), strrchr(), and xfree().
Referenced by maintenance_deprecate(), and maintenance_undeprecate().
static void maintenance_dump_me | ( | char * | args, |
int | from_tty | ||
) | [static] |
static void maintenance_info_command | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 191 of file maint.c.
References _, gdb_stdout, help_list(), maintenanceinfolist, and printf_unfiltered().
static void maintenance_info_sections | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 362 of file maint.c.
References _, ALL_OBJFILE_OSECTIONS, ALL_OBJFILES, core_bfd, exec_bfd, match_substring(), objfile::obfd, print_bfd_section_info(), print_objfile_section_info(), printf_filtered(), and wrap_here().
static void maintenance_internal_error | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 118 of file maint.c.
References internal_error().
static void maintenance_internal_warning | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 129 of file maint.c.
References internal_warning().
static void maintenance_print_architecture | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 414 of file maint.c.
References _, do_cleanups(), gdb_fopen(), gdb_stdout, gdbarch_dump(), get_current_arch(), make_cleanup_ui_file_delete(), and perror_with_name().
static void maintenance_print_command | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 438 of file maint.c.
References _, gdb_stdout, help_list(), maintenanceprintlist, and printf_unfiltered().
static void maintenance_print_statistics | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 407 of file maint.c.
References print_objfile_statistics(), and print_symbol_bcache_statistics().
static void maintenance_set_cmd | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 651 of file maint.c.
References _, gdb_stdout, help_list(), and printf_unfiltered().
static void maintenance_set_profile_cmd | ( | char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
static void maintenance_show_cmd | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 659 of file maint.c.
References cmd_show_list().
static void maintenance_space_display | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 178 of file maint.c.
References printf_unfiltered(), and set_per_command_space().
static void maintenance_time_display | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 169 of file maint.c.
References _, printf_unfiltered(), and set_per_command_time().
static void maintenance_translate_address | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 451 of file maint.c.
References _, ALL_OBJSECTIONS, error(), gdb_assert, hex_string(), lookup_minimal_symbol_by_pc(), lookup_minimal_symbol_by_pc_section(), bound_minimal_symbol::minsym, MULTI_OBJFILE_P, bound_minimal_symbol::objfile, obj_section::objfile, objfile_name(), p, parse_and_eval_address(), printf_filtered(), pulongest(), skip_spaces(), SYMBOL_OBJ_SECTION, SYMBOL_PRINT_NAME, SYMBOL_VALUE_ADDRESS, and obj_section::the_bfd_section.
static void maintenance_undeprecate | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 550 of file maint.c.
References _, maintenance_do_deprecate(), and printf_unfiltered().
struct cleanup* make_command_stats_cleanup | ( | int | msg_type | ) | [read] |
Definition at line 895 of file maint.c.
References count_symtabs_and_blocks(), lim_at_start, make_cleanup(), make_cleanup_dtor(), cmd_stats::msg_type, null_cleanup(), report_command_stats(), reset_prompt_for_continue_wait_time(), cmd_stats::space_enabled, cmd_stats::start_cpu_time, cmd_stats::start_nr_blocks, cmd_stats::start_nr_primary_symtabs, cmd_stats::start_nr_symtabs, cmd_stats::start_space, cmd_stats::start_wall_time, cmd_stats::symtab_enabled, cmd_stats::time_enabled, xfree(), and XZALLOC.
Referenced by captured_main(), command_handler(), and command_loop().
static int match_bfd_flags | ( | char * | string, |
flagword | flags | ||
) | [static] |
Definition at line 229 of file maint.c.
References match_substring().
Referenced by print_bfd_section_info(), and print_objfile_section_info().
static int match_substring | ( | const char * | string, |
const char * | substr | ||
) | [static] |
Definition at line 201 of file maint.c.
References strstr().
Referenced by maintenance_info_sections(), match_bfd_flags(), print_bfd_section_info(), and print_objfile_section_info().
static void print_bfd_flags | ( | flagword | flags | ) | [static] |
Definition at line 272 of file maint.c.
References printf_filtered().
Referenced by maint_print_section_info().
static void print_bfd_section_info | ( | bfd * | abfd, |
asection * | asect, | ||
void * | arg | ||
) | [static] |
Definition at line 315 of file maint.c.
References flags, gdb_bfd_section_index(), gdbarch_addr_bit(), gdbarch_from_bfd(), maint_print_section_info(), match_bfd_flags(), match_substring(), name, and printf_filtered().
Referenced by maintenance_info_sections().
static void print_objfile_section_info | ( | bfd * | abfd, |
struct obj_section * | asect, | ||
char * | string | ||
) | [static] |
Definition at line 339 of file maint.c.
References flags, gdbarch_addr_bit(), gdbarch_from_bfd(), maint_print_section_info(), match_bfd_flags(), match_substring(), name, obj_section_addr, obj_section_endaddr, and obj_section::the_bfd_section.
Referenced by maintenance_info_sections().
static void report_command_stats | ( | void * | arg | ) | [static] |
Definition at line 830 of file maint.c.
References _, count_symtabs_and_blocks(), get_prompt_for_continue_wait_time(), lim_at_start, cmd_stats::msg_type, printf_unfiltered(), cmd_stats::space_enabled, cmd_stats::start_cpu_time, cmd_stats::start_nr_blocks, cmd_stats::start_nr_primary_symtabs, cmd_stats::start_nr_symtabs, cmd_stats::start_space, cmd_stats::start_wall_time, cmd_stats::symtab_enabled, and cmd_stats::time_enabled.
Referenced by make_command_stats_cleanup().
static void set_per_command_cmd | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 946 of file maint.c.
References _, do_set_command(), error(), gdb_assert, cmd_list_element::next, parse_cli_boolean_value(), set_cmd, cmd_list_element::type, var_boolean, and cmd_list_element::var_type.
void set_per_command_space | ( | int | new_value | ) |
Definition at line 792 of file maint.c.
Referenced by captured_main(), and maintenance_space_display().
void set_per_command_time | ( | int | new_value | ) |
Definition at line 783 of file maint.c.
Referenced by captured_main(), and maintenance_time_display().
static void show_maintenance_profile_p | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 668 of file maint.c.
References _, and fprintf_filtered().
static void show_per_command_cmd | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 968 of file maint.c.
References cmd_show_list().
static void show_watchdog | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 78 of file maint.c.
References _, and fprintf_filtered().
int maintenance_profile_p [static] |
Definition at line 647 of file maint.c.
Referenced by _initialize_mips_linux_nat(), _initialize_windows_tdep(), add_internal_problem_command(), and add_show_debug_regs_command().
Definition at line 648 of file maint.c.
Referenced by _initialize_mips_linux_nat(), _initialize_windows_tdep(), add_internal_problem_command(), and add_show_debug_regs_command().
struct cmd_list_element* per_command_setlist [static] |
struct cmd_list_element* per_command_showlist [static] |
int per_command_space [static] |
int per_command_symtab [static] |
int per_command_time [static] |
Definition at line 76 of file maint.c.
Referenced by getpkt_or_notif_sane_1(), mips_readchar(), and monitor_wait().