GDB (API)
Defines | Functions | Variables
/home/stan/gdb/src/gdb/symtab.c File Reference
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcore.h"
#include "frame.h"
#include "target.h"
#include "value.h"
#include "symfile.h"
#include "objfiles.h"
#include "gdbcmd.h"
#include "gdb_regex.h"
#include "expression.h"
#include "language.h"
#include "demangle.h"
#include "inferior.h"
#include "source.h"
#include "filenames.h"
#include "objc-lang.h"
#include "d-lang.h"
#include "ada-lang.h"
#include "go-lang.h"
#include "p-lang.h"
#include "addrmap.h"
#include "cli/cli-utils.h"
#include "hashtab.h"
#include "gdb_obstack.h"
#include "block.h"
#include "dictionary.h"
#include <sys/types.h>
#include <fcntl.h>
#include "gdb_string.h"
#include "gdb_stat.h"
#include <ctype.h>
#include "cp-abi.h"
#include "cp-support.h"
#include "observer.h"
#include "gdb_assert.h"
#include "solist.h"
#include "macrotab.h"
#include "macroscope.h"
#include "psymtab.h"
#include "parser-defs.h"

Go to the source code of this file.

Defines

#define JAVA_PREFIX   "##JAVA$$"
#define JAVA_PREFIX_LEN   8
#define INITIAL_FILENAME_SEEN_CACHE_SIZE   100
#define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word)
#define MAX_SYMBOL_IMPLS   (LOC_FINAL_VALUE + 10)

Functions

void _initialize_symtab (void)
const char * multiple_symbols_select_mode (void)
const char * domain_name (domain_enum e)
const char * search_domain_name (enum search_domain e)
int compare_filenames_for_search (const char *filename, const char *search_name)
int iterate_over_some_symtabs (const char *name, const char *real_path, int(*callback)(struct symtab *symtab, void *data), void *data, struct symtab *first, struct symtab *after_last)
void iterate_over_symtabs (const char *name, int(*callback)(struct symtab *symtab, void *data), void *data)
struct symtablookup_symtab (const char *name)
char * gdb_mangle_name (struct type *type, int method_id, int signature_id)
void symbol_set_demangled_name (struct general_symbol_info *gsymbol, const char *name, struct obstack *obstack)
const char * symbol_get_demangled_name (const struct general_symbol_info *gsymbol)
void symbol_set_language (struct general_symbol_info *gsymbol, enum language language, struct obstack *obstack)
void symbol_set_names (struct general_symbol_info *gsymbol, const char *linkage_name, int len, int copy_name, struct objfile *objfile)
const char * symbol_natural_name (const struct general_symbol_info *gsymbol)
const char * symbol_demangled_name (const struct general_symbol_info *gsymbol)
const char * symbol_search_name (const struct general_symbol_info *gsymbol)
void init_sal (struct symtab_and_line *sal)
int matching_obj_sections (struct obj_section *obj_first, struct obj_section *obj_second)
struct symtabfind_pc_sect_symtab_via_partial (CORE_ADDR pc, struct obj_section *section)
void fixup_section (struct general_symbol_info *ginfo, CORE_ADDR addr, struct objfile *objfile)
struct symbolfixup_symbol_section (struct symbol *sym, struct objfile *objfile)
struct cleanup * demangle_for_lookup (const char *name, enum language lang, const char **result_name)
struct symbollookup_symbol_in_language (const char *name, const struct block *block, const domain_enum domain, enum language lang, struct field_of_this_result *is_a_field_of_this)
struct symbollookup_symbol (const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
struct symbollookup_language_this (const struct language_defn *lang, const struct block *block)
struct symbollookup_static_symbol_aux (const char *name, const domain_enum domain)
struct objfilelookup_objfile_from_block (const struct block *block)
struct symbollookup_symbol_aux_block (const char *name, const struct block *block, const domain_enum domain)
struct symbollookup_global_symbol_from_objfile (const struct objfile *main_objfile, const char *name, const domain_enum domain)
struct symbolbasic_lookup_symbol_nonlocal (const char *name, const struct block *block, const domain_enum domain)
struct symbollookup_symbol_static (const char *name, const struct block *block, const domain_enum domain)
struct symbollookup_symbol_global (const char *name, const struct block *block, const domain_enum domain)
int symbol_matches_domain (enum language symbol_language, domain_enum symbol_domain, domain_enum domain)
struct typelookup_transparent_type (const char *name)
struct typebasic_lookup_transparent_type (const char *name)
struct symbollookup_block_symbol (const struct block *block, const char *name, const domain_enum domain)
void iterate_over_symbols (const struct block *block, const char *name, const domain_enum domain, symbol_found_callback_ftype *callback, void *data)
struct symtabfind_pc_sect_symtab (CORE_ADDR pc, struct obj_section *section)
struct symtabfind_pc_symtab (CORE_ADDR pc)
struct symtab_and_line find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
struct symtab_and_line find_pc_line (CORE_ADDR pc, int notcurrent)
struct symtabfind_line_symtab (struct symtab *symtab, int line, int *index, int *exact_match)
 VEC (CORE_ADDR)
int find_line_pc (struct symtab *symtab, int line, CORE_ADDR *pc)
int find_line_pc_range (struct symtab_and_line sal, CORE_ADDR *startptr, CORE_ADDR *endptr)
int find_pc_line_pc_range (CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr)
struct symtab_and_line find_function_start_sal (struct symbol *sym, int funfirstline)
void skip_prologue_sal (struct symtab_and_line *sal)
void free_search_symbols (struct symbol_search *symbols)
struct cleanup * make_cleanup_free_search_symbols (struct symbol_search **symbolsp)
void search_symbols (char *regexp, enum search_domain kind, int nfiles, char *files[], struct symbol_search **matches)
void rbreak_command_wrapper (char *regexp, int from_tty)
int in_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR func_start)
CORE_ADDR skip_prologue_using_sal (struct gdbarch *gdbarch, CORE_ADDR func_addr)
void set_main_name (const char *name)
char * main_name (void)
int producer_is_realview (const char *producer)
 gdb_static_assert (MAX_SYMBOL_IMPLS<=(1<< SYMBOL_ACLASS_BITS))
int register_symbol_computed_impl (enum address_class aclass, const struct symbol_computed_ops *ops)
int register_symbol_block_impl (enum address_class aclass, const struct symbol_block_ops *ops)
int register_symbol_register_impl (enum address_class aclass, const struct symbol_register_ops *ops)
void initialize_symbol (struct symbol *sym)
struct symbolallocate_symbol (struct objfile *objfile)
struct template_symbolallocate_template_symbol (struct objfile *objfile)

Variables

int symtab_create_debug = 0
int basenames_may_differ = 0
const char multiple_symbols_ask [] = "ask"
const char multiple_symbols_all [] = "all"
const char multiple_symbols_cancel [] = "cancel"
struct blockblock_found
enum language language_of_main = language_unknown
struct symbol_implsymbol_impls = &symbol_impl[0]

Define Documentation

#define COMPLETION_LIST_ADD_SYMBOL (   symbol,
  sym_text,
  len,
  text,
  word 
)
Value:
completion_list_add_name \
        (SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word))

Definition at line 3123 of file symtab.c.

#define JAVA_PREFIX   "##JAVA$$"

Definition at line 709 of file symtab.c.

#define JAVA_PREFIX_LEN   8

Definition at line 710 of file symtab.c.

#define MAX_SYMBOL_IMPLS   (LOC_FINAL_VALUE + 10)

Definition at line 5076 of file symtab.c.


Function Documentation

void _initialize_symtab ( void  )
struct symbol* allocate_symbol ( struct objfile objfile) [read]

Definition at line 5188 of file symtab.c.

struct template_symbol* allocate_template_symbol ( struct objfile objfile) [read]

Definition at line 5202 of file symtab.c.

struct symbol* basic_lookup_symbol_nonlocal ( const char *  name,
const struct block block,
const domain_enum  domain 
) [read]

Definition at line 1724 of file symtab.c.

struct type* basic_lookup_transparent_type ( const char *  name) [read]

Definition at line 1918 of file symtab.c.

int compare_filenames_for_search ( const char *  filename,
const char *  search_name 
)

Definition at line 183 of file symtab.c.

struct cleanup* demangle_for_lookup ( const char *  name,
enum language  lang,
const char **  result_name 
) [read]

Definition at line 1182 of file symtab.c.

Definition at line 149 of file symtab.c.

struct symtab_and_line find_function_start_sal ( struct symbol sym,
int  funfirstline 
) [read]

Definition at line 2778 of file symtab.c.

int find_line_pc ( struct symtab symtab,
int  line,
CORE_ADDR pc 
)

Definition at line 2611 of file symtab.c.

int find_line_pc_range ( struct symtab_and_line  sal,
CORE_ADDR startptr,
CORE_ADDR endptr 
)

Definition at line 2638 of file symtab.c.

struct symtab* find_line_symtab ( struct symtab symtab,
int  line,
int index,
int exact_match 
) [read]

Definition at line 2479 of file symtab.c.

struct symtab_and_line find_pc_line ( CORE_ADDR  pc,
int  notcurrent 
) [read]

Definition at line 2458 of file symtab.c.

int find_pc_line_pc_range ( CORE_ADDR  pc,
CORE_ADDR startptr,
CORE_ADDR endptr 
)

Definition at line 2722 of file symtab.c.

struct symtab_and_line find_pc_sect_line ( CORE_ADDR  pc,
struct obj_section section,
int  notcurrent 
) [read]

Definition at line 2214 of file symtab.c.

struct symtab* find_pc_sect_symtab ( CORE_ADDR  pc,
struct obj_section section 
) [read]

Definition at line 2076 of file symtab.c.

struct symtab* find_pc_sect_symtab_via_partial ( CORE_ADDR  pc,
struct obj_section section 
) [read]

Definition at line 1006 of file symtab.c.

struct symtab* find_pc_symtab ( CORE_ADDR  pc) [read]

Definition at line 2190 of file symtab.c.

void fixup_section ( struct general_symbol_info ginfo,
CORE_ADDR  addr,
struct objfile objfile 
)

Definition at line 1041 of file symtab.c.

struct symbol* fixup_symbol_section ( struct symbol sym,
struct objfile objfile 
) [read]

Definition at line 1122 of file symtab.c.

void free_search_symbols ( struct symbol_search symbols)

Definition at line 3304 of file symtab.c.

char* gdb_mangle_name ( struct type type,
int  method_id,
int  signature_id 
)

Definition at line 369 of file symtab.c.

gdb_static_assert ( MAX_SYMBOL_IMPLS<=  1<< SYMBOL_ACLASS_BITS)
int in_prologue ( struct gdbarch *  gdbarch,
CORE_ADDR  pc,
CORE_ADDR  func_start 
)

Definition at line 4775 of file symtab.c.

void init_sal ( struct symtab_and_line sal)

Definition at line 926 of file symtab.c.

void initialize_symbol ( struct symbol sym)

Definition at line 5178 of file symtab.c.

int iterate_over_some_symtabs ( const char *  name,
const char *  real_path,
int(*)(struct symtab *symtab, void *data)  callback,
void *  data,
struct symtab first,
struct symtab after_last 
)

Definition at line 230 of file symtab.c.

void iterate_over_symbols ( const struct block block,
const char *  name,
const domain_enum  domain,
symbol_found_callback_ftype callback,
void *  data 
)

Definition at line 2051 of file symtab.c.

void iterate_over_symtabs ( const char *  name,
int(*)(struct symtab *symtab, void *data)  callback,
void *  data 
)

Definition at line 291 of file symtab.c.

struct symbol* lookup_block_symbol ( const struct block block,
const char *  name,
const domain_enum  domain 
) [read]

Definition at line 1996 of file symtab.c.

struct symbol* lookup_global_symbol_from_objfile ( const struct objfile main_objfile,
const char *  name,
const domain_enum  domain 
) [read]

Definition at line 1552 of file symtab.c.

struct symbol* lookup_language_this ( const struct language_defn lang,
const struct block block 
) [read]

Definition at line 1298 of file symtab.c.

struct objfile* lookup_objfile_from_block ( const struct block block) [read]

Definition at line 1507 of file symtab.c.

struct symbol* lookup_static_symbol_aux ( const char *  name,
const domain_enum  domain 
) [read]

Definition at line 1444 of file symtab.c.

struct symbol* lookup_symbol ( const char *  name,
const struct block block,
domain_enum  domain,
struct field_of_this_result is_a_field_of_this 
) [read]

Definition at line 1285 of file symtab.c.

struct symbol* lookup_symbol_aux_block ( const char *  name,
const struct block block,
const domain_enum  domain 
) [read]

Definition at line 1533 of file symtab.c.

struct symbol* lookup_symbol_global ( const char *  name,
const struct block block,
const domain_enum  domain 
) [read]

Definition at line 1825 of file symtab.c.

struct symbol* lookup_symbol_in_language ( const char *  name,
const struct block block,
const domain_enum  domain,
enum language  lang,
struct field_of_this_result is_a_field_of_this 
) [read]

Definition at line 1266 of file symtab.c.

struct symbol* lookup_symbol_static ( const char *  name,
const struct block block,
const domain_enum  domain 
) [read]

Definition at line 1769 of file symtab.c.

struct symtab* lookup_symtab ( const char *  name) [read]

Definition at line 354 of file symtab.c.

struct type* lookup_transparent_type ( const char *  name) [read]

Definition at line 1876 of file symtab.c.

char* main_name ( void  )

Definition at line 5025 of file symtab.c.

struct cleanup* make_cleanup_free_search_symbols ( struct symbol_search **  symbolsp) [read]

Definition at line 3325 of file symtab.c.

int matching_obj_sections ( struct obj_section obj_first,
struct obj_section obj_second 
)

Definition at line 945 of file symtab.c.

Definition at line 135 of file symtab.c.

int producer_is_realview ( const char *  producer)

Definition at line 5046 of file symtab.c.

void rbreak_command_wrapper ( char *  regexp,
int  from_tty 
)

Definition at line 3874 of file symtab.c.

int register_symbol_block_impl ( enum address_class  aclass,
const struct symbol_block_ops ops 
)

Definition at line 5125 of file symtab.c.

Definition at line 5099 of file symtab.c.

Definition at line 5148 of file symtab.c.

Definition at line 165 of file symtab.c.

void search_symbols ( char *  regexp,
enum search_domain  kind,
int  nfiles,
char *  files[],
struct symbol_search **  matches 
)

Definition at line 3452 of file symtab.c.

void set_main_name ( const char *  name)

Definition at line 4959 of file symtab.c.

void skip_prologue_sal ( struct symtab_and_line sal)

Definition at line 2810 of file symtab.c.

CORE_ADDR skip_prologue_using_sal ( struct gdbarch *  gdbarch,
CORE_ADDR  func_addr 
)

Definition at line 4858 of file symtab.c.

Definition at line 886 of file symtab.c.

Definition at line 502 of file symtab.c.

int symbol_matches_domain ( enum language  symbol_language,
domain_enum  symbol_domain,
domain_enum  domain 
)

Definition at line 1851 of file symtab.c.

const char* symbol_natural_name ( const struct general_symbol_info gsymbol)

Definition at line 861 of file symtab.c.

const char* symbol_search_name ( const struct general_symbol_info gsymbol)

Definition at line 915 of file symtab.c.

void symbol_set_demangled_name ( struct general_symbol_info gsymbol,
const char *  name,
struct obstack *  obstack 
)

Definition at line 471 of file symtab.c.

void symbol_set_language ( struct general_symbol_info gsymbol,
enum language language  ,
struct obstack *  obstack 
)

Definition at line 526 of file symtab.c.

void symbol_set_names ( struct general_symbol_info gsymbol,
const char *  linkage_name,
int  len,
int  copy_name,
struct objfile objfile 
)

Definition at line 713 of file symtab.c.

VEC ( CORE_ADDR  )

Definition at line 2571 of file symtab.c.


Variable Documentation

Definition at line 114 of file symtab.c.

struct block* block_found

Definition at line 144 of file symtab.c.

Definition at line 4956 of file symtab.c.

const char multiple_symbols_all[] = "all"

Definition at line 121 of file symtab.c.

const char multiple_symbols_ask[] = "ask"

Definition at line 120 of file symtab.c.

const char multiple_symbols_cancel[] = "cancel"

Definition at line 122 of file symtab.c.

Definition at line 5087 of file symtab.c.

Definition at line 109 of file symtab.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines