29#include "gdbsupport/gdb_obstack.h"
35#include "aout/stab_gnu.h"
37#include "aout/aout64.h"
54const char *(*next_symbol_text_func) (
struct objfile *);
176 complaint (_(
"invalid C++ abbreviation `%s'"), arg1);
182 complaint (_(
"bad register number %d (max %d) in symbol %s"),
183 regnum, num_regs - 1, sym);
214#define STABS_CONTINUE(pp,objfile) \
216 if (**(pp) == '\\' || (**(pp) == '?' && (*(pp))[1] == '\0')) \
217 *(pp) = next_symbol_text (objfile); \
235#define INITIAL_TYPE_VECTOR_LENGTH 160
248 int filenum = typenums[0];
249 int index = typenums[1];
260 complaint (_(
"Invalid symbol data: type number "
261 "(%d,%d) out of range at symtab pos %d."),
275 static struct type *temp_type;
309 static struct type *temp_type;
311 warning (_(
"GDB internal error: bad real_filenum"));
321 if (index >= f_orig_length)
323 while (index >=
f->length)
327 f->vector = (
struct type **)
328 xrealloc ((
char *)
f->vector,
f->length *
sizeof (
struct type *));
329 memset (&
f->vector[f_orig_length], 0,
330 (
f->length - f_orig_length) * sizeof (
struct type *));
332 return (&
f->vector[index]);
345 struct type **type_addr;
347 if (typenums[0] == -1)
373 const struct floatformat **format;
403 for (ii = 0; ii < stabs->
count; ++ii)
406 pp = (
char *) strchr (
name,
':');
411 pp = (
char *) strchr (pp,
':');
433 if (*(pp - 1) ==
'F' || *(pp - 1) ==
'f')
450 if (*(pp - 1) ==
'F' || *(pp - 1) ==
'f')
499#define VISIBILITY_PRIVATE '0'
500#define VISIBILITY_PROTECTED '1'
501#define VISIBILITY_PUBLIC '2'
502#define VISIBILITY_IGNORE '9'
514#define MAX_CHUNK_REFS 100
515#define REF_CHUNK_SIZE (MAX_CHUNK_REFS * sizeof (struct ref_map))
516#define REF_MAP_SIZE(ref_chunk) ((ref_chunk) * REF_CHUNK_SIZE)
588 while (*p && isdigit (*p))
590 refnum = refnum * 10 + *p -
'0';
603 const char *p = *string;
682 _(
"Bad stabs string '%s'"),
string);
689 nameless = (p ==
string || ((
string[0] ==
' ') && (
string[1] ==
':')));
728 complaint (_(
"Unknown C++ symbol name `%s'"),
736 gdb::unique_xmalloc_ptr<char> new_name;
740 std::string
name (
string, p -
string);
745 std::string
name (
string, p -
string);
748 if (new_name !=
nullptr)
770 if (!strchr (
"cfFGpPrStTvVXCR", *p))
772 if (isdigit (*p) || *p ==
'(' || *p ==
'-')
801 struct type *dbl_type;
840 struct type *range_type;
843 gdb_byte *string_local = (gdb_byte *) alloca (strlen (p));
844 gdb_byte *string_value;
846 if (quote !=
'\'' && quote !=
'"')
856 while (*p && *p != quote)
858 if (*p ==
'\\' && p[1] == quote)
860 string_local[ind] = (gdb_byte) quote;
866 string_local[ind] = (gdb_byte) (*p);
881 string_local[ind] = 0;
892 memcpy (string_value, string_local, ind + 1);
952 process_function_types:
956 if (sym->
type ()->
code () != TYPE_CODE_FUNC)
969 process_prototype_types:
994 if (p[0] ==
'0' && p[1] ==
'\0')
1004 if (ptype->
code () == TYPE_CODE_VOID)
1021 goto process_function_types;
1094 && sym->
type ()->
code () == TYPE_CODE_INT)
1112 goto process_prototype_types;
1155 && local_symbols->
nsyms > 0
1160 prev_sym = local_symbols->
symbol[local_symbols->
nsyms - 1];
1223 if ((sym->
type ()->
code () == TYPE_CODE_STRUCT
1224 || sym->
type ()->
code () == TYPE_CODE_UNION)
1237 if ((sym->
type ()->
code () == TYPE_CODE_PTR
1239 || sym->
type ()->
code () == TYPE_CODE_FUNC)
1307 synonym = *p ==
't';
1333 *typedef_sym = *sym;
1447 complaint (_(
"couldn't parse type; debugger out of date?"));
1451 while (**pp !=
'\0')
1457 if ((*pp)[-1] ==
'\\' || (*pp)[-1] ==
'?')
1482 mtype->
set_code (TYPE_CODE_METHOD);
1502 char type_descriptor;
1517 if ((**pp >=
'0' && **pp <=
'9')
1549 typenums[0] = typenums[1] = -1;
1554 type_descriptor = (*pp)[-1];
1555 switch (type_descriptor)
1569 const char *from, *p, *q1, *q2;
1575 code = TYPE_CODE_STRUCT;
1578 code = TYPE_CODE_UNION;
1581 code = TYPE_CODE_ENUM;
1587 complaint (_(
"Unrecognized cross-reference type `%c'"),
1589 code = TYPE_CODE_STRUCT;
1594 q1 = strchr (*pp,
'<');
1595 p = strchr (*pp,
':');
1598 if (q1 && p > q1 && p[1] ==
':')
1600 int nesting_level = 0;
1602 for (q2 = q1; *q2; q2++)
1606 else if (*q2 ==
'>')
1608 else if (*q2 ==
':' && nesting_level == 0)
1618 std::string
name (*pp, p - *pp);
1619 gdb::unique_xmalloc_ptr<char> new_name
1621 if (new_name !=
nullptr)
1627 std::string
name (*pp, p - *pp);
1628 gdb::unique_xmalloc_ptr<char> new_name
1630 if (new_name !=
nullptr)
1634 if (type_name == NULL)
1636 char *to = type_name = (
char *)
1656 for (i = 0; i < ppt->
nsyms; i++)
1667 if (typenums[0] != -1)
1718 else if (type_size >= 0 || is_string)
1794 const char *type_start = (*pp) - 1;
1801 struct type_list *next;
1805 while (**pp && **pp !=
'#')
1808 struct type_list *newobj = XALLOCA (
struct type_list);
1809 newobj->type = arg_type;
1810 newobj->next = arg_types;
1818 complaint (_(
"Prototyped function type didn't "
1819 "end arguments with `#':\n%s"),
1826 && ! arg_types->next
1827 && arg_types->type->code () == TYPE_CODE_VOID)
1833 struct type_list *t;
1838 for (t = arg_types, i = num_args - 1; t; t = t->next, i--)
1839 func_type->field (i).set_type (t->type);
1861 if (isdigit (**pp) || **pp ==
'(' || **pp ==
'-')
1866 struct type *memtype;
1880 const char *attr = *pp;
1883 while (**pp !=
';' && **pp !=
'\0')
1893 type_size = atoi (attr + 1);
1919 if ((*pp)[0] ==
'#')
1922 struct type *return_type;
1926 if (*(*pp)++ !=
';')
1927 complaint (_(
"invalid (minimal) member type "
1928 "data format at symtab pos %d."),
1931 if (typenums[0] != -1)
1937 struct type *return_type;
1959 if (typenums[0] != -1)
1967 if (typenums[0] != -1)
1974 if (typenums[0] != -1)
1981 if (typenums[0] != -1)
1990 switch (type_descriptor)
2021 if (typenums[0] != -1)
2034 warning (_(
"GDB internal error, type is NULL in stabsread.c."));
2039 if (type_size != -1)
2040 type->
set_length ((type_size + TARGET_CHAR_BIT - 1) / TARGET_CHAR_BIT);
2049 gdb::noop_deleter<struct type *>>
2058#define NUMBER_RECOGNIZED 34
2059 struct type *rettype = NULL;
2063 complaint (_(
"Unknown builtin type %d"), typenum);
2067 if (!negative_types)
2075 if (negative_types[-typenum] != NULL)
2076 return negative_types[-typenum];
2078#if TARGET_CHAR_BIT != 8
2079#error This code wrong for TARGET_CHAR_BIT not 8
2126 rettype = alloc.
new_type (TYPE_CODE_VOID, TARGET_CHAR_BIT,
"void");
2160 rettype = alloc.
new_type (TYPE_CODE_ERROR, 0,
"stringptr");
2212 negative_types[-typenum] = rettype;
2228 if (method_name == NULL)
2230 complaint (_(
"Method has bad physname %s\n"), physname);
2261 struct next_fnfield *next;
2265 struct type *look_ahead_type;
2267 struct next_fnfield *new_sublist;
2290 look_ahead_type = NULL;
2306 static char opname[32] =
"op$";
2307 char *o = opname + 3;
2318 main_fn_name = savestring (opname, o - opname);
2324 main_fn_name = savestring (*pp, p - *pp);
2332 new_sublist = OBSTACK_ZALLOC (&fip->
obstack,
struct next_fnfield);
2335 if (look_ahead_type == NULL)
2350 new_sublist->fn_field.type = look_ahead_type;
2351 look_ahead_type = NULL;
2362 if (new_sublist->fn_field.type->code () == TYPE_CODE_FUNC)
2363 new_sublist->fn_field.type->set_code (TYPE_CODE_METHOD);
2366 if (new_sublist->fn_field.type->is_stub ())
2370 new_sublist->fn_field.is_stub = 1;
2373 new_sublist->fn_field.physname = savestring (*pp, p - *pp);
2380 new_sublist->fn_field.is_private = 1;
2383 new_sublist->fn_field.is_protected = 1;
2391 new_sublist->fn_field.is_const = 0;
2392 new_sublist->fn_field.is_volatile = 0;
2396 new_sublist->fn_field.is_const = 1;
2397 new_sublist->fn_field.is_volatile = 0;
2401 new_sublist->fn_field.is_const = 0;
2402 new_sublist->fn_field.is_volatile = 1;
2406 new_sublist->fn_field.is_const = 1;
2407 new_sublist->fn_field.is_volatile = 1;
2416 complaint (_(
"const/volatile indicator missing, got '%c'"),
2433 new_sublist->fn_field.voffset =
2439 if (**pp ==
';' || **pp ==
'\0')
2442 new_sublist->fn_field.fcontext = 0;
2456 new_sublist->fn_field.fcontext = look_ahead_type;
2465 look_ahead_type = NULL;
2473 int slen = strlen (main_fn_name);
2487 if (!(strncmp (new_sublist->fn_field.physname,
2488 main_fn_name, slen) == 0
2489 && new_sublist->fn_field.physname[slen] ==
'_'
2490 && new_sublist->fn_field.physname[slen + 1] ==
'_'))
2492 new_sublist->fn_field.is_stub = 1;
2499 complaint (_(
"member function type missing, got '%c'"),
2506 new_sublist->fn_field.voffset = 0;
2507 new_sublist->fn_field.fcontext = 0;
2511 new_sublist->next = sublist;
2512 sublist = new_sublist;
2516 while (**pp !=
';' && **pp !=
'\0');
2523 if (
strcmp_iw (main_fn_name,
"__base_ctor ") == 0
2524 ||
strcmp_iw (main_fn_name,
"__base_dtor ") == 0
2525 || strcmp (main_fn_name,
"__deleting_dtor") == 0)
2527 xfree (main_fn_name);
2531 int has_destructor = 0, has_other = 0;
2533 struct next_fnfield *tmp_sublist;
2591 tmp_sublist = sublist;
2592 while (tmp_sublist != NULL)
2594 if (tmp_sublist->fn_field.physname[0] ==
'_'
2595 && tmp_sublist->fn_field.physname[1] ==
'Z')
2603 tmp_sublist = tmp_sublist->next;
2606 if (has_destructor && has_other)
2609 struct next_fnfield *last_sublist;
2613 destr_fnlist = OBSTACK_ZALLOC (&fip->
obstack,
2624 sizeof (
struct fn_field) * has_destructor);
2625 tmp_sublist = sublist;
2626 last_sublist = NULL;
2628 while (tmp_sublist != NULL)
2632 tmp_sublist = tmp_sublist->next;
2637 = tmp_sublist->fn_field;
2639 last_sublist->next = tmp_sublist->next;
2641 sublist = tmp_sublist->next;
2642 last_sublist = tmp_sublist;
2643 tmp_sublist = tmp_sublist->next;
2648 fip->
fnlist = destr_fnlist;
2650 length -= has_destructor;
2660 char *new_method_name =
2663 if (new_method_name != NULL
2664 && strcmp (new_method_name,
2668 xfree (main_fn_name);
2671 xfree (new_method_name);
2677 "~", main_fn_name, (
char *)NULL);
2678 xfree (main_fn_name);
2683 for (i = length; (i--, sublist); sublist = sublist->next)
2690 fip->
fnlist = new_fnlist;
2718 struct type *context;
2751 complaint (_(
"C++ abbreviated type name "
2752 "unknown at symtab pos %d"),
2763 "INVALID_CPLUSPLUS_ABBREV",
2851 else if (**pp !=
',')
2906 if (field_type->
code () != TYPE_CODE_INT
2907 && field_type->
code () != TYPE_CODE_RANGE
2908 && field_type->
code () != TYPE_CODE_BOOL
2909 && field_type->
code () != TYPE_CODE_ENUM)
2914 == TARGET_CHAR_BIT * field_type->
length ()
2915 || (field_type->
code () == TYPE_CODE_ENUM
2965 while (**pp !=
';' && **pp !=
'\0')
2994 while (*p !=
':' && *p !=
'\0')
3008 if (p[0] ==
':' && p[1] ==
':')
3105 complaint (_(
"Unknown virtual character `%c' for baseclass"),
3122 complaint (_(
"Unknown visibility `%c' for baseclass"),
3182 if (**pp ==
'=' || **pp ==
'+' || **pp ==
'-')
3190 if (*(*pp)++ ==
'%')
3203 while (*p !=
'\0' && *p !=
';')
3230 complaint (_(
"virtual function table pointer "
3231 "not found when defining class `%s'"),
3271 int non_public_fields = 0;
3284 non_public_fields++;
3294 if (non_public_fields)
3313 while (nfields-- > 0)
3336 complaint (_(
"Unknown visibility `%c' for field"),
3352 const char *
name =
"";
3353 const char *kind =
"";
3360 case TYPE_CODE_STRUCT: kind =
"struct ";
break;
3361 case TYPE_CODE_UNION: kind =
"union ";
break;
3362 case TYPE_CODE_ENUM: kind =
"enum ";
break;
3372 complaint (_(
"struct/union type gets multiply defined: %s%s"), kind,
name);
3402 while (ntype !=
type)
3404 if (ntype->
length () == 0)
3514 if (!(**pp >=
'0' && **pp <=
'9') && **pp !=
'-')
3524 if (!(**pp >=
'0' && **pp <=
'9') && **pp !=
'-')
3569 int unsigned_enum = 1;
3581 o_nsyms = osyms ? osyms->
nsyms : 0;
3598 while (**pp && **pp !=
';' && **pp !=
',')
3644 for (syms = *symlist, n =
nsyms - 1; syms; syms = syms->
next)
3646 int last = syms == osyms ? o_nsyms : 0;
3647 int j = syms->
nsyms;
3649 for (; --j >= last; --n)
3684 int boolean_type = 0;
3707 else if (**pp ==
'b')
3743 TARGET_CHAR_BIT,
nullptr);
3763 struct type *rettype;
3776 nbits = nbytes * TARGET_CHAR_BIT;
3778 if (details == NF_COMPLEX || details == NF_COMPLEX16
3779 || details == NF_COMPLEX32)
3807 int twos_complement_bits)
3809 const char *p = *pp;
3818 int twos_complement_representation = 0;
3838 if (sign > 0 && radix == 8 && twos_complement_bits > 0)
3846 while ((c = *p1) >=
'0' && c <
'8')
3850 if (len > twos_complement_bits / 3
3851 || (twos_complement_bits % 3 == 0
3852 && len == twos_complement_bits / 3))
3856 sign_bit = (twos_complement_bits % 3 + 2) % 3;
3858 if (c & (1 << sign_bit))
3861 twos_complement_representation = 1;
3867 upper_limit = LONG_MAX / radix;
3869 while ((c = *p++) >=
'0' && c < (
'0' + radix))
3871 if (n <= upper_limit)
3873 if (twos_complement_representation)
3879 long sn = c -
'0' - ((2 * (c -
'0')) | (2 << sign_bit));
3910 else if (c ==
'2' || c ==
'3')
3931 if (radix == 8 && twos_complement_bits > 0 && nbits > twos_complement_bits)
3955 if (sign == -1 && !twos_complement_representation)
3975 const char *orig_pp = *pp;
3980 struct type *result_type;
3987 self_subrange = (rangenums[0] == typenums[0] &&
3988 rangenums[1] == typenums[1]);
4005 if (n2bits == -1 || n3bits == -1)
4011 goto handle_true_range;
4014 if (n2bits != 0 || n3bits != 0)
4016 char got_signed = 0;
4017 char got_unsigned = 0;
4024 if (n2bits <= type_size && n3bits <= type_size)
4026 if (n2bits == type_size && n2bits > n3bits)
4033 else if ((n2bits == 0 &&
n2 == 0) && n3bits != 0)
4041 else if ((n2bits != 0 && n3bits != 0 && n2bits == n3bits + 1)
4042 || (n2bits != 0 && n3bits == 0
4043 && (n2bits ==
sizeof (
long) * HOST_CHAR_BIT)
4050 if (got_signed || got_unsigned)
4057 if (self_subrange &&
n2 == 0 && n3 == 0)
4058 return alloc.
new_type (TYPE_CODE_VOID, TARGET_CHAR_BIT,
nullptr);
4072 if (n3 == 0 &&
n2 > 0)
4074 struct type *float_type
4085 else if (
n2 == 0 && n3 == -1)
4087 int bits = type_size;
4102 else if (self_subrange &&
n2 == 0 && n3 == 127)
4128 for (bytes = 0; (
bits & 0xff) == 0xff; bytes++)
4131 && ((bytes - 1) & bytes) == 0)
4138 else if (n3 == 0 &&
n2 < 0
4143 else if (
n2 == -n3 - 1)
4149 if (n3 == 0x7fffffff)
4166 complaint (_(
"base type %d of range type is not defined"), rangenums[1]);
4173 return (result_type);
4180static struct field *
4185 struct type *types[1024];
4207 complaint (_(
"Invalid (empty) method arguments"));
4210 else if (types[n - 1]->
code () != TYPE_CODE_VOID)
4218 rval = XCNEWVEC (
struct field, n);
4219 for (i = 0; i < n; i++)
4249 complaint (_(
"Invalid symbol data: common block within common block"));
4274 complaint (_(
"ECOMM symbol unmatched by BCOMM"));
4290 for (j = 0; j < next->nsyms; j++)
4326 for (j = next->nsyms - 1; j >= 0; j--)
4328 next->symbol[j]->set_value_address
4329 (next->symbol[j]->value_address () + valu);
4330 next->symbol[j]->set_section_index (section_index);
4460 switch ((*type)->code ())
4463 case TYPE_CODE_STRUCT:
4464 case TYPE_CODE_UNION:
4465 case TYPE_CODE_ENUM:
4471 if ((*type)->is_stub ())
4476 const char *type_name = (*type)->name ();
4478 if (type_name == NULL)
4485 for (i = 0; i < ppt->
nsyms; i++)
4491 && (sym->
type ()->
code () == (*type)->code ())
4492 && ((*type)->instance_flags ()
4504 complaint (_(
"forward-referenced types left unresolved, "
4531 struct symbol *sym, *prev;
4532 struct objfile *resolve_objfile;
4549 for (hash = 0; hash <
HASHSIZE; hash++)
4562 switch (msymbol->type ())
4577 hash =
hashname (msymbol->linkage_name ());
4581 if (strcmp (msymbol->linkage_name (), sym->
linkage_name ()) == 0)
4602 msymbol->section_index ());
4605 (msymbol->value_address (resolve_objfile));
4625 if (resolve_objfile ==
objfile)
4632 for (hash = 0; hash <
HASHSIZE; hash++)
4648 complaint (_(
"%s: common block `%s' from "
4649 "global_sym_chain unresolved"),
4723 const char *s =
name;
4725 if (s[0] ==
'-' || *s ==
'+')
4730 error (_(
"invalid symbol name \"%s\""),
name);
4732 s = strchr (s,
']');
4735 error (_(
"invalid symbol name \"%s\""),
name);
4737 return strchr (s,
':');
4741 return strchr (s,
':');
#define bits(obj, st, fn)
void * xrealloc(void *ptr, size_t size)
struct pending ** get_file_symbols()
struct subfile * get_current_subfile()
struct pending ** get_global_symbols()
struct pending ** get_local_symbols()
struct buildsym_compunit * get_buildsym_compunit()
struct symbol * find_symbol_in_list(struct pending *list, char *name, int length)
void add_symbol_to_list(struct symbol *symbol, struct pending **listhead)
gdb::unique_xmalloc_ptr< char > c_canonicalize_name(const char *name)
const char vtbl_ptr_name[]
void set(unsigned key, void *datum)
#define complaint(FMT,...)
enum dtor_kinds is_destructor_name(const char *name)
void cp_scan_for_anonymous_namespaces(struct buildsym_compunit *compunit, const struct symbol *const symbol, struct objfile *const objfile)
char * method_name_from_physname(const char *physname)
gdb::unique_xmalloc_ptr< char > cp_canonicalize_string(const char *string)
bool is_cplus_marker(int c)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
int gdbarch_long_long_bit(struct gdbarch *gdbarch)
const struct floatformat ** gdbarch_floatformat_for_type(struct gdbarch *gdbarch, const char *name, int length)
int gdbarch_int_bit(struct gdbarch *gdbarch)
int gdbarch_sp_regnum(struct gdbarch *gdbarch)
int gdbarch_stabs_argument_has_addr(struct gdbarch *gdbarch, struct type *type)
int gdbarch_believe_pcc_promotion(struct gdbarch *gdbarch)
int gdbarch_stab_reg_to_regnum(struct gdbarch *gdbarch, int stab_regnr)
static int gdbarch_num_cooked_regs(gdbarch *arch)
struct type * make_pointer_type(struct type *type, struct type **typeptr)
void set_type_vptr_basetype(struct type *type, struct type *basetype)
void set_type_vptr_fieldno(struct type *type, int fieldno)
struct type * create_set_type(type_allocator &alloc, struct type *domain_type)
struct type * lookup_pointer_type(struct type *type)
struct type * init_character_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
struct type * init_integer_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
struct type * create_static_range_type(type_allocator &alloc, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
void set_type_self_type(struct type *type, struct type *self_type)
struct type * make_reference_type(struct type *type, struct type **typeptr, enum type_code refcode)
struct type * make_cv_type(int cnst, int voltl, struct type *type, struct type **typeptr)
struct type * lookup_function_type(struct type *type)
void smash_to_method_type(struct type *type, struct type *self_type, struct type *to_type, struct field *args, int nargs, int varargs)
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
struct type * init_float_type(type_allocator &alloc, int bit, const char *name, const struct floatformat **floatformats, enum bfd_endian byte_order)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
struct type * create_array_type(type_allocator &alloc, struct type *element_type, struct type *range_type)
void replace_type(struct type *ntype, struct type *type)
struct type * init_complex_type(const char *name, struct type *target_type)
void smash_to_memberptr_type(struct type *type, struct type *self_type, struct type *to_type)
const struct floatformat * floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
struct type * init_boolean_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
struct type * check_typedef(struct type *type)
void make_vector_type(struct type *array_type)
struct type * make_function_type(struct type *type, struct type **typeptr)
#define TYPE_ZALLOC(t, size)
#define TYPE_BASECLASS_NAME(thistype, index)
#define TYPE_NFN_FIELDS(thistype)
#define TYPE_CHAIN(thistype)
#define TYPE_FIELD_VIRTUAL_BITS(thistype)
#define ALLOCATE_CPLUS_STRUCT_TYPE(type)
#define TYPE_FIELD_PRIVATE_BITS(thistype)
#define SET_TYPE_FIELD_PROTECTED(thistype, n)
#define SET_TYPE_FIELD_IGNORE(thistype, n)
#define TYPE_FN_FIELDLISTS(thistype)
#define TYPE_SELF_TYPE(thistype)
#define TYPE_BASECLASS(thistype, index)
#define TYPE_VPTR_FIELDNO(thistype)
#define INIT_CPLUS_SPECIFIC(type)
#define TYPE_FIELD_PROTECTED_BITS(thistype)
#define SET_TYPE_FIELD_PRIVATE(thistype, n)
#define TYPE_N_BASECLASSES(thistype)
#define SET_TYPE_FIELD_VIRTUAL(thistype, n)
#define TYPE_FIELD_IGNORE_BITS(thistype)
static void scan(growable_macro_buffer *dest, shared_macro_buffer *src, struct macro_name_list *no_loop, const macro_scope &scope)
const char * objfile_name(const struct objfile *objfile)
struct program_space * current_program_space
static void set_type(type_object *obj, struct type *type)
static long read_huge_number(const char **, int, int *, int)
static const char vptr_name[]
struct symbol * ref_search(int refnum)
void finish_global_stabs(struct objfile *objfile)
static struct type * read_sun_builtin_type(const char **, int[2], struct objfile *)
static int stab_reg_to_regnum(struct symbol *sym, struct gdbarch *gdbarch)
struct symbol * global_sym_chain[HASHSIZE]
static struct type ** undef_types
#define VISIBILITY_IGNORE
static int read_baseclasses(struct stab_field_info *, const char **, struct type *, struct objfile *)
#define STABS_CONTINUE(pp, objfile)
int symbol_reference_defined(const char **string)
static int read_cpp_abbrev(struct stab_field_info *, const char **, struct type *, struct objfile *)
static struct type * read_enum_type(const char **, struct type *, struct objfile *)
static void cleanup_undefined_types_noname(struct objfile *objfile)
#define VISIBILITY_PROTECTED
void common_block_end(struct objfile *objfile)
static struct symbol * current_symbol
static struct nat * noname_undefs
static int stab_register_index
static int common_block_i
static const struct symbol_register_ops stab_register_funcs
static struct field * read_args(const char **, int, struct objfile *, int *, int *)
#define NUMBER_RECOGNIZED
#define REF_MAP_SIZE(ref_chunk)
static int read_type_number(const char **, int *)
static int type_vector_length
void stabsread_new_init(void)
static struct ref_map * ref_map
static struct type ** dbx_lookup_type(int typenums[2], struct objfile *objfile)
static struct type * allocate_stub_method(struct type *type)
static struct type * read_sun_floating_type(const char **, int[2], struct objfile *)
static void set_length_in_type_chain(struct type *type)
static struct pending * common_block
static const char * find_name_end(const char *name)
struct symbol * define_symbol(CORE_ADDR valu, const char *string, int desc, int type, struct objfile *objfile)
int n_this_object_header_files
static void stabs_general_complaint(const char *arg1)
static int process_reference(const char **string)
int hashname(const char *name)
static int read_struct_fields(struct stab_field_info *, const char **, struct type *, struct objfile *)
int * this_object_header_files
static void add_undefined_type_noname(struct type *type, int typenums[2])
void scan_file_globals(struct objfile *objfile)
static struct type * read_struct_type(const char **, struct type *, enum type_code, struct objfile *)
#define INITIAL_TYPE_VECTOR_LENGTH
static int undef_types_length
struct pending_stabs * global_stabs
static char * common_block_name
unsigned char processing_gcc_compilation
static void complain_about_struct_wipeout(struct type *type)
void stabsread_init(void)
int n_allocated_this_object_header_files
static struct type * dbx_alloc_type(int[2], struct objfile *)
static const char vb_name[]
static struct type * read_array_type(const char **, struct type *, struct objfile *)
static int read_member_functions(struct stab_field_info *, const char **, struct type *, struct objfile *)
#define VISIBILITY_PRIVATE
void stabsread_clear_cache(void)
static void add_undefined_type(struct type *, int[2])
void common_block_start(const char *name, struct objfile *objfile)
static void invalid_cpp_abbrev_complaint(const char *arg1)
static int noname_undefs_length
static int attach_fn_fields_to_type(struct stab_field_info *, struct type *)
static int undef_types_allocated
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)
static struct type * error_type(const char **, struct objfile *)
static struct type ** type_vector
static void patch_block_stabs(struct pending *, struct pending_stabs *, struct objfile *)
void cleanup_undefined_stabs_types(struct objfile *objfile)
static void reg_value_complaint(int regnum, int num_regs, const char *sym)
static int read_tilde_fields(struct stab_field_info *, const char **, struct type *, struct objfile *)
static void add_undefined_type_1(struct type *type)
static void cleanup_undefined_types_1(void)
static int attach_fields_to_type(struct stab_field_info *, struct type *, struct objfile *)
static void fix_common_block(struct symbol *sym, CORE_ADDR valu, int section_index)
static void read_one_struct_field(struct stab_field_info *, const char **, const char *, struct type *, struct objfile *)
void _initialize_stabsread()
static struct type * read_range_type(const char **, int[2], int, struct objfile *)
static char * stabs_method_name_from_physname(const char *physname)
static struct type * rs6000_builtin_type(int, struct objfile *)
static struct type * read_type(const char **, struct objfile *)
#define VISIBILITY_PUBLIC
static const registry< objfile >::key< struct type *, gdb::noop_deleter< struct type * > > rs6000_builtin_type_data
static int stab_regparm_index
static int noname_undefs_allocated
#define N_HEADER_FILES(OBJFILE)
#define next_symbol_text(objfile)
#define HEADER_FILES(OBJFILE)
struct type * builtin_error
struct type * builtin_double
struct type * builtin_int
void set_type(struct type *type)
void set_loc_bitpos(LONGEST bitpos)
LONGEST loc_bitpos() const
void set_is_artificial(bool is_artificial)
void set_loc_physname(const char *physname)
void set_bitsize(unsigned int bitsize)
void set_loc_enumval(LONGEST enumval)
void set_name(const char *name)
const char * name() const
unsigned int bitsize() const
struct type * type() const
struct fn_field * fn_fields
void set_section_index(short idx)
const char * print_name() const
void compute_and_set_names(gdb::string_view linkage_name, bool copy_name, struct objfile_per_bfd_storage *per_bfd, gdb::optional< hashval_t > hash=gdb::optional< hashval_t >())
enum language language() const
void set_language(enum language language, struct obstack *obstack)
const char * linkage_name() const
void set_linkage_name(const char *linkage_name)
struct next_fnfieldlist * next
struct fn_fieldlist fn_fieldlist
struct gdbarch * arch() const
struct objfile_per_bfd_storage * per_bfd
objfile(gdb_bfd_ref_ptr, const char *, objfile_flags)
auto_obstack objfile_obstack
msymbols_range msymbols()
struct symbol * symbol[PENDINGSIZE]
struct objfile * symfile_object_file
struct next_fnfieldlist * fnlist
struct stabs_nextfield * list
struct stabs_nextfield * next
void set_line(unsigned int line)
symbol * value_chain() const
address_class aclass() const
struct type * type() const
domain_enum domain() const
void set_aclass_index(unsigned int aclass_index)
LONGEST value_longest() const
void set_type(struct type *type)
void set_is_argument(bool is_argument)
void set_value_address(CORE_ADDR address)
CORE_ADDR value_address() const
void set_value_bytes(const gdb_byte *bytes)
void set_value_longest(LONGEST value)
void set_value_chain(symbol *sym)
void set_domain(domain_enum domain)
void set_is_prototyped(bool is_prototyped)
void set_code(type_code code)
struct field & field(int idx) const
void set_has_no_signedness(bool has_no_signedness)
void set_instance_flags(type_instance_flags flags)
void set_target_type(struct type *target_type)
void set_is_unsigned(bool is_unsigned)
void set_is_stub(bool is_stub)
void set_num_fields(unsigned int num_fields)
unsigned int num_fields() const
void set_name(const char *name)
void alloc_fields(unsigned int nfields, bool init=true)
void set_length(ULONGEST length)
const char * name() const
type * index_type() const
const type_instance_flags instance_flags() const
void set_target_is_stub(bool target_is_stub)
int register_symbol_register_impl(enum address_class aclass, const struct symbol_register_ops *ops)
bool target_float_from_string(gdb_byte *addr, const struct type *type, const std::string &string)
int strcmp_iw(const char *string1, const char *string2)