GDB (xrefs)

Classes | Macros | Typedefs | Functions | Variables
/tmp/gdb-8.1/gdb/buildsym.h File Reference

Go to the source code of this file.

## Classes
struct | subfile
struct | pending
struct | context_stack
class | scoped_free_pendings

## Macros
#define | EXTERN extern
#define | HASHSIZE
#define | PENDINGSIZE 100
#define | outermost_context_p() (context_stack_depth == 0)
#define | next_symbol_text(objfile) (*next_symbol_text_func)(objfile)

## Typedefs
typedef void() | record_line_ftype(struct subfile *subfile, int line, CORE_ADDR pc)

## Functions
void | add_symbol_to_list (struct symbol *symbol, struct pending **listhead)
struct symbol * | find_symbol_in_list (struct pending *list, char *name, int length)
struct block * | finish_block (struct symbol *symbol, struct pending **listhead, struct pending_block *old_blocks, const struct dynamic_prop *static_link, CORE_ADDR start, CORE_ADDR end)
void | record_block_range (struct block *, CORE_ADDR start, CORE_ADDR end_inclusive)
void | start_subfile (const char *name)
void | patch_subfile_names (struct subfile *subfile, const char *name)
void | push_subfile (void)
char * | pop_subfile (void)
struct block * | end_symtab_get_static_block (CORE_ADDR end_addr, int expandable, int required)
struct compunit_symtab * | end_symtab_from_static_block (struct block *static_block, int section, int expandable)
struct compunit_symtab * | end_symtab (CORE_ADDR end_addr, int section)
struct compunit_symtab * | end_expandable_symtab (CORE_ADDR end_addr, int section)
void | augment_type_symtab (void)
void | scan_file_globals (struct objfile *objfile)
void | buildsym_new_init (void)
void | buildsym_init (void)
struct context_stack * | push_context (int desc, CORE_ADDR valu)
struct context_stack * | pop_context (void)
struct compunit_symtab * | start_symtab (struct objfile *objfile, const char *name, const char *comp_dir, CORE_ADDR start_addr, enum language language)
void | restart_symtab (struct compunit_symtab *cust, const char *name, CORE_ADDR start_addr)
int | hashname (const char *name)
void | free_pending_blocks (void)
void | record_debugformat (const char *format)
void | record_producer (const char *producer)
void | merge_symbol_lists (struct pending **srclist, struct pending **targetlist)
void | set_last_source_file (const char *name)
const char * | get_last_source_file (void)
struct compunit_symtab * | buildsym_compunit_symtab (void)
struct macro_table * | get_macro_table (void)

## Variables
EXTERN CORE_ADDR | last_source_start_addr
EXTERN struct subfile * | current_subfile
EXTERN unsigned char | processing_gcc_compilation
EXTERN unsigned char | processing_acc_compilation
EXTERN unsigned int | symnum
EXTERN struct pending * | file_symbols
EXTERN struct pending * | global_symbols
EXTERN struct pending * | local_symbols
EXTERN struct using_direct * | local_using_directives
EXTERN struct using_direct * | global_using_directives
EXTERN struct context_stack * | context_stack
EXTERN int | context_stack_depth
EXTERN int | context_stack_size
EXTERN int | within_function
EXTERN const char *(* | next_symbol_text_func )(struct objfile *)
record_line_ftype | record_line

## Macro Definition Documentation

## ◆ EXTERN

#define EXTERN extern

Definition at line 46 of file buildsym.h.

## ◆ HASHSIZE

#define HASHSIZE

Value:
127 /* Size of things hashed via
hashname(). */

Definition at line 49 of file buildsym.h.

Referenced by hashname(), and scan_file_globals().

## ◆ next_symbol_text

#define next_symbol_text | ( |  | objfile | ) | (*next_symbol_text_func)(objfile)

Definition at line 194 of file buildsym.h.

Referenced by error_type(), parse_partial_symbols(), read_dbx_symtab(), and scan_xcoff_symtab().

## ◆ outermost_context_p

#define outermost_context_p | ( |  | ) | (context_stack_depth == 0)

Definition at line 181 of file buildsym.h.

Referenced by read_func_scope().

## ◆ PENDINGSIZE

#define PENDINGSIZE 100

Definition at line 99 of file buildsym.h.

Referenced by add_symbol_to_list().

## Typedef Documentation

## ◆ record_line_ftype

typedef void() record_line_ftype(struct subfile *subfile, int line, CORE_ADDR pc)

Definition at line 189 of file buildsym.h.

## Function Documentation

## ◆ add_symbol_to_list()

void add_symbol_to_list | ( | struct symbol * | symbol,
|  | struct pending ** | listhead
| ) |  |

Definition at line 216 of file buildsym.c.

References free_pendings, symbol::ginfo, general_symbol_info::name, pending::next, pending::nsyms, PENDINGSIZE, symbol, and XNEW.

Referenced by coff_read_enum_type(), common_block_end(), define_symbol(), fixup_go_packaging(), merge_symbol_lists(), new_symbol_full(), patch_block_stabs(), process_coff_symbol(), process_xcoff_symbol(), psymtab_to_symtab_1(), and read_enum_type().

## ◆ augment_type_symtab()

void augment_type_symtab | ( | void |  | ) |

Definition at line 1581 of file buildsym.c.

References _, BLOCK_DICT, BLOCKVECTOR_BLOCK, complaint, COMPUNIT_BLOCKVECTOR, buildsym_compunit::compunit_symtab, context_stack_depth, dict_add_pending(), file_symbols, GLOBAL_BLOCK, global_symbols, have_line_numbers, pending_blocks, pending_macros, reset_symtab_globals(), set_missing_symtab(), STATIC_BLOCK, and symfile_complaints.

Referenced by process_full_type_unit().

## ◆ buildsym_compunit_symtab()

struct compunit_symtab* buildsym_compunit_symtab | ( | void |  | ) |

Definition at line 986 of file buildsym.c.

References buildsym_compunit::compunit_symtab, and gdb_assert.

Referenced by dwarf_decode_lines().

## ◆ buildsym_init()

void buildsym_init | ( | void |  | ) |

Definition at line 1748 of file buildsym.c.

References context_stack_size, file_symbols, free_pendings, gdb_assert, global_symbols, global_using_directives, INITIAL_CONTEXT_STACK_SIZE, pending_addrmap, pending_addrmap_interesting, pending_blocks, pending_macros, and XNEWVEC.

Referenced by buildsym_new_init(), dbx_psymtab_to_symtab_1(), process_full_comp_unit(), process_full_type_unit(), and xcoff_psymtab_to_symtab_1().

## ◆ buildsym_new_init()

void buildsym_new_init | ( | void |  | ) |

Definition at line 1779 of file buildsym.c.

References buildsym_init().

Referenced by coffstab_build_psymtabs(), dbx_new_init(), elf_new_init(), elfstab_build_psymtabs(), mdebug_build_psymtabs(), mipscoff_new_init(), stabsect_build_psymtabs(), and xcoff_new_init().

## ◆ end_expandable_symtab()

struct compunit_symtab* end_expandable_symtab | ( | CORE_ADDR | end_addr,
|  | int | section
| ) |  |

Definition at line 1547 of file buildsym.c.

References end_symtab_from_static_block(), and end_symtab_get_static_block().

Referenced by process_full_type_unit().

## ◆ end_symtab()

struct compunit_symtab* end_symtab | ( | CORE_ADDR | end_addr,
|  | int | section
| ) |  |

Definition at line 1536 of file buildsym.c.

References end_symtab_from_static_block(), and end_symtab_get_static_block().

Referenced by coff_end_symtab(), process_one_symbol(), psymtab_to_symtab_1(), read_ofile_symtab(), and read_xcoff_symtab().

## ◆ end_symtab_from_static_block()

struct compunit_symtab* end_symtab_from_static_block | ( | struct block * | static_block,
|  | int | section,
|  | int | expandable
| ) |  |

Definition at line 1488 of file buildsym.c.

References end_symtab_with_blockvector(), and reset_symtab_globals().

Referenced by end_expandable_symtab(), end_symtab(), and process_full_comp_unit().

## ◆ end_symtab_get_static_block()

struct block* end_symtab_get_static_block | ( | CORE_ADDR | end_addr,
|  | int | expandable,
|  | int | required
| ) |  |

Definition at line 1218 of file buildsym.c.

References _, pending_block::block, BLOCK_START, cleanup_undefined_stabs_types(), complaint, context_stack_depth, context_stack::end_addr, file_symbols, finish_block(), finish_block_internal(), finish_global_stabs(), objfile::flags, global_symbols, global_using_directives, have_line_numbers, last_source_start_addr, local_symbols, context_stack::name, pending_block::next, OBJF_REORDERED, buildsym_compunit::objfile, context_stack::old_blocks, pending_blocks, pending_macros, pop_context(), context_stack::start_addr, and symfile_complaints.

Referenced by end_expandable_symtab(), end_symtab(), and process_full_comp_unit().

## ◆ find_symbol_in_list()

struct symbol* find_symbol_in_list | ( | struct pending * | list,
|  | char * | name,
|  | int | length
| ) |  |

Definition at line 250 of file buildsym.c.

References name, pending::next, pending::nsyms, pending::symbol, and SYMBOL_LINKAGE_NAME.

Referenced by patch_block_stabs().

## ◆ finish_block()

struct block* finish_block | ( | struct symbol * | symbol,
|  | struct pending ** | listhead,
|  | struct pending_block * | old_blocks,
|  | const struct dynamic_prop * | static_link,
|  | CORE_ADDR | start,
|  | CORE_ADDR | end
| ) |  |

Definition at line 528 of file buildsym.c.

References finish_block_internal().

Referenced by coff_symtab_read(), end_symtab_get_static_block(), process_one_symbol(), read_func_scope(), read_lexical_block_scope(), and read_xcoff_symtab().

## ◆ free_pending_blocks()

void free_pending_blocks | ( | void |  | ) |

Definition at line 318 of file buildsym.c.

References pending_block_obstack, and pending_blocks.

Referenced by dbx_symfile_read(), make_blockvector(), xcoff_initial_scan(), and scoped_free_pendings::~scoped_free_pendings().

## ◆ get_last_source_file()

const char* get_last_source_file | ( | void |  | ) |

Definition at line 1736 of file buildsym.c.

References last_source_file.

Referenced by coff_symtab_read(), process_linenos(), process_one_symbol(), psymtab_to_symtab_1(), and read_xcoff_symtab().

## ◆ get_macro_table()

struct macro_table* get_macro_table | ( | void |  | ) |

Definition at line 996 of file buildsym.c.

References buildsym_compunit::compunit_symtab, gdb_assert, objfile_per_bfd_storage::macro_cache, new_macro_table(), buildsym_compunit::objfile, objfile::objfile(), pending_macros, objfile::per_bfd, and objfile_per_bfd_storage::storage_obstack.

Referenced by macro_start_file().

## ◆ hashname()

int hashname | ( | const char * | name | ) |

Definition at line 1671 of file buildsym.c.

References hash(), HASHSIZE, and name.

Referenced by common_block_end(), define_symbol(), parse_symbol(), patch_opaque_types(), process_coff_symbol(), and scan_file_globals().

## ◆ merge_symbol_lists()

void merge_symbol_lists | ( | struct pending ** | srclist,
|  | struct pending ** | targetlist
| ) |  |

Definition at line 1698 of file buildsym.c.

References add_symbol_to_list(), free_pendings, and merge_symbol_lists().

Referenced by merge_symbol_lists().

## ◆ patch_subfile_names()

void patch_subfile_names | ( | struct subfile * | subfile,
|  | const char * | name
| ) |  |

Definition at line 831 of file buildsym.c.

References buildsym_compunit::comp_dir, deduce_language_from_filename(), subfile::language, language_unknown, subfile::name, name, subfile::next, and set_last_source_file().

Referenced by process_one_symbol().

## ◆ pop_context()

struct context_stack* pop_context | ( | void |  | ) |

Definition at line 1660 of file buildsym.c.

References context_stack_depth, and gdb_assert.

Referenced by coff_symtab_read(), end_symtab_get_static_block(), process_one_symbol(), read_func_scope(), read_lexical_block_scope(), and read_xcoff_symtab().

## ◆ pop_subfile()

char* pop_subfile | ( | void |  | ) |

Definition at line 883 of file buildsym.c.

References _, internal_error(), name, subfile_stack::name, subfile_stack::next, subfile_stack, and xfree().

Referenced by process_linenos(), and process_one_symbol().

## ◆ push_context()

struct context_stack* push_context | ( | int | desc,
|  | CORE_ADDR | valu
| ) |  |

Definition at line 1630 of file buildsym.c.

References context_stack, context_stack_depth, context_stack_size, context_stack::depth, local_symbols, local_using_directives, context_stack::local_using_directives, context_stack::locals, context_stack::name, context_stack::old_blocks, pending_blocks, context_stack::start_addr, and xrealloc().

Referenced by coff_symtab_read(), process_one_symbol(), read_func_scope(), read_lexical_block_scope(), and read_xcoff_symtab().

## ◆ push_subfile()

void push_subfile | ( | void |  | ) |

Definition at line 868 of file buildsym.c.

References _, current_subfile, internal_error(), subfile::name, subfile_stack::name, subfile_stack::next, subfile_stack, and XNEW.

Referenced by process_linenos(), and process_one_symbol().

## ◆ record_block_range()

void record_block_range | ( | struct block * | ,
|  | CORE_ADDR | start,
|  | CORE_ADDR | end_inclusive
| ) |  |

Definition at line 578 of file buildsym.c.

References addrmap_create_mutable(), addrmap_set_empty(), BLOCK_END, BLOCK_START, pending_addrmap, pending_addrmap_interesting, and pending_addrmap_obstack.

Referenced by dwarf2_record_block_ranges().

## ◆ record_debugformat()

void record_debugformat | ( | const char * | format | ) |

Definition at line 1678 of file buildsym.c.

References buildsym_compunit::debugformat.

Referenced by coff_start_symtab(), dwarf2_start_symtab(), process_one_symbol(), and read_xcoff_symtab().

## ◆ record_producer()

void record_producer | ( | const char * | producer | ) |

Definition at line 1684 of file buildsym.c.

References buildsym_compunit::producer.

Referenced by dwarf2_start_symtab().

## ◆ restart_symtab()

void restart_symtab | ( | struct compunit_symtab * | cust,
|  | const char * | name,
|  | CORE_ADDR | start_addr
| ) |  |

Definition at line 1091 of file buildsym.c.

References COMPUNIT_DIRNAME, compunit_language(), COMPUNIT_OBJFILE, buildsym_compunit::compunit_symtab, name, prepare_for_building(), and start_buildsym_compunit().

Referenced by setup_type_unit_groups().

## ◆ scan_file_globals()

void scan_file_globals | ( | struct objfile * | objfile | ) |

Definition at line 4621 of file stabsread.c.

References _, ALL_OBJFILE_MSYMBOLS, complaint, fix_common_block(), global_sym_chain, hash(), hashname(), HASHSIZE, LOC_BLOCK, LOC_STATIC, LOC_UNRESOLVED, memset(), mst_file_bss, mst_file_data, mst_file_text, MSYMBOL_LINKAGE_NAME, MSYMBOL_SECTION, MSYMBOL_TYPE, MSYMBOL_VALUE_ADDRESS, objfile::objfile(), objfile_name(), QUIT, SYMBOL_ACLASS_INDEX, SYMBOL_CLASS, SYMBOL_LINKAGE_NAME, SYMBOL_PRINT_NAME, SYMBOL_SECTION, SYMBOL_VALUE_ADDRESS, SYMBOL_VALUE_CHAIN, symfile_complaints, and symfile_objfile.

Referenced by dbx_read_symtab(), mdebug_read_symtab(), and xcoff_read_symtab().

## ◆ set_last_source_file()

void set_last_source_file | ( | const char * | name | ) |

Definition at line 1727 of file buildsym.c.

References last_source_file, name, and xfree().

Referenced by coff_end_symtab(), coff_symtab_read(), complete_symtab(), parse_partial_symbols(), patch_subfile_names(), prepare_for_building(), read_dbx_symtab(), read_ofile_symtab(), read_xcoff_symtab(), reset_symtab_globals(), and scan_xcoff_symtab().

## ◆ start_subfile()

void start_subfile | ( | const char * | name | ) |

Definition at line 670 of file buildsym.c.

References subfile::buildsym_compunit, buildsym_compunit, buildsym_compunit::comp_dir, current_subfile, deduce_language_from_filename(), gdb_assert, subfile::language, language_c, language_cplus, language_fortran, language_unknown, subfile::line_vector, memset(), subfile::name, name, subfile::next, SLASH_STRING, buildsym_compunit::subfiles, xfree(), and XNEW.

Referenced by dwarf2_start_subfile(), process_linenos(), process_one_symbol(), and start_symtab().

## ◆ start_symtab()

struct compunit_symtab* start_symtab | ( | struct objfile * | objfile,
|  | const char * | name,
|  | const char * | comp_dir,
|  | CORE_ADDR | start_addr,
|  | enum language | language
| ) |  |

Definition at line 1055 of file buildsym.c.

References allocate_compunit_symtab(), buildsym_compunit::compunit_symtab, current_subfile, buildsym_compunit::main_subfile, name, prepare_for_building(), start_buildsym_compunit(), and start_subfile().

Referenced by coff_start_symtab(), dwarf2_start_symtab(), process_one_symbol(), and read_xcoff_symtab().

## Variable Documentation

## ◆ context_stack

EXTERN struct context_stack* context_stack

Definition at line 170 of file buildsym.h.

Referenced by push_context().

## ◆ context_stack_depth

EXTERN int context_stack_depth

Definition at line 174 of file buildsym.h.

Referenced by augment_type_symtab(), coff_symtab_read(), end_symtab_get_static_block(), new_symbol_full(), pop_context(), prepare_for_building(), process_one_symbol(), push_context(), read_xcoff_symtab(), and using_directives().

## ◆ context_stack_size

EXTERN int context_stack_size

Definition at line 178 of file buildsym.h.

Referenced by buildsym_init(), and push_context().

## ◆ current_subfile

EXTERN struct subfile* current_subfile

Definition at line 76 of file buildsym.h.

Referenced by coff_symtab_read(), define_symbol(), dwarf_decode_lines(), dwarf_record_line_p(), enter_linenos(), free_buildsym_compunit(), lnp_state_machine::handle_set_file(), prepare_for_building(), process_coff_symbol(), process_linenos(), process_one_symbol(), psymtab_to_symtab_1(), push_subfile(), read_enum_type(), read_type(), lnp_state_machine::record_line(), setup_type_unit_groups(), start_subfile(), and start_symtab().

## ◆ file_symbols

EXTERN struct pending* file_symbols

Definition at line 112 of file buildsym.h.

Referenced by augment_type_symtab(), build_type_psymtabs_reader(), buildsym_init(), cleanup_undefined_types_1(), coff_read_enum_type(), define_symbol(), end_symtab_get_static_block(), new_symbol_full(), prepare_for_building(), process_coff_symbol(), process_full_comp_unit(), process_full_type_unit(), process_psymtab_comp_unit_reader(), process_xcoff_symbol(), read_enum_type(), read_func_scope(), read_type(), reset_symtab_globals(), and scoped_free_pendings::~scoped_free_pendings().

## ◆ global_symbols

EXTERN struct pending* global_symbols

Definition at line 116 of file buildsym.h.

Referenced by augment_type_symtab(), buildsym_init(), define_symbol(), end_symtab_get_static_block(), end_symtab_with_blockvector(), finish_global_stabs(), fixup_go_packaging(), new_symbol_full(), patch_block_stabs(), prepare_for_building(), process_coff_symbol(), process_xcoff_symbol(), reset_symtab_globals(), and scoped_free_pendings::~scoped_free_pendings().

## ◆ global_using_directives

EXTERN struct using_direct* global_using_directives

Definition at line 128 of file buildsym.h.

Referenced by buildsym_init(), end_symtab_get_static_block(), finish_block_internal(), prepare_for_building(), reset_symtab_globals(), and using_directives().

## ◆ last_source_start_addr

EXTERN CORE_ADDR last_source_start_addr

Definition at line 56 of file buildsym.h.

Referenced by aix_process_linenos(), coff_end_symtab(), end_symtab_get_static_block(), end_symtab_with_blockvector(), prepare_for_building(), and read_ofile_symtab().

## ◆ local_symbols

EXTERN struct pending* local_symbols

Definition at line 120 of file buildsym.h.

Referenced by coff_read_enum_type(), coff_symtab_read(), common_block_end(), common_block_start(), define_symbol(), end_symtab_get_static_block(), prepare_for_building(), process_coff_symbol(), process_one_symbol(), psymtab_to_symtab_1(), push_context(), read_enum_type(), read_func_scope(), read_lexical_block_scope(), read_xcoff_symtab(), and reset_symtab_globals().

## ◆ local_using_directives

EXTERN struct using_direct* local_using_directives

Definition at line 124 of file buildsym.h.

Referenced by cp_scan_for_anonymous_namespaces(), finish_block_internal(), prepare_for_building(), push_context(), read_func_scope(), read_lexical_block_scope(), reset_symtab_globals(), and using_directives().

## ◆ next_symbol_text_func

EXTERN const char*(* next_symbol_text_func) (struct objfile *)

Definition at line 198 of file buildsym.h.

Referenced by dbx_read_symtab(), mdebug_read_symtab(), parse_partial_symbols(), read_dbx_symtab(), scan_xcoff_symtab(), and xcoff_read_symtab().

## ◆ processing_acc_compilation

EXTERN unsigned char processing_acc_compilation

Definition at line 89 of file buildsym.h.

Referenced by coffstab_build_psymtabs(), elfstab_build_psymtabs(), read_dbx_symtab(), read_ofile_symtab(), and stabsect_build_psymtabs().

## ◆ processing_gcc_compilation

EXTERN unsigned char processing_gcc_compilation

Definition at line 81 of file buildsym.h.

Referenced by _initialize_go32_nat(), define_symbol(), dwarf2_start_symtab(), parse_partial_symbols(), parse_procedure(), process_one_symbol(), psymtab_to_symtab_1(), and read_ofile_symtab().

## ◆ record_line

record_line_ftype record_line

Referenced by coff_symtab_read(), enter_line_range(), enter_linenos(), process_one_symbol(), and psymtab_to_symtab_1().

## ◆ symnum

EXTERN unsigned int symnum

Definition at line 93 of file buildsym.h.

Referenced by add_old_header_file(), coff_read_enum_type(), coff_read_struct_type(), coff_symtab_read(), dbx_lookup_type(), dbx_next_symbol_text(), find_corresponding_bincl_psymtab(), parse_partial_symbols(), process_one_symbol(), read_cpp_abbrev(), read_dbx_symtab(), read_ofile_symtab(), read_one_sym(), read_type(), read_xcoff_symtab(), set_namestring(), and xcoff_next_symbol_text().

## ◆ within_function

EXTERN int within_function

Definition at line 186 of file buildsym.h.

Referenced by coff_read_enum_type(), coff_symtab_read(), define_symbol(), prepare_for_building(), process_coff_symbol(), process_one_symbol(), process_xcoff_symbol(), read_enum_type(), and read_xcoff_symtab().