GDB (xrefs)

Functions | Variables
/tmp/gdb-8.1/gdb/symmisc.c File Reference
`#include "defs.h"`
`#include "symtab.h"`
`#include "gdbtypes.h"`
`#include "bfd.h"`
`#include "filenames.h"`
`#include "symfile.h"`
`#include "objfiles.h"`
`#include "breakpoint.h"`
`#include "command.h"`
`#include "gdb_obstack.h"`
`#include "language.h"`
`#include "bcache.h"`
`#include "block.h"`
`#include "gdb_regex.h"`
`#include <sys/stat.h>`
`#include "dictionary.h"`
`#include "typeprint.h"`
`#include "gdbcmd.h"`
`#include "source.h"`
`#include "readline/readline.h"`
`#include "psymtab.h"`

Go to the source code of this file.

## Functions
static int | block_depth (struct block *)
static void | print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, int depth, ui_file *outfile)
void | print_symbol_bcache_statistics (void)
void | print_objfile_statistics (void)
static void | dump_objfile (struct objfile *objfile)
static void | dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
static void | dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile)
static void | dump_symtab (struct symtab *symtab, struct ui_file *outfile)
static void | maintenance_print_symbols (const char *args, int from_tty)
static void | maintenance_print_msymbols (const char *args, int from_tty)
static void | maintenance_print_objfiles (const char *regexp, int from_tty)
static void | maintenance_info_symtabs (const char *regexp, int from_tty)
static void | maintenance_check_symtabs (const char *ignore, int from_tty)
static void | maintenance_expand_symtabs (const char *args, int from_tty)
static int | maintenance_print_one_line_table (struct symtab *symtab, void *data)
static void | maintenance_info_line_tables (const char *regexp, int from_tty)
void | _initialize_symmisc (void)

## Variables
FILE * | std_in
FILE * | std_out
FILE * | std_err

## Function Documentation

## ◆ _initialize_symmisc()

void _initialize_symmisc | ( | void |  | ) |

Definition at line 1066 of file symmisc.c.

References _, add_cmd(), class_maintenance, maintenance_check_symtabs(), maintenance_expand_symtabs(), maintenance_info_line_tables(), maintenance_info_symtabs(), maintenance_print_msymbols(), maintenance_print_objfiles(), maintenance_print_symbols(), maintenanceinfolist, maintenancelist, maintenanceprintlist, std_err, std_in, and std_out.

## ◆ block_depth()

static int block_depth | ( | struct block * | block | ) |
| static

Definition at line 968 of file symmisc.c.

References BLOCK_SUPERBLOCK.

Referenced by ada_add_local_symbols(), and dump_symtab_1().

## ◆ dump_msymbols()

static void dump_msymbols | ( | struct objfile * | objfile,
|  | struct ui_file * | outfile
| ) |  |
| static

Definition at line 185 of file symmisc.c.

References _, ALL_OBJFILE_MSYMBOLS, minimal_symbol::filename, fprintf_filtered(), fputs_filtered(), get_objfile_arch(), objfile_per_bfd_storage::minimal_symbol_count, mst_abs, mst_bss, mst_data, mst_file_bss, mst_file_data, mst_file_text, mst_solib_trampoline, mst_text, mst_text_gnu_ifunc, mst_unknown, MSYMBOL_DEMANGLED_NAME, MSYMBOL_LINKAGE_NAME, MSYMBOL_OBJ_SECTION, MSYMBOL_TYPE, MSYMBOL_VALUE_ADDRESS, objfile::obfd, objfile_name(), paddress(), objfile::per_bfd, objfile::sections, obj_section::the_bfd_section, and warning().

Referenced by maintenance_print_msymbols().

## ◆ dump_objfile()

static void dump_objfile | ( | struct objfile * | objfile | ) |
| static

Definition at line 148 of file symmisc.c.

References ALL_OBJFILE_FILETABS, objfile::compunit_symtabs, quick_symbol_functions::dump, gdb_print_host_address, gdb_stdout, objfile_per_bfd_storage::minimal_symbol_count, objfile::obfd, objfile_name(), objfile::per_bfd, printf_filtered(), sym_fns::qf, objfile::sf, SYMTAB_OBJFILE, symtab_to_filename_for_display(), and wrap_here().

Referenced by maintenance_print_objfiles().

## ◆ dump_symtab()

static void dump_symtab | ( | struct symtab * | symtab,
|  | struct ui_file * | outfile
| ) |  |
| static

Definition at line 379 of file symmisc.c.

References dump_symtab_1(), symtab::language, language_auto, language_unknown, and set_language().

Referenced by maintenance_print_symbols().

## ◆ dump_symtab_1()

static void dump_symtab_1 | ( | struct symtab * | symtab,
|  | struct ui_file * | outfile
| ) |  |
| static

Definition at line 272 of file symmisc.c.

References ALL_DICT_SYMBOLS, block_depth(), BLOCK_DICT, BLOCK_END, BLOCK_FUNCTION, BLOCK_START, BLOCK_SUPERBLOCK, BLOCKVECTOR_BLOCK, BLOCKVECTOR_NBLOCKS, CATCH, COMPUNIT_FILETABS, dict_size(), END_CATCH, exception_fprintf(), fprintf_filtered(), fputs_filtered(), gdb_print_host_address, gdb_stderr, get_objfile_arch(), linetable::item, symtab::language, language_str(), linetable_entry::line, linetable::nitems, objfile_name(), paddress(), linetable_entry::pc, print_spaces(), print_symbol(), RETURN_MASK_ERROR, SYMBOL_DEMANGLED_NAME, SYMBOL_LINKAGE_NAME, SYMTAB_BLOCKVECTOR, SYMTAB_COMPUNIT, SYMTAB_DIRNAME, SYMTAB_LINETABLE, SYMTAB_OBJFILE, symtab_to_filename_for_display(), and TRY.

Referenced by dump_symtab().

## ◆ maintenance_check_symtabs()

static void maintenance_check_symtabs | ( | const char * | ignore,
|  | int | from_tty
| ) |  |
| static

Definition at line 865 of file symmisc.c.

References ALL_OBJFILE_COMPUNITS, ALL_PSPACE_OBJFILES, ALL_PSPACES, COMPUNIT_BLOCKVECTOR, compunit_primary_filetab(), host_address_to_string, objfile::objfile(), objfile_name(), printf_filtered(), objfile::pspace, QUIT, symtab_to_filename_for_display(), and wrap_here().

Referenced by _initialize_symmisc().

## ◆ maintenance_expand_symtabs()

static void maintenance_expand_symtabs | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 916 of file symmisc.c.

References _, ALL_DOMAIN, ALL_PSPACE_OBJFILES, ALL_PSPACES, gdb::argv, error(), quick_symbol_functions::expand_symtabs_matching, lookup_name_info::match_any(), objfile::objfile(), objfile::pspace, sym_fns::qf, re_comp(), and objfile::sf.

Referenced by _initialize_symmisc().

## ◆ maintenance_info_line_tables()

static void maintenance_info_line_tables | ( | const char * | regexp,
|  | int | from_tty
| ) |  |
| static

Definition at line 1031 of file symmisc.c.

References ALL_COMPUNIT_FILETABS, ALL_OBJFILE_COMPUNITS, ALL_PSPACE_OBJFILES, ALL_PSPACES, dont_repeat(), maintenance_print_one_line_table(), objfile::objfile(), objfile::pspace, QUIT, re_comp(), and symtab_to_filename_for_display().

Referenced by _initialize_symmisc().

## ◆ maintenance_info_symtabs()

static void maintenance_info_symtabs | ( | const char * | regexp,
|  | int | from_tty
| ) |  |
| static

Definition at line 771 of file symmisc.c.

References ALL_COMPUNIT_FILETABS, ALL_OBJFILE_COMPUNITS, ALL_PSPACE_OBJFILES, ALL_PSPACES, COMPUNIT_BLOCKVECTOR, COMPUNIT_DEBUGFORMAT, COMPUNIT_DIRNAME, COMPUNIT_PRODUCER, dont_repeat(), symtab::fullname, host_address_to_string, symtab::linetable, objfile::objfile(), objfile_name(), printf_filtered(), objfile::pspace, QUIT, re_comp(), symtab_to_filename_for_display(), and wrap_here().

Referenced by _initialize_symmisc().

## ◆ maintenance_print_msymbols()

static void maintenance_print_msymbols | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 690 of file symmisc.c.

References _, ALL_OBJFILES, gdb::argv, compare_filenames_for_search(), dont_repeat(), dump_msymbols(), error(), gdb_stdout, objfile::objfile(), objfile_name(), stdio_file::open(), perror_with_name(), and QUIT.

Referenced by _initialize_symmisc().

## ◆ maintenance_print_objfiles()

static void maintenance_print_objfiles | ( | const char * | regexp,
|  | int | from_tty
| ) |  |
| static

Definition at line 748 of file symmisc.c.

References ALL_PSPACE_OBJFILES, ALL_PSPACES, dont_repeat(), dump_objfile(), objfile::objfile(), objfile_name(), objfile::pspace, QUIT, and re_comp().

Referenced by _initialize_symmisc().

## ◆ maintenance_print_one_line_table()

static int maintenance_print_one_line_table | ( | struct symtab * | symtab,
|  | void * | data
| ) |  |
| static

Definition at line 984 of file symmisc.c.

References _, symtab::compunit_symtab, core_addr_to_string(), host_address_to_string, linetable::item, linetable_entry::line, linetable::nitems, objfile::objfile(), compunit_symtab::objfile, objfile_name(), linetable_entry::pc, printf_filtered(), SYMTAB_LINETABLE, and symtab_to_fullname().

Referenced by maintenance_info_line_tables().

## ◆ maintenance_print_symbols()

static void maintenance_print_symbols | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 401 of file symmisc.c.

References _, ALL_OBJFILE_FILETABS, ALL_OBJFILES, gdb::argv, compare_filenames_for_search(), dont_repeat(), dump_symtab(), error(), find_pc_line_symtab(), gdb_stdout, objfile::objfile(), objfile_name(), stdio_file::open(), parse_and_eval_address(), perror_with_name(), QUIT, and symtab_to_filename_for_display().

Referenced by _initialize_symmisc().

## ◆ print_objfile_statistics()

void print_objfile_statistics | ( | void |  | ) |

Definition at line 83 of file symmisc.c.

References _, ALL_OBJFILE_COMPUNITS, ALL_OBJFILE_FILETABS, ALL_PSPACE_OBJFILES, ALL_PSPACES, bcache_memory_used(), objfile_per_bfd_storage::filename_cache, objfile_per_bfd_storage::macro_cache, objfile_per_bfd_storage::n_minsyms, objfile::objfile(), objfile_name(), OBJSTAT, objfile::per_bfd, quick_symbol_functions::print_stats, printf_filtered(), psymbol_bcache_get_bcache(), objfile::psymbol_cache, pulongest(), sym_fns::qf, QUIT, objfile::sf, objfile_per_bfd_storage::storage_obstack, and SYMTAB_LINETABLE.

Referenced by maintenance_print_statistics().

## ◆ print_symbol()

static void print_symbol | ( | struct gdbarch * | gdbarch,
|  | struct symbol * | symbol,
|  | int | depth,
|  | ui_file * | outfile
| ) |  |
| static

Definition at line 516 of file symmisc.c.

References BLOCK_END, BLOCK_START, check_typedef(), fprintf_filtered(), fputs_filtered(), gdb_print_host_address, hex_string(), LA_PRINT_TYPE, LABEL_DOMAIN, LOC_ARG, LOC_BLOCK, LOC_COMPUTED, LOC_CONST, LOC_CONST_BYTES, LOC_LABEL, LOC_LOCAL, LOC_OPTIMIZED_OUT, LOC_REF_ARG, LOC_REGISTER, LOC_REGPARM_ADDR, LOC_STATIC, LOC_TYPEDEF, LOC_UNRESOLVED, paddress(), plongest(), print_spaces(), STRUCT_DOMAIN, SYMBOL_BLOCK_VALUE, SYMBOL_CLASS, SYMBOL_DOMAIN, SYMBOL_IS_ARGUMENT, SYMBOL_LINKAGE_NAME, SYMBOL_OBJ_SECTION, symbol_objfile(), SYMBOL_OBJFILE_OWNED, SYMBOL_PRINT_NAME, SYMBOL_TYPE, SYMBOL_VALUE, SYMBOL_VALUE_ADDRESS, SYMBOL_VALUE_BYTES, obj_section::the_bfd_section, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_STRUCT, TYPE_LENGTH, type_print_raw_options, and TYPE_TAG_NAME.

Referenced by dump_symtab_1().

## ◆ print_symbol_bcache_statistics()

void print_symbol_bcache_statistics | ( | void |  | ) |

Definition at line 62 of file symmisc.c.

References _, ALL_PSPACE_OBJFILES, ALL_PSPACES, objfile_per_bfd_storage::filename_cache, objfile_per_bfd_storage::macro_cache, objfile::objfile(), objfile_name(), objfile::per_bfd, print_bcache_statistics(), printf_filtered(), objfile::pspace, psymbol_bcache_get_bcache(), objfile::psymbol_cache, and QUIT.

Referenced by maintenance_print_statistics().

## Variable Documentation

## ◆ std_err

FILE* std_err

Definition at line 51 of file symmisc.c.

Referenced by _initialize_symmisc().

## ◆ std_in

FILE* std_in

Definition at line 49 of file symmisc.c.

Referenced by _initialize_symmisc().

## ◆ std_out

FILE* std_out

Definition at line 50 of file symmisc.c.

Referenced by _initialize_symmisc().