GDB (xrefs)

Classes | Macros | Functions | Variables
/tmp/gdb-8.1/gdb/stabsread.c File Reference
`#include "defs.h"`
`#include "bfd.h"`
`#include "gdb_obstack.h"`
`#include "symtab.h"`
`#include "gdbtypes.h"`
`#include "expression.h"`
`#include "symfile.h"`
`#include "objfiles.h"`
`#include "aout/stab_gnu.h"`
`#include "libaout.h"`
`#include "aout/aout64.h"`
`#include "gdb-stabs.h"`
`#include "buildsym.h"`
`#include "complaints.h"`
`#include "demangle.h"`
`#include "gdb-demangle.h"`
`#include "language.h"`
`#include "target-float.h"`
`#include "cp-abi.h"`
`#include "cp-support.h"`
`#include <ctype.h>`
`#include "stabsread.h"`

Go to the source code of this file.

## Classes
struct | nextfield
struct | next_fnfieldlist
struct | field_info
struct | nat
struct | ref_map

## Macros
#define | EXTERN
#define | STABS_CONTINUE(pp, objfile)
#define | INITIAL_TYPE_VECTOR_LENGTH 160
#define | VISIBILITY_PRIVATE '0' /* Stabs character for private field */
#define | VISIBILITY_PROTECTED '1' /* Stabs character for protected fld */
#define | VISIBILITY_PUBLIC '2' /* Stabs character for public field */
#define | VISIBILITY_IGNORE '9' /* Optimized out or zero length */
#define | MAX_CHUNK_REFS 100
#define | REF_CHUNK_SIZE (MAX_CHUNK_REFS * sizeof (struct ref_map))
#define | REF_MAP_SIZE(ref_chunk) ((ref_chunk) * REF_CHUNK_SIZE)
#define | NUMBER_RECOGNIZED 34

## Functions
static void | read_one_struct_field (struct field_info *, const char **, const char *, struct type *, struct objfile *)
static struct type * | dbx_alloc_type (int[2], struct objfile *)
static long | read_huge_number (const char **, int, int *, int)
static struct type * | error_type (const char **, struct objfile *)
static void | patch_block_stabs (struct pending *, struct pending_stabs *, struct objfile *)
static void | fix_common_block (struct symbol *, CORE_ADDR)
static int | read_type_number (const char **, int *)
static struct type * | read_type (const char **, struct objfile *)
static struct type * | read_range_type (const char **, int[2], int, struct objfile *)
static struct type * | read_sun_builtin_type (const char **, int[2], struct objfile *)
static struct type * | read_sun_floating_type (const char **, int[2], struct objfile *)
static struct type * | read_enum_type (const char **, struct type *, struct objfile *)
static struct type * | rs6000_builtin_type (int, struct objfile *)
static int | read_member_functions (struct field_info *, const char **, struct type *, struct objfile *)
static int | read_struct_fields (struct field_info *, const char **, struct type *, struct objfile *)
static int | read_baseclasses (struct field_info *, const char **, struct type *, struct objfile *)
static int | read_tilde_fields (struct field_info *, const char **, struct type *, struct objfile *)
static int | attach_fn_fields_to_type (struct field_info *, struct type *)
static int | attach_fields_to_type (struct field_info *, struct type *, struct objfile *)
static struct type * | read_struct_type (const char **, struct type *, enum type_code, struct objfile *)
static struct type * | read_array_type (const char **, struct type *, struct objfile *)
static struct field * | read_args (const char **, int, struct objfile *, int *, int *)
static void | add_undefined_type (struct type *, int[2])
static int | read_cpp_abbrev (struct field_info *, const char **, struct type *, struct objfile *)
static const char * | find_name_end (const char *name)
static int | process_reference (const char **string)
void | stabsread_clear_cache (void)
static void | invalid_cpp_abbrev_complaint (const char *arg1)
static void | reg_value_complaint (int regnum, int num_regs, const char *sym)
static void | stabs_general_complaint (const char *arg1)
static struct type ** | dbx_lookup_type (int typenums[2], struct objfile *objfile)
static struct type * | dbx_init_float_type (struct objfile *objfile, int bits)
void | ref_add (int refnum, struct symbol *sym, const char *stabs, CORE_ADDR value)
struct symbol * | ref_search (int refnum)
int | symbol_reference_defined (const char **string)
static int | stab_reg_to_regnum (struct symbol *sym, struct gdbarch *gdbarch)
struct symbol * | define_symbol (CORE_ADDR valu, const char *string, int desc, int type, struct objfile *objfile)
static char * | stabs_method_name_from_physname (const char *physname)
static void | complain_about_struct_wipeout (struct type *type)
static void | set_length_in_type_chain (struct type *type)
void | common_block_start (const char *name, struct objfile *objfile)
void | common_block_end (struct objfile *objfile)
static void | add_undefined_type_noname (struct type *type, int typenums[2])
static void | add_undefined_type_1 (struct type *type)
static void | cleanup_undefined_types_noname (struct objfile *objfile)
static void | cleanup_undefined_types_1 (void)
void | cleanup_undefined_stabs_types (struct objfile *objfile)
void | scan_file_globals (struct objfile *objfile)
void | stabsread_init (void)
void | stabsread_new_init (void)
void | start_stabs (void)
void | end_stabs (void)
void | finish_global_stabs (struct objfile *objfile)
void | _initialize_stabsread (void)

## Variables
static const char | vptr_name [] = "_vptr$"
static const char | vb_name [] = "_vb$"
static struct type ** | undef_types
static int | undef_types_allocated
static int | undef_types_length
static struct symbol * | current_symbol = NULL
static struct nat * | noname_undefs
static int | noname_undefs_allocated
static int | noname_undefs_length
static struct type ** | type_vector
static int | type_vector_length
static struct ref_map * | ref_map
static int | ref_count = 0
static int | ref_chunk = 0
static const struct symbol_register_ops | stab_register_funcs
static int | stab_register_index
static int | stab_regparm_index
static const struct objfile_data * | rs6000_builtin_type_data
static struct pending * | common_block
static int | common_block_i
static char * | common_block_name

## Macro Definition Documentation

## ◆ EXTERN

#define EXTERN

Definition at line 50 of file stabsread.c.

## ◆ INITIAL_TYPE_VECTOR_LENGTH

#define INITIAL_TYPE_VECTOR_LENGTH 160

Definition at line 227 of file stabsread.c.

Referenced by dbx_lookup_type().

## ◆ MAX_CHUNK_REFS

#define MAX_CHUNK_REFS 100

Definition at line 505 of file stabsread.c.

Referenced by ref_add().

## ◆ NUMBER_RECOGNIZED

#define NUMBER_RECOGNIZED 34

Referenced by rs6000_builtin_type().

## ◆ REF_CHUNK_SIZE

#define REF_CHUNK_SIZE (MAX_CHUNK_REFS * sizeof (struct ref_map))

Definition at line 506 of file stabsread.c.

Referenced by ref_add().

## ◆ REF_MAP_SIZE

#define REF_MAP_SIZE | ( |  | ref_chunk | ) | ((ref_chunk) * REF_CHUNK_SIZE)

Definition at line 507 of file stabsread.c.

Referenced by ref_add().

## ◆ STABS_CONTINUE

#define STABS_CONTINUE | ( |  | pp,
|  |  | objfile
| ) |  |

Value:
do { \
if (**(pp) == '\\' || (**(pp) == '?' && (*(pp))[1] == '\0')) \
*(pp) = next_symbol_text (objfile); \
} while (0)
next_symbol_text
#define next_symbol_text(objfile)
Definition: buildsym.h:194
objfile
Definition: objfiles.h:286

Definition at line 206 of file stabsread.c.

Referenced by read_args(), read_baseclasses(), read_enum_type(), read_member_functions(), read_struct_fields(), and read_tilde_fields().

## ◆ VISIBILITY_IGNORE

#define VISIBILITY_IGNORE '9' /* Optimized out or zero length */

Definition at line 493 of file stabsread.c.

Referenced by attach_fields_to_type(), and read_one_struct_field().

## ◆ VISIBILITY_PRIVATE

#define VISIBILITY_PRIVATE '0' /* Stabs character for private field */

Definition at line 490 of file stabsread.c.

Referenced by attach_fields_to_type(), read_baseclasses(), read_cpp_abbrev(), and read_member_functions().

## ◆ VISIBILITY_PROTECTED

#define VISIBILITY_PROTECTED '1' /* Stabs character for protected fld */

Definition at line 491 of file stabsread.c.

Referenced by attach_fields_to_type(), read_baseclasses(), and read_member_functions().

## ◆ VISIBILITY_PUBLIC

#define VISIBILITY_PUBLIC '2' /* Stabs character for public field */

Definition at line 492 of file stabsread.c.

Referenced by attach_fields_to_type(), read_baseclasses(), and read_one_struct_field().

## Function Documentation

## ◆ _initialize_stabsread()

void _initialize_stabsread | ( | void |  | ) |

Definition at line 4846 of file stabsread.c.

References LOC_REGISTER, LOC_REGPARM_ADDR, noname_undefs, noname_undefs_allocated, noname_undefs_length, register_symbol_register_impl(), rs6000_builtin_type_data, stab_register_funcs, stab_register_index, stab_regparm_index, undef_types, undef_types_allocated, undef_types_length, and XNEWVEC.

## ◆ add_undefined_type()

static void add_undefined_type | ( | struct type * | type,
|  | int | typenums[2]
| ) |  |
| static

Definition at line 4477 of file stabsread.c.

References add_undefined_type_1(), add_undefined_type_noname(), and TYPE_TAG_NAME.

Referenced by read_type().

## ◆ add_undefined_type_1()

static void add_undefined_type_1 | ( | struct type * | type | ) |
| static

Definition at line 4451 of file stabsread.c.

References type, undef_types, undef_types_allocated, undef_types_length, and xrealloc().

Referenced by add_undefined_type().

## ◆ add_undefined_type_noname()

static void add_undefined_type_noname | ( | struct type * | type,
|  | int | typenums[2]
| ) |  |
| static

Definition at line 4429 of file stabsread.c.

References noname_undefs, noname_undefs_allocated, noname_undefs_length, type, nat::type, nat::typenums, and xrealloc().

Referenced by add_undefined_type().

## ◆ attach_fields_to_type()

static int attach_fields_to_type | ( | struct field_info * | fip,
|  | struct type * | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 3336 of file stabsread.c.

References _, ALLOCATE_CPLUS_STRUCT_TYPE, B_BYTES, B_CLRALL, B_TYPE, complaint, nextfield::field, field_info::list, memset(), nextfield::next, scan(), SET_TYPE_FIELD_IGNORE, SET_TYPE_FIELD_PRIVATE, SET_TYPE_FIELD_PROTECTED, symfile_complaints, TYPE_ALLOC, TYPE_FIELD, TYPE_FIELD_IGNORE_BITS, TYPE_FIELD_PRIVATE_BITS, TYPE_FIELD_PROTECTED_BITS, TYPE_FIELDS, TYPE_NFIELDS, nextfield::visibility, VISIBILITY_IGNORE, VISIBILITY_PRIVATE, VISIBILITY_PROTECTED, and VISIBILITY_PUBLIC.

Referenced by read_struct_type().

## ◆ attach_fn_fields_to_type()

static int attach_fn_fields_to_type | ( | struct field_info * | fip,
|  | struct type * | type
| ) |  |
| static

Definition at line 3317 of file stabsread.c.

References next_fnfieldlist::fn_fieldlist, field_info::fnlist, next_fnfieldlist::next, TYPE_FN_FIELDLISTS, and TYPE_NFN_FIELDS.

Referenced by read_struct_type().

## ◆ cleanup_undefined_stabs_types()

void cleanup_undefined_stabs_types | ( | struct objfile * | objfile | ) |

Definition at line 4610 of file stabsread.c.

References cleanup_undefined_types_1(), and cleanup_undefined_types_noname().

Referenced by end_symtab_get_static_block().

## ◆ cleanup_undefined_types_1()

static void cleanup_undefined_types_1 | ( | void |  | ) |
| static

Definition at line 4523 of file stabsread.c.

References _, complaint, file_symbols, LOC_TYPEDEF, pending::next, pending::nsyms, replace_type(), STRUCT_DOMAIN, pending::symbol, SYMBOL_CLASS, SYMBOL_DOMAIN, SYMBOL_LINKAGE_NAME, SYMBOL_TYPE, symfile_complaints, type, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_INSTANCE_FLAGS, TYPE_STUB, TYPE_TAG_NAME, undef_types, and undef_types_length.

Referenced by cleanup_undefined_stabs_types().

## ◆ cleanup_undefined_types_noname()

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

Definition at line 4488 of file stabsread.c.

References dbx_lookup_type(), noname_undefs, noname_undefs_length, replace_type(), type, nat::type, TYPE_CODE, TYPE_CODE_UNDEF, TYPE_INSTANCE_FLAGS, and nat::typenums.

Referenced by cleanup_undefined_stabs_types().

## ◆ common_block_end()

void common_block_end | ( | struct objfile * | objfile | ) |

Definition at line 4351 of file stabsread.c.

References _, add_symbol_to_list(), allocate_symbol(), common_block, common_block_i, common_block_name, complaint, global_sym_chain, hashname(), LOC_BLOCK, local_symbols, pending::next, pending::nsyms, pending::symbol, SYMBOL_ACLASS_INDEX, SYMBOL_LINKAGE_NAME, SYMBOL_SET_LINKAGE_NAME, SYMBOL_TYPE, SYMBOL_VALUE_CHAIN, and symfile_complaints.

Referenced by process_one_symbol(), and process_xcoff_symbol().

## ◆ common_block_start()

void common_block_start | ( | const char * | name,
|  | struct objfile * | objfile
| ) |  |

Definition at line 4335 of file stabsread.c.

References _, common_block_i, common_block_name, complaint, local_symbols, name, pending::nsyms, and symfile_complaints.

Referenced by process_one_symbol(), and process_xcoff_symbol().

## ◆ complain_about_struct_wipeout()

static void complain_about_struct_wipeout | ( | struct type * | type | ) |
| static

Definition at line 3426 of file stabsread.c.

References _, complaint, name, symfile_complaints, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_NAME, and TYPE_TAG_NAME.

Referenced by read_struct_type(), and set_length_in_type_chain().

## ◆ dbx_alloc_type()

static struct type * dbx_alloc_type | ( | int | typenums[2],
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 336 of file stabsread.c.

References alloc_type(), and dbx_lookup_type().

Referenced by read_type().

## ◆ dbx_init_float_type()

static struct type* dbx_init_float_type | ( | struct objfile * | objfile,
|  | int | bits
| ) |  |
| static

Definition at line 361 of file stabsread.c.

References bits, gdbarch_floatformat_for_type(), get_objfile_arch(), init_float_type(), init_type(), type, and TYPE_CODE_ERROR.

Referenced by read_range_type(), and read_sun_floating_type().

## ◆ dbx_lookup_type()

static struct type** dbx_lookup_type | ( | int | typenums[2],
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 238 of file stabsread.c.

References _, objfile_type::builtin_error, complaint, HEADER_FILES, INITIAL_TYPE_VECTOR_LENGTH, header_file::length, memset(), N_HEADER_FILES, n_this_object_header_files, objfile_type(), rs6000_builtin_type(), symfile_complaints, symnum, this_object_header_files, type_vector, type_vector_length, header_file::vector, warning(), XNEWVEC, and xrealloc().

Referenced by cleanup_undefined_types_noname(), dbx_alloc_type(), read_range_type(), and read_type().

## ◆ define_symbol()

struct symbol* define_symbol | ( | CORE_ADDR | valu,
|  | const char * | string,
|  | int | desc,
|  | int | type,
|  | struct objfile * | objfile
| ) |  |

Definition at line 645 of file stabsread.c.

References _, add_symbol_to_list(), allocate_symbol(), BMSYMBOL_VALUE_ADDRESS, objfile_type::builtin_char, objfile_type::builtin_double, objfile_type::builtin_int, objfile_type::builtin_long, objfile_type::builtin_unsigned_int, complaint, cp_canonicalize_string(), cp_scan_for_anonymous_namespaces(), create_array_type(), create_static_range_type(), current_subfile, current_symbol, error_type(), file_symbols, find_name_end(), gdbarch_believe_pcc_promotion(), gdbarch_byte_order(), gdbarch_int_bit(), gdbarch_stabs_argument_has_addr(), gdbarch_static_transform_name(), gdbarch_static_transform_name_p(), get_objfile_arch(), global_sym_chain, global_symbols, hashname(), is_cplus_marker(), subfile::language, language_ada, language_cplus, language_pascal, LOC_ARG, LOC_BLOCK, LOC_CONST, LOC_CONST_BYTES, LOC_LABEL, LOC_LOCAL, LOC_REF_ARG, LOC_REGISTER, LOC_REGPARM_ADDR, LOC_STATIC, LOC_TYPEDEF, local_symbols, lookup_function_type(), lookup_minimal_symbol(), lookup_pointer_type(), name, pending::nsyms, obconcat(), objfile_type(), processing_gcc_compilation, read_type(), stab_register_index, stab_regparm_index, string, STRUCT_DOMAIN, pending::symbol, SYMBOL_ACLASS_INDEX, SYMBOL_CLASS, SYMBOL_DOMAIN, SYMBOL_IS_ARGUMENT, SYMBOL_LANGUAGE, SYMBOL_LINE, SYMBOL_LINKAGE_NAME, SYMBOL_SET_LANGUAGE, SYMBOL_SET_LINKAGE_NAME, SYMBOL_SET_NAMES, SYMBOL_TYPE, SYMBOL_VALUE, SYMBOL_VALUE_ADDRESS, SYMBOL_VALUE_BYTES, SYMBOL_VALUE_CHAIN, symfile_complaints, TARGET_CHAR_BIT, target_float_from_string(), TYPE_ALLOC, TYPE_BASECLASS, TYPE_BASECLASS_NAME, TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_CODE_VOID, TYPE_FIELD_ARTIFICIAL, TYPE_FIELD_TYPE, TYPE_FIELDS, TYPE_LENGTH, TYPE_N_BASECLASSES, TYPE_NAME, type_name_no_tag(), TYPE_NFIELDS, TYPE_PROTOTYPED, TYPE_TAG_NAME, TYPE_UNSIGNED, VAR_DOMAIN, vtbl_ptr_name, and within_function.

Referenced by process_one_symbol(), process_xcoff_symbol(), and read_xcoff_symtab().

## ◆ end_stabs()

void end_stabs | ( | void |  | ) |

Definition at line 4794 of file stabsread.c.

References previous_stab_code, type_vector, type_vector_length, and xfree().

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

## ◆ error_type()

static struct type * error_type | ( | const char ** | pp,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 1490 of file stabsread.c.

References _, objfile_type::builtin_error, complaint, next_symbol_text, objfile_type(), and symfile_complaints.

Referenced by define_symbol(), read_array_type(), read_enum_type(), read_range_type(), read_struct_type(), read_sun_builtin_type(), read_sun_floating_type(), and read_type().

## ◆ find_name_end()

static const char * find_name_end | ( | const char * | name | ) |
| static

Definition at line 4819 of file stabsread.c.

References _, error(), and name.

Referenced by define_symbol().

## ◆ finish_global_stabs()

void finish_global_stabs | ( | struct objfile * | objfile | ) |

Definition at line 4806 of file stabsread.c.

References global_stabs, global_symbols, patch_block_stabs(), and xfree().

Referenced by end_symtab_get_static_block().

## ◆ fix_common_block()

static void fix_common_block | ( | struct symbol * | sym,
|  | CORE_ADDR | valu
| ) |  |
| static

Definition at line 4410 of file stabsread.c.

References pending::next, pending::nsyms, pending::symbol, SYMBOL_TYPE, and SYMBOL_VALUE_ADDRESS.

Referenced by scan_file_globals().

## ◆ invalid_cpp_abbrev_complaint()

static void invalid_cpp_abbrev_complaint | ( | const char * | arg1 | ) |
| static

Definition at line 165 of file stabsread.c.

References _, complaint, and symfile_complaints.

Referenced by read_cpp_abbrev().

## ◆ patch_block_stabs()

static void patch_block_stabs | ( | struct pending * | symbols,
|  | struct pending_stabs * | stabs,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 380 of file stabsread.c.

References add_symbol_to_list(), allocate_symbol(), pending_stabs::count, find_symbol_in_list(), gdb_assert, global_symbols, LOC_OPTIMIZED_OUT, lookup_function_type(), name, read_type(), pending_stabs::stab, SYMBOL_ACLASS_INDEX, SYMBOL_DOMAIN, SYMBOL_SET_LINKAGE_NAME, SYMBOL_TYPE, and VAR_DOMAIN.

Referenced by finish_global_stabs().

## ◆ process_reference()

static int process_reference | ( | const char ** | string | ) |
| static

Definition at line 567 of file stabsread.c.

Referenced by follow_types(), and symbol_reference_defined().

## ◆ read_args()

static struct field * read_args | ( | const char ** | pp,
|  | int | end,
|  | struct objfile * | objfile,
|  | int * | nargsp,
|  | int * | varargsp
| ) |  |
| static

Definition at line 4271 of file stabsread.c.

References _, complaint, read_type(), STABS_CONTINUE, symfile_complaints, TYPE_CODE, TYPE_CODE_VOID, and XCNEWVEC.

Referenced by read_type().

## ◆ read_array_type()

static struct type * read_array_type | ( | const char ** | pp,
|  | struct type * | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 3583 of file stabsread.c.

References create_array_type(), create_static_range_type(), error_type(), read_huge_number(), read_type(), and type.

Referenced by read_type().

## ◆ read_baseclasses()

static int read_baseclasses | ( | struct field_info * | fip,
|  | const char ** | pp,
|  | struct type * | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 3107 of file stabsread.c.

References _, ALLOCATE_CPLUS_STRUCT_TYPE, B_BYTES, B_CLRALL, B_TYPE, complaint, nextfield::field, FIELD_BITSIZE, field_info::list, make_cleanup(), field::name, nextfield::next, read_huge_number(), read_type(), SET_FIELD_BITPOS, SET_TYPE_FIELD_VIRTUAL, STABS_CONTINUE, symfile_complaints, field::type, TYPE_ALLOC, TYPE_FIELD_VIRTUAL_BITS, TYPE_N_BASECLASSES, type_name_no_tag(), nextfield::visibility, VISIBILITY_PRIVATE, VISIBILITY_PROTECTED, VISIBILITY_PUBLIC, XCNEW, and xfree().

Referenced by read_struct_type().

## ◆ read_cpp_abbrev()

static int read_cpp_abbrev | ( | struct field_info * | fip,
|  | const char ** | pp,
|  | struct type * | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 2770 of file stabsread.c.

References _, complaint, nextfield::field, FIELD_BITSIZE, invalid_cpp_abbrev_complaint(), field_info::list, name, field::name, obconcat(), read_huge_number(), read_type(), SET_FIELD_BITPOS, symfile_complaints, symnum, field::type, type_name_no_tag(), vb_name, nextfield::visibility, VISIBILITY_PRIVATE, and vptr_name.

Referenced by read_struct_fields().

## ◆ read_enum_type()

static struct type * read_enum_type | ( | const char ** | pp,
|  | struct type * | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 3646 of file stabsread.c.

References add_symbol_to_list(), allocate_symbol(), current_subfile, error_type(), file_symbols, gdbarch_int_bit(), get_objfile_arch(), HOST_CHAR_BIT, subfile::language, LOC_CONST, local_symbols, memset(), name, pending::next, pending::nsyms, read_huge_number(), SET_FIELD_ENUMVAL, set_length_in_type_chain(), STABS_CONTINUE, pending::symbol, SYMBOL_ACLASS_INDEX, SYMBOL_DOMAIN, SYMBOL_LINKAGE_NAME, SYMBOL_SET_LANGUAGE, SYMBOL_SET_LINKAGE_NAME, SYMBOL_TYPE, SYMBOL_VALUE, type, TYPE_ALLOC, TYPE_CODE, TYPE_CODE_ENUM, TYPE_FIELD, TYPE_FIELD_BITSIZE, TYPE_FIELD_NAME, TYPE_FIELDS, TYPE_LENGTH, TYPE_NFIELDS, TYPE_STUB, TYPE_UNSIGNED, VAR_DOMAIN, and within_function.

Referenced by read_type().

## ◆ read_huge_number()

static long read_huge_number | ( | const char ** | pp,
|  | int | end,
|  | int * | bits,
|  | int | twos_complement_bits
| ) |  |
| static

Definition at line 3897 of file stabsread.c.

References bits, and LONG_MAX.

Referenced by read_array_type(), read_baseclasses(), read_cpp_abbrev(), read_enum_type(), read_member_functions(), read_one_struct_field(), read_range_type(), read_struct_type(), read_sun_builtin_type(), read_sun_floating_type(), and read_type_number().

## ◆ read_member_functions()

static int read_member_functions | ( | struct field_info * | fip,
|  | const char ** | pp,
|  | struct type * | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 2280 of file stabsread.c.

References _, ALLOCATE_CPLUS_STRUCT_TYPE, complaint, next_fnfieldlist::fn_fieldlist, fn_fieldlist::fn_fields, field_info::fnlist, gdb_assert, is_cplus_marker(), is_destructor_name(), type::length, fn_fieldlist::length, make_cleanup(), memset(), fn_fieldlist::name, next_fnfieldlist::next, obconcat(), read_huge_number(), read_type(), savestring(), set_type_self_type(), STABS_CONTINUE, stabs_method_name_from_physname(), strcmp_iw(), symfile_complaints, TYPE_ALLOC, TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_FN_FIELDLISTS, TYPE_NFN_FIELDS, TYPE_SELF_TYPE, TYPE_STUB, VISIBILITY_PRIVATE, VISIBILITY_PROTECTED, VOFFSET_STATIC, XCNEW, and xfree().

Referenced by read_struct_type().

## ◆ read_one_struct_field()

static void read_one_struct_field | ( | struct field_info * | fip,
|  | const char ** | pp,
|  | const char * | p,
|  | struct type * | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 2866 of file stabsread.c.

References check_typedef(), nextfield::field, FIELD_BITPOS, FIELD_BITSIZE, FIELD_TYPE, gdbarch_int_bit(), get_objfile_arch(), field_info::list, gdb.printer.bound_registers::long, field::name, read_huge_number(), read_type(), savestring(), SET_FIELD_BITPOS, SET_FIELD_PHYSNAME, stabs_general_complaint(), TARGET_CHAR_BIT, field::type, TYPE_CODE, TYPE_CODE_BOOL, TYPE_CODE_ENUM, TYPE_CODE_INT, TYPE_CODE_RANGE, TYPE_LENGTH, nextfield::visibility, VISIBILITY_IGNORE, and VISIBILITY_PUBLIC.

Referenced by read_struct_fields().

## ◆ read_range_type()

static struct type * read_range_type | ( | const char ** | pp,
|  | int | typenums[2],
|  | int | type_size,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 4062 of file stabsread.c.

References _, bits, objfile_type::builtin_int, complaint, create_static_range_type(), dbx_init_float_type(), dbx_lookup_type(), error_type(), gdbarch_int_bit(), gdbarch_long_long_bit(), get_objfile_arch(), HOST_CHAR_BIT, init_complex_type(), init_integer_type(), init_type(), LONG_MAX, objfile_type(), read_huge_number(), read_type(), read_type_number(), symfile_complaints, TARGET_CHAR_BIT, type, TYPE_CODE_VOID, and TYPE_NOSIGN.

Referenced by read_type().

## ◆ read_struct_fields()

static int read_struct_fields | ( | struct field_info * | fip,
|  | const char ** | pp,
|  | struct type * | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 3009 of file stabsread.c.

References is_cplus_marker(), field_info::list, make_cleanup(), nextfield::next, read_cpp_abbrev(), read_one_struct_field(), STABS_CONTINUE, XCNEW, and xfree().

Referenced by read_struct_type().

## ◆ read_struct_type()

static struct type* read_struct_type | ( | const char ** | pp,
|  | struct type * | type,
|  | enum type_code type_code | ,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 3509 of file stabsread.c.

References attach_fields_to_type(), attach_fn_fields_to_type(), complain_about_struct_wipeout(), do_cleanups(), error_type(), field_info::fnlist, INIT_CPLUS_SPECIFIC, field_info::list, make_cleanup(), null_cleanup(), read_baseclasses(), read_huge_number(), read_member_functions(), read_struct_fields(), read_tilde_fields(), set_length_in_type_chain(), type, TYPE_CODE, TYPE_CODE_UNDEF, TYPE_LENGTH, and TYPE_STUB.

Referenced by read_type().

## ◆ read_sun_builtin_type()

static struct type * read_sun_builtin_type | ( | const char ** | pp,
|  | int | typenums[2],
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 3772 of file stabsread.c.

References error_type(), init_boolean_type(), init_integer_type(), init_type(), read_huge_number(), TARGET_CHAR_BIT, type, TYPE_CODE_VOID, and TYPE_UNSIGNED.

Referenced by read_type().

## ◆ read_sun_floating_type()

static struct type * read_sun_floating_type | ( | const char ** | pp,
|  | int | typenums[2],
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 3848 of file stabsread.c.

References dbx_init_float_type(), error_type(), init_complex_type(), read_huge_number(), and TARGET_CHAR_BIT.

Referenced by read_type().

## ◆ read_tilde_fields()

static int read_tilde_fields | ( | struct field_info * | fip,
|  | const char ** | pp,
|  | struct type * | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 3233 of file stabsread.c.

References _, complaint, is_cplus_marker(), name, read_type(), set_type_vptr_basetype(), set_type_vptr_fieldno(), STABS_CONTINUE, symfile_complaints, TYPE_FIELD_NAME, TYPE_N_BASECLASSES, TYPE_NAME, TYPE_NFIELDS, TYPE_VPTR_FIELDNO, and vptr_name.

Referenced by read_struct_type().

## ◆ read_type()

static struct type * read_type | ( | const char ** | pp,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 1523 of file stabsread.c.

References _, add_undefined_type(), allocate_stub_method(), code, complaint, cp_canonicalize_string(), create_set_type(), current_subfile, dbx_alloc_type(), dbx_lookup_type(), error_type(), file_symbols, INIT_CPLUS_SPECIFIC, subfile::language, language_cplus, LOC_TYPEDEF, make_cv_type(), make_function_type(), make_pointer_type(), make_reference_type(), make_vector_type(), memset(), name, pending::next, pending::nsyms, read_args(), read_array_type(), read_enum_type(), read_range_type(), read_struct_type(), read_sun_builtin_type(), read_sun_floating_type(), read_type_number(), replace_type(), smash_to_memberptr_type(), smash_to_method_type(), string, STRUCT_DOMAIN, pending::symbol, SYMBOL_CLASS, SYMBOL_DOMAIN, SYMBOL_LINKAGE_NAME, SYMBOL_TYPE, symfile_complaints, symnum, TARGET_CHAR_BIT, type, TYPE_ALLOC, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_REF, TYPE_CODE_STRING, TYPE_CODE_STRUCT, TYPE_CODE_TYPEDEF, TYPE_CODE_UNDEF, TYPE_CODE_UNION, TYPE_CODE_VOID, TYPE_CONST, TYPE_FIELD_TYPE, TYPE_FIELDS, TYPE_LENGTH, TYPE_NAME, TYPE_NFIELDS, TYPE_PROTOTYPED, TYPE_STUB, TYPE_TAG_NAME, TYPE_TARGET_STUB, TYPE_TARGET_TYPE, TYPE_VOLATILE, and warning().

Referenced by define_symbol(), patch_block_stabs(), read_args(), read_array_type(), read_baseclasses(), read_cpp_abbrev(), read_member_functions(), read_one_struct_field(), read_range_type(), and read_tilde_fields().

## ◆ read_type_number()

static int read_type_number | ( | const char ** | pp,
|  | int * | typenums
| ) |  |
| static

Definition at line 465 of file stabsread.c.

References read_huge_number().

Referenced by read_range_type(), and read_type().

## ◆ ref_add()

void ref_add | ( | int | refnum,
|  | struct symbol * | sym,
|  | const char * | stabs,
|  | CORE_ADDR | value
| ) |  |

Definition at line 532 of file stabsread.c.

References MAX_CHUNK_REFS, memset(), ref_chunk, REF_CHUNK_SIZE, ref_count, REF_MAP_SIZE, ref_map::stabs, ref_map::sym, ref_map::value, and xrealloc().

Referenced by process_one_symbol().

## ◆ ref_search()

struct symbol* ref_search | ( | int | refnum | ) |

Definition at line 556 of file stabsread.c.

References ref_count, and ref_map::sym.

Referenced by process_one_symbol().

## ◆ reg_value_complaint()

static void reg_value_complaint | ( | int | regnum,
|  | int | num_regs,
|  | const char * | sym
| ) |  |
| static

Definition at line 171 of file stabsread.c.

References _, complaint, regnum, and symfile_complaints.

Referenced by stab_reg_to_regnum().

## ◆ rs6000_builtin_type()

static struct type * rs6000_builtin_type | ( | int | typenum,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 2079 of file stabsread.c.

References _, objfile_type::builtin_error, complaint, floatformats_ieee_double, floatformats_ieee_single, init_boolean_type(), init_character_type(), init_complex_type(), init_float_type(), init_integer_type(), init_type(), NUMBER_RECOGNIZED, objfile_type(), OBSTACK_CALLOC, rs6000_builtin_type_data, symfile_complaints, TARGET_CHAR_BIT, TYPE_CODE_ERROR, TYPE_CODE_VOID, and TYPE_NOSIGN.

Referenced by dbx_lookup_type().

## ◆ 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_length_in_type_chain()

static void set_length_in_type_chain | ( | struct type * | type | ) |
| static

Definition at line 3480 of file stabsread.c.

References complain_about_struct_wipeout(), TYPE_CHAIN, and TYPE_LENGTH.

Referenced by read_enum_type(), and read_struct_type().

## ◆ stab_reg_to_regnum()

static int stab_reg_to_regnum | ( | struct symbol * | sym,
|  | struct gdbarch * | gdbarch
| ) |  |
| static

Definition at line 616 of file stabsread.c.

References gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_sp_regnum(), gdbarch_stab_reg_to_regnum(), reg_value_complaint(), SYMBOL_PRINT_NAME, and SYMBOL_VALUE.

Referenced by set_gdbarch_stab_reg_to_regnum().

## ◆ stabs_general_complaint()

static void stabs_general_complaint | ( | const char * | arg1 | ) |
| static

Definition at line 179 of file stabsread.c.

References complaint, and symfile_complaints.

Referenced by read_one_struct_field().

## ◆ stabs_method_name_from_physname()

static char* stabs_method_name_from_physname | ( | const char * | physname | ) |
| static

Definition at line 2248 of file stabsread.c.

References _, complaint, method_name_from_physname(), and symfile_complaints.

Referenced by read_member_functions().

## ◆ stabsread_clear_cache()

void stabsread_clear_cache | ( | void |  | ) |

Definition at line 521 of file stabsread.c.

References ref_chunk, and ref_count.

Referenced by coff_symfile_finish().

## ◆ stabsread_init()

void stabsread_init | ( | void |  | ) |

Definition at line 4760 of file stabsread.c.

Referenced by dbx_psymtab_to_symtab_1(), and xcoff_psymtab_to_symtab_1().

## ◆ stabsread_new_init()

void stabsread_new_init | ( | void |  | ) |

Definition at line 4769 of file stabsread.c.

References global_sym_chain, and memset().

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().

## ◆ start_stabs()

void start_stabs | ( | void |  | ) |

Definition at line 4779 of file stabsread.c.

References common_block_name, global_stabs, n_this_object_header_files, type_vector, and type_vector_length.

Referenced by process_one_symbol(), and read_xcoff_symtab().

## ◆ symbol_reference_defined()

int symbol_reference_defined | ( | const char ** | string | ) |

Definition at line 592 of file stabsread.c.

References process_reference(), and string.

Referenced by process_one_symbol().

## Variable Documentation

## ◆ common_block

struct pending* common_block
| static

Definition at line 4323 of file stabsread.c.

Referenced by common_block_end(), and read_common_block().

## ◆ common_block_i

int common_block_i
| static

Definition at line 4324 of file stabsread.c.

Referenced by common_block_end(), and common_block_start().

## ◆ common_block_name

char* common_block_name
| static

Definition at line 4329 of file stabsread.c.

Referenced by common_block_end(), common_block_start(), and start_stabs().

## ◆ current_symbol

struct symbol* current_symbol = NULL
| static

Definition at line 189 of file stabsread.c.

Referenced by define_symbol().

## ◆ noname_undefs

struct nat* noname_undefs
| static

Definition at line 201 of file stabsread.c.

Referenced by _initialize_stabsread(), add_undefined_type_noname(), and cleanup_undefined_types_noname().

## ◆ noname_undefs_allocated

int noname_undefs_allocated
| static

Definition at line 202 of file stabsread.c.

Referenced by _initialize_stabsread(), and add_undefined_type_noname().

## ◆ noname_undefs_length

int noname_undefs_length
| static

Definition at line 203 of file stabsread.c.

Referenced by _initialize_stabsread(), add_undefined_type_noname(), and cleanup_undefined_types_noname().

## ◆ ref_chunk

int ref_chunk = 0
| static

Definition at line 515 of file stabsread.c.

Referenced by ref_add(), and stabsread_clear_cache().

## ◆ ref_count

int ref_count = 0
| static

Definition at line 512 of file stabsread.c.

Referenced by ref_add(), ref_search(), and stabsread_clear_cache().

## ◆ ref_map

struct ref_map* ref_map
| static

Definition at line 509 of file stabsread.c.

## ◆ rs6000_builtin_type_data

const struct objfile_data* rs6000_builtin_type_data
| static

Definition at line 2076 of file stabsread.c.

Referenced by _initialize_stabsread(), and rs6000_builtin_type().

## ◆ stab_register_funcs

const struct symbol_register_ops stab_register_funcs
| static

Initial value:
= {
stab_reg_to_regnum
}
stab_reg_to_regnum
static int stab_reg_to_regnum(struct symbol *sym, struct gdbarch *gdbarch)
Definition: stabsread.c:616

Definition at line 635 of file stabsread.c.

Referenced by _initialize_stabsread().

## ◆ stab_register_index

int stab_register_index
| static

Definition at line 641 of file stabsread.c.

Referenced by _initialize_stabsread(), and define_symbol().

## ◆ stab_regparm_index

int stab_regparm_index
| static

Definition at line 642 of file stabsread.c.

Referenced by _initialize_stabsread(), and define_symbol().

## ◆ type_vector

struct type** type_vector
| static

Definition at line 218 of file stabsread.c.

Referenced by dbx_lookup_type(), end_stabs(), and start_stabs().

## ◆ type_vector_length

int type_vector_length
| static

Definition at line 222 of file stabsread.c.

Referenced by dbx_lookup_type(), end_stabs(), and start_stabs().

## ◆ undef_types

struct type** undef_types
| static

Definition at line 186 of file stabsread.c.

Referenced by _initialize_stabsread(), add_undefined_type_1(), and cleanup_undefined_types_1().

## ◆ undef_types_allocated

int undef_types_allocated
| static

Definition at line 187 of file stabsread.c.

Referenced by _initialize_stabsread(), and add_undefined_type_1().

## ◆ undef_types_length

int undef_types_length
| static

Definition at line 188 of file stabsread.c.

Referenced by _initialize_stabsread(), add_undefined_type_1(), and cleanup_undefined_types_1().

## ◆ vb_name

const char vb_name[] = "_vb$"
| static

Definition at line 162 of file stabsread.c.

Referenced by read_cpp_abbrev().

## ◆ vptr_name

const char vptr_name[] = "_vptr$"
| static

Definition at line 161 of file stabsread.c.

Referenced by read_cpp_abbrev(), and read_tilde_fields().