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 *);
178 complaint (_(
"invalid C++ abbreviation `%s'"), arg1);
184 complaint (_(
"bad register number %d (max %d) in symbol %s"),
185 regnum, num_regs - 1, sym);
216#define STABS_CONTINUE(pp,objfile) \
218 if (**(pp) == '\\' || (**(pp) == '?' && (*(pp))[1] == '\0')) \
219 *(pp) = next_symbol_text (objfile); \
237#define INITIAL_TYPE_VECTOR_LENGTH 160
250 int filenum = typenums[0];
251 int index = typenums[1];
262 complaint (_(
"Invalid symbol data: type number "
263 "(%d,%d) out of range at symtab pos %d."),
277 static struct type *temp_type;
311 static struct type *temp_type;
313 warning (_(
"GDB internal error: bad real_filenum"));
322 f_orig_length =
f->length;
323 if (index >= f_orig_length)
325 while (index >=
f->length)
329 f->vector = (
struct type **)
330 xrealloc ((
char *)
f->vector,
f->length *
sizeof (
struct type *));
331 memset (&
f->vector[f_orig_length], 0,
332 (
f->length - f_orig_length) * sizeof (
struct type *));
334 return (&
f->vector[index]);
347 struct type **type_addr;
349 if (typenums[0] == -1)
373 const struct floatformat **format;
402 for (ii = 0; ii < stabs->
count; ++ii)
405 pp = (
char *) strchr (
name,
':');
410 pp = (
char *) strchr (pp,
':');
432 if (*(pp - 1) ==
'F' || *(pp - 1) ==
'f')
449 if (*(pp - 1) ==
'F' || *(pp - 1) ==
'f')
498#define VISIBILITY_PRIVATE '0'
499#define VISIBILITY_PROTECTED '1'
500#define VISIBILITY_PUBLIC '2'
501#define VISIBILITY_IGNORE '9'
513#define MAX_CHUNK_REFS 100
514#define REF_CHUNK_SIZE (MAX_CHUNK_REFS * sizeof (struct ref_map))
515#define REF_MAP_SIZE(ref_chunk) ((ref_chunk) * REF_CHUNK_SIZE)
587 while (*p && isdigit (*p))
589 refnum = refnum * 10 + *p -
'0';
602 const char *p = *string;
681 _(
"Bad stabs string '%s'"),
string);
688 nameless = (p ==
string || ((
string[0] ==
' ') && (
string[1] ==
':')));
727 complaint (_(
"Unknown C++ symbol name `%s'"),
735 gdb::unique_xmalloc_ptr<char> new_name;
739 std::string
name (
string, p -
string);
744 std::string
name (
string, p -
string);
747 if (new_name !=
nullptr)
769 if (!strchr (
"cfFGpPrStTvVXCR", *p))
771 if (isdigit (*p) || *p ==
'(' || *p ==
'-')
800 struct type *dbl_type;
839 struct type *range_type;
842 gdb_byte *string_local = (gdb_byte *) alloca (strlen (p));
843 gdb_byte *string_value;
845 if (quote !=
'\'' && quote !=
'"')
855 while (*p && *p != quote)
857 if (*p ==
'\\' && p[1] == quote)
859 string_local[ind] = (gdb_byte) quote;
865 string_local[ind] = (gdb_byte) (*p);
880 string_local[ind] = 0;
890 memcpy (string_value, string_local, ind + 1);
950 process_function_types:
954 if (sym->
type ()->
code () != TYPE_CODE_FUNC)
967 process_prototype_types:
994 if (p[0] ==
'0' && p[1] ==
'\0')
1004 if (ptype->
code () == TYPE_CODE_VOID)
1020 goto process_function_types;
1093 && sym->
type ()->
code () == TYPE_CODE_INT)
1111 goto process_prototype_types;
1154 && local_symbols->
nsyms > 0
1159 prev_sym = local_symbols->
symbol[local_symbols->
nsyms - 1];
1222 if ((sym->
type ()->
code () == TYPE_CODE_STRUCT
1223 || sym->
type ()->
code () == TYPE_CODE_UNION)
1236 if ((sym->
type ()->
code () == TYPE_CODE_PTR
1238 || sym->
type ()->
code () == TYPE_CODE_FUNC)
1306 synonym = *p ==
't';
1332 *typedef_sym = *sym;
1446 complaint (_(
"couldn't parse type; debugger out of date?"));
1450 while (**pp !=
'\0')
1456 if ((*pp)[-1] ==
'\\' || (*pp)[-1] ==
'?')
1481 char type_descriptor;
1496 if ((**pp >=
'0' && **pp <=
'9')
1528 typenums[0] = typenums[1] = -1;
1533 type_descriptor = (*pp)[-1];
1534 switch (type_descriptor)
1548 const char *from, *p, *q1, *q2;
1554 code = TYPE_CODE_STRUCT;
1557 code = TYPE_CODE_UNION;
1560 code = TYPE_CODE_ENUM;
1566 complaint (_(
"Unrecognized cross-reference type `%c'"),
1568 code = TYPE_CODE_STRUCT;
1573 q1 = strchr (*pp,
'<');
1574 p = strchr (*pp,
':');
1577 if (q1 && p > q1 && p[1] ==
':')
1579 int nesting_level = 0;
1581 for (q2 = q1; *q2; q2++)
1585 else if (*q2 ==
'>')
1587 else if (*q2 ==
':' && nesting_level == 0)
1597 std::string
name (*pp, p - *pp);
1598 gdb::unique_xmalloc_ptr<char> new_name
1600 if (new_name !=
nullptr)
1606 std::string
name (*pp, p - *pp);
1607 gdb::unique_xmalloc_ptr<char> new_name
1609 if (new_name !=
nullptr)
1613 if (type_name == NULL)
1615 char *to = type_name = (
char *)
1635 for (i = 0; i < ppt->
nsyms; i++)
1646 if (typenums[0] != -1)
1697 else if (type_size >= 0 || is_string)
1773 const char *type_start = (*pp) - 1;
1780 struct type_list *next;
1784 while (**pp && **pp !=
'#')
1787 struct type_list *newobj = XALLOCA (
struct type_list);
1788 newobj->type = arg_type;
1789 newobj->next = arg_types;
1797 complaint (_(
"Prototyped function type didn't "
1798 "end arguments with `#':\n%s"),
1805 && ! arg_types->next
1806 && arg_types->type->code () == TYPE_CODE_VOID)
1811 num_args *
sizeof (
struct field)));
1812 memset (
func_type->fields (), 0, num_args * sizeof (
struct field));
1815 struct type_list *t;
1820 for (t = arg_types, i = num_args - 1; t; t = t->next, i--)
1821 func_type->field (i).set_type (t->type);
1843 if (isdigit (**pp) || **pp ==
'(' || **pp ==
'-')
1848 struct type *memtype;
1862 const char *attr = *pp;
1865 while (**pp !=
';' && **pp !=
'\0')
1875 type_size = atoi (attr + 1);
1901 if ((*pp)[0] ==
'#')
1904 struct type *return_type;
1908 if (*(*pp)++ !=
';')
1909 complaint (_(
"invalid (minimal) member type "
1910 "data format at symtab pos %d."),
1913 if (typenums[0] != -1)
1919 struct type *return_type;
1941 if (typenums[0] != -1)
1949 if (typenums[0] != -1)
1956 if (typenums[0] != -1)
1963 if (typenums[0] != -1)
1972 switch (type_descriptor)
2001 if (typenums[0] != -1)
2013 warning (_(
"GDB internal error, type is NULL in stabsread.c."));
2018 if (type_size != -1)
2019 type->
set_length ((type_size + TARGET_CHAR_BIT - 1) / TARGET_CHAR_BIT);
2028 gdb::noop_deleter<struct type *>>
2037#define NUMBER_RECOGNIZED 34
2038 struct type *rettype = NULL;
2042 complaint (_(
"Unknown builtin type %d"), typenum);
2046 if (!negative_types)
2054 if (negative_types[-typenum] != NULL)
2055 return negative_types[-typenum];
2057#if TARGET_CHAR_BIT != 8
2058#error This code wrong for TARGET_CHAR_BIT not 8
2190 negative_types[-typenum] = rettype;
2206 if (method_name == NULL)
2208 complaint (_(
"Method has bad physname %s\n"), physname);
2239 struct next_fnfield *next;
2243 struct type *look_ahead_type;
2245 struct next_fnfield *new_sublist;
2268 look_ahead_type = NULL;
2284 static char opname[32] =
"op$";
2285 char *o = opname + 3;
2296 main_fn_name = savestring (opname, o - opname);
2302 main_fn_name = savestring (*pp, p - *pp);
2310 new_sublist = OBSTACK_ZALLOC (&fip->
obstack,
struct next_fnfield);
2313 if (look_ahead_type == NULL)
2328 new_sublist->fn_field.type = look_ahead_type;
2329 look_ahead_type = NULL;
2340 if (new_sublist->fn_field.type->code () == TYPE_CODE_FUNC)
2341 new_sublist->fn_field.type->
set_code (TYPE_CODE_METHOD);
2344 if (new_sublist->fn_field.type->is_stub ())
2348 new_sublist->fn_field.is_stub = 1;
2351 new_sublist->fn_field.physname = savestring (*pp, p - *pp);
2358 new_sublist->fn_field.is_private = 1;
2361 new_sublist->fn_field.is_protected = 1;
2369 new_sublist->fn_field.is_const = 0;
2370 new_sublist->fn_field.is_volatile = 0;
2374 new_sublist->fn_field.is_const = 1;
2375 new_sublist->fn_field.is_volatile = 0;
2379 new_sublist->fn_field.is_const = 0;
2380 new_sublist->fn_field.is_volatile = 1;
2384 new_sublist->fn_field.is_const = 1;
2385 new_sublist->fn_field.is_volatile = 1;
2394 complaint (_(
"const/volatile indicator missing, got '%c'"),
2411 new_sublist->fn_field.voffset =
2417 if (**pp ==
';' || **pp ==
'\0')
2420 new_sublist->fn_field.fcontext = 0;
2434 new_sublist->fn_field.fcontext = look_ahead_type;
2443 look_ahead_type = NULL;
2451 int slen = strlen (main_fn_name);
2465 if (!(strncmp (new_sublist->fn_field.physname,
2466 main_fn_name, slen) == 0
2467 && new_sublist->fn_field.physname[slen] ==
'_'
2468 && new_sublist->fn_field.physname[slen + 1] ==
'_'))
2470 new_sublist->fn_field.is_stub = 1;
2477 complaint (_(
"member function type missing, got '%c'"),
2484 new_sublist->fn_field.voffset = 0;
2485 new_sublist->fn_field.fcontext = 0;
2489 new_sublist->next = sublist;
2490 sublist = new_sublist;
2494 while (**pp !=
';' && **pp !=
'\0');
2501 if (
strcmp_iw (main_fn_name,
"__base_ctor ") == 0
2502 ||
strcmp_iw (main_fn_name,
"__base_dtor ") == 0
2503 || strcmp (main_fn_name,
"__deleting_dtor") == 0)
2505 xfree (main_fn_name);
2509 int has_destructor = 0, has_other = 0;
2511 struct next_fnfield *tmp_sublist;
2569 tmp_sublist = sublist;
2570 while (tmp_sublist != NULL)
2572 if (tmp_sublist->fn_field.physname[0] ==
'_'
2573 && tmp_sublist->fn_field.physname[1] ==
'Z')
2581 tmp_sublist = tmp_sublist->next;
2584 if (has_destructor && has_other)
2587 struct next_fnfield *last_sublist;
2591 destr_fnlist = OBSTACK_ZALLOC (&fip->
obstack,
2602 sizeof (
struct fn_field) * has_destructor);
2603 tmp_sublist = sublist;
2604 last_sublist = NULL;
2606 while (tmp_sublist != NULL)
2610 tmp_sublist = tmp_sublist->next;
2615 = tmp_sublist->fn_field;
2617 last_sublist->next = tmp_sublist->next;
2619 sublist = tmp_sublist->next;
2620 last_sublist = tmp_sublist;
2621 tmp_sublist = tmp_sublist->next;
2626 fip->
fnlist = destr_fnlist;
2628 length -= has_destructor;
2638 char *new_method_name =
2641 if (new_method_name != NULL
2642 && strcmp (new_method_name,
2646 xfree (main_fn_name);
2649 xfree (new_method_name);
2655 "~", main_fn_name, (
char *)NULL);
2656 xfree (main_fn_name);
2661 for (i = length; (i--, sublist); sublist = sublist->next)
2668 fip->
fnlist = new_fnlist;
2698 struct type *context;
2731 complaint (_(
"C++ abbreviated type name "
2732 "unknown at symtab pos %d"),
2743 "INVALID_CPLUSPLUS_ABBREV",
2831 else if (**pp !=
',')
2886 if (field_type->
code () != TYPE_CODE_INT
2887 && field_type->
code () != TYPE_CODE_RANGE
2888 && field_type->
code () != TYPE_CODE_BOOL
2889 && field_type->
code () != TYPE_CODE_ENUM)
2894 == TARGET_CHAR_BIT * field_type->
length ()
2895 || (field_type->
code () == TYPE_CODE_ENUM
2945 while (**pp !=
';' && **pp !=
'\0')
2974 while (*p !=
':' && *p !=
'\0')
2988 if (p[0] ==
':' && p[1] ==
':')
3089 complaint (_(
"Unknown virtual character `%c' for baseclass"),
3106 complaint (_(
"Unknown visibility `%c' for baseclass"),
3166 if (**pp ==
'=' || **pp ==
'+' || **pp ==
'-')
3174 if (*(*pp)++ ==
'%')
3187 while (*p !=
'\0' && *p !=
';')
3214 complaint (_(
"virtual function table pointer "
3215 "not found when defining class `%s'"),
3255 int non_public_fields = 0;
3268 non_public_fields++;
3282 if (non_public_fields)
3304 while (nfields-- > 0)
3327 complaint (_(
"Unknown visibility `%c' for field"),
3343 const char *
name =
"";
3344 const char *kind =
"";
3351 case TYPE_CODE_STRUCT: kind =
"struct ";
break;
3352 case TYPE_CODE_UNION: kind =
"union ";
break;
3353 case TYPE_CODE_ENUM: kind =
"enum ";
break;
3363 complaint (_(
"struct/union type gets multiply defined: %s%s"), kind,
name);
3393 while (ntype !=
type)
3395 if (ntype->
length () == 0)
3505 if (!(**pp >=
'0' && **pp <=
'9') && **pp !=
'-')
3515 if (!(**pp >=
'0' && **pp <=
'9') && **pp !=
'-')
3558 int unsigned_enum = 1;
3570 o_nsyms = osyms ? osyms->
nsyms : 0;
3587 while (**pp && **pp !=
';' && **pp !=
',')
3637 for (syms = *symlist, n =
nsyms - 1; syms; syms = syms->
next)
3639 int last = syms == osyms ? o_nsyms : 0;
3640 int j = syms->
nsyms;
3642 for (; --j >= last; --n)
3677 int boolean_type = 0;
3700 else if (**pp ==
'b')
3735 TARGET_CHAR_BIT, NULL);
3755 struct type *rettype;
3768 nbits = nbytes * TARGET_CHAR_BIT;
3770 if (details == NF_COMPLEX || details == NF_COMPLEX16
3771 || details == NF_COMPLEX32)
3799 int twos_complement_bits)
3801 const char *p = *pp;
3810 int twos_complement_representation = 0;
3830 if (sign > 0 && radix == 8 && twos_complement_bits > 0)
3838 while ((c = *p1) >=
'0' && c <
'8')
3842 if (len > twos_complement_bits / 3
3843 || (twos_complement_bits % 3 == 0
3844 && len == twos_complement_bits / 3))
3848 sign_bit = (twos_complement_bits % 3 + 2) % 3;
3850 if (c & (1 << sign_bit))
3853 twos_complement_representation = 1;
3861 while ((c = *p++) >=
'0' && c < (
'0' + radix))
3863 if (n <= upper_limit)
3865 if (twos_complement_representation)
3871 long sn = c -
'0' - ((2 * (c -
'0')) | (2 << sign_bit));
3902 else if (c ==
'2' || c ==
'3')
3923 if (radix == 8 && twos_complement_bits > 0 && nbits > twos_complement_bits)
3947 if (sign == -1 && !twos_complement_representation)
3967 const char *orig_pp = *pp;
3972 struct type *result_type;
3979 self_subrange = (rangenums[0] == typenums[0] &&
3980 rangenums[1] == typenums[1]);
3997 if (n2bits == -1 || n3bits == -1)
4001 goto handle_true_range;
4004 if (n2bits != 0 || n3bits != 0)
4006 char got_signed = 0;
4007 char got_unsigned = 0;
4014 if (n2bits <= type_size && n3bits <= type_size)
4016 if (n2bits == type_size && n2bits > n3bits)
4023 else if ((n2bits == 0 &&
n2 == 0) && n3bits != 0)
4031 else if ((n2bits != 0 && n3bits != 0 && n2bits == n3bits + 1)
4032 || (n2bits != 0 && n3bits == 0
4033 && (n2bits ==
sizeof (
long) * HOST_CHAR_BIT)
4040 if (got_signed || got_unsigned)
4047 if (self_subrange &&
n2 == 0 && n3 == 0)
4062 if (n3 == 0 &&
n2 > 0)
4064 struct type *float_type
4075 else if (
n2 == 0 && n3 == -1)
4077 int bits = type_size;
4092 else if (self_subrange &&
n2 == 0 && n3 == 127)
4118 for (bytes = 0; (
bits & 0xff) == 0xff; bytes++)
4121 && ((bytes - 1) & bytes) == 0)
4128 else if (n3 == 0 &&
n2 < 0
4133 else if (
n2 == -n3 - 1)
4139 if (n3 == 0x7fffffff)
4156 complaint (_(
"base type %d of range type is not defined"), rangenums[1]);
4163 return (result_type);
4170static struct field *
4175 struct type *types[1024];
4197 complaint (_(
"Invalid (empty) method arguments"));
4200 else if (types[n - 1]->
code () != TYPE_CODE_VOID)
4208 rval = XCNEWVEC (
struct field, n);
4209 for (i = 0; i < n; i++)
4239 complaint (_(
"Invalid symbol data: common block within common block"));
4264 complaint (_(
"ECOMM symbol unmatched by BCOMM"));
4447 switch ((*type)->code ())
4450 case TYPE_CODE_STRUCT:
4451 case TYPE_CODE_UNION:
4452 case TYPE_CODE_ENUM:
4458 if ((*type)->is_stub ())
4463 const char *type_name = (*type)->name ();
4465 if (type_name == NULL)
4472 for (i = 0; i < ppt->
nsyms; i++)
4478 && (sym->
type ()->
code () == (*type)->code ())
4479 && ((*type)->instance_flags ()
4491 complaint (_(
"forward-referenced types left unresolved, "
4518 struct symbol *sym, *prev;
4519 struct objfile *resolve_objfile;
4536 for (hash = 0; hash <
HASHSIZE; hash++)
4549 switch (msymbol->type ())
4564 hash =
hashname (msymbol->linkage_name ());
4568 if (strcmp (msymbol->linkage_name (), sym->
linkage_name ()) == 0)
4591 (msymbol->value_address (resolve_objfile));
4611 if (resolve_objfile ==
objfile)
4618 for (hash = 0; hash <
HASHSIZE; hash++)
4634 complaint (_(
"%s: common block `%s' from "
4635 "global_sym_chain unresolved"),
4709 const char *s =
name;
4711 if (s[0] ==
'-' || *s ==
'+')
4716 error (_(
"invalid symbol name \"%s\""),
name);
4718 s = strchr (s,
']');
4721 error (_(
"invalid symbol name \"%s\""),
name);
4723 return strchr (s,
':');
4727 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 * lookup_pointer_type(struct type *type)
void set_type_self_type(struct type *type, struct type *self_type)
struct type * allocate_stub_method(struct type *type)
struct type * make_reference_type(struct type *type, struct type **typeptr, enum type_code refcode)
struct type * init_type(struct objfile *objfile, enum type_code code, int bit, const char *name)
struct type * make_cv_type(int cnst, int voltl, struct type *type, struct type **typeptr)
struct type * lookup_function_type(struct type *type)
struct type * create_array_type(struct type *result_type, struct type *element_type, struct type *range_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]
void replace_type(struct type *ntype, struct type *type)
struct type * alloc_type(struct objfile *objfile)
struct type * init_complex_type(const char *name, struct type *target_type)
struct type * init_float_type(struct objfile *objfile, int bit, const char *name, const struct floatformat **floatformats, enum bfd_endian byte_order)
struct type * create_static_range_type(struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
struct type * init_character_type(struct objfile *objfile, int bit, int unsigned_p, const char *name)
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 * create_set_type(struct type *result_type, struct type *domain_type)
struct type * init_boolean_type(struct objfile *objfile, int bit, int unsigned_p, const char *name)
struct type * init_integer_type(struct objfile *objfile, 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_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 TYPE_FIELD_ARTIFICIAL(thistype, n)
#define TYPE_FIELD_BITSIZE(thistype, n)
#define INIT_CPLUS_SPECIFIC(type)
#define TYPE_FIELD_PROTECTED_BITS(thistype)
#define TYPE_ALLOC(t, size)
#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)
#define FIELD_BITSIZE(thisfld)
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 type ** dbx_lookup_type(int typenums[2], struct objfile *objfile)
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 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 void fix_common_block(struct symbol *, CORE_ADDR)
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)
void set_type(struct type *type)
void set_loc_bitpos(LONGEST bitpos)
LONGEST loc_bitpos() const
void set_loc_physname(const char *physname)
void set_loc_enumval(LONGEST enumval)
void set_name(const char *name)
const char * name() 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 type * builtin_error
struct type * builtin_int
struct type * builtin_double
struct gdbarch * arch() const
struct objfile_per_bfd_storage * per_bfd
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
symbol * value_chain() const
address_class aclass() const
struct type * type() const
void set_line(unsigned short line)
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(int num_fields)
void set_name(const char *name)
void set_length(ULONGEST length)
struct field * fields() const
const char * name() const
type * index_type() const
const type_instance_flags instance_flags() const
void set_fields(struct field *fields)
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)
static unsigned int fast_hash(const void *ptr, size_t len, unsigned int start_value=0)