94 explicit ctf_fp_info (ctf_dict_t *cfp) : fp (cfp) {}
100ctf_fp_info::~ctf_fp_info ()
105 ctf_archive_t *arc = ctf_get_arc (fp);
127 ctf_psymtab (
const char *filename,
135 void read_symtab (
struct objfile *)
override;
136 void expand_psymtab (
struct objfile *)
override;
138 struct ctf_context context;
153 std::vector<struct ctf_nextfield> fields;
156 struct ctf_context *cur_context;
163 std::vector<struct decl_field> typedef_field_list;
167 std::vector<struct decl_field> nested_types_list;
172struct ctf_per_tu_data
183static int ctf_add_type_cb (ctf_id_t tid,
void *arg);
187static struct type *read_pointer_type (
struct ctf_context *cp, ctf_id_t tid,
194static struct type *read_typedef_type (
struct ctf_context *cp, ctf_id_t tid,
195 ctf_id_t btid,
const char *
name);
197static struct type *read_type_record (
struct ctf_context *cp, ctf_id_t tid);
199static void process_structure_type (
struct ctf_context *cp, ctf_id_t tid);
201static void process_struct_members (
struct ctf_context *cp, ctf_id_t tid,
204static struct type *read_forward_type (
struct ctf_context *cp, ctf_id_t tid);
209struct ctf_tid_and_type
218tid_and_type_hash (
const void *item)
220 const struct ctf_tid_and_type *ids
221 = (
const struct ctf_tid_and_type *) item;
229tid_and_type_eq (
const void *item_lhs,
const void *item_rhs)
231 const struct ctf_tid_and_type *ids_lhs
232 = (
const struct ctf_tid_and_type *) item_lhs;
233 const struct ctf_tid_and_type *ids_rhs
234 = (
const struct ctf_tid_and_type *) item_rhs;
236 return ids_lhs->tid == ids_rhs->tid;
242set_tid_type (
struct objfile *of, ctf_id_t tid,
struct type *typ)
246 htab = ctf_tid_key.
get (of);
249 htab = htab_create_alloc (1, tid_and_type_hash,
252 ctf_tid_key.
set (of, htab);
255 struct ctf_tid_and_type **slot, ids;
258 slot = (
struct ctf_tid_and_type **) htab_find_slot (htab, &ids, INSERT);
259 if (*slot ==
nullptr)
269get_tid_type (
struct objfile *of, ctf_id_t tid)
271 struct ctf_tid_and_type *slot, ids;
274 htab = ctf_tid_key.
get (of);
280 slot = (
struct ctf_tid_and_type *) htab_find (htab, &ids);
291fetch_tid_type (
struct ctf_context *ccp, ctf_id_t tid)
296 typ = get_tid_type (of, tid);
299 ctf_add_type_cb (tid, ccp);
300 typ = get_tid_type (of, tid);
309get_bitsize (ctf_dict_t *fp, ctf_id_t tid, uint32_t kind)
313 if ((kind == CTF_K_INTEGER || kind == CTF_K_ENUM
314 || kind == CTF_K_FLOAT)
315 && ctf_type_reference (fp, tid) != CTF_ERR
316 && ctf_type_encoding (fp, tid, &cet) != CTF_ERR)
330 if (msym.minsym != NULL)
343 int nfields = fip->fields.size ();
354 for (
int i = 0; i < nfields; ++i)
356 struct ctf_nextfield &
field = fip->fields[i];
369 const char *name_hint)
372 const struct floatformat **format;
376 if (format !=
nullptr)
389ctf_add_member_cb (
const char *
name,
391 unsigned long offset,
394 struct ctf_field_info *fip = (
struct ctf_field_info *) arg;
395 struct ctf_context *ccp = fip->cur_context;
396 struct ctf_nextfield new_field;
401 fp = &new_field.field;
404 kind = ctf_type_kind (ccp->fp, tid);
405 t = fetch_tid_type (ccp, tid);
408 t = read_type_record (ccp, tid);
411 complaint (_(
"ctf_add_member_cb: %s has NO type (%ld)"),
name, tid);
413 set_tid_type (ccp->of, tid, t);
417 if (kind == CTF_K_STRUCT || kind == CTF_K_UNION)
418 process_struct_members (ccp, tid, t);
424 fip->fields.emplace_back (new_field);
433ctf_add_enum_member_cb (
const char *
name,
int enum_value,
void *arg)
435 struct ctf_field_info *fip = (
struct ctf_field_info *) arg;
436 struct ctf_nextfield new_field;
438 struct ctf_context *ccp = fip->cur_context;
440 fp = &new_field.field;
448 struct symbol *sym =
new (&ccp->of->objfile_obstack)
symbol;
459 fip->fields.emplace_back (new_field);
471 ctf_dict_t *fp = ccp->fp;
472 struct symbol *sym =
nullptr;
474 const char *
name = ctf_type_name_raw (fp, tid);
488 uint32_t kind = ctf_type_kind (fp, tid);
502 if (sym->
type ()->
code () == TYPE_CODE_VOID)
535 ctf_dict_t *fp = ccp->fp;
541 if (ctf_type_encoding (fp, tid, &cet))
543 complaint (_(
"ctf_type_encoding read_base_type failed - %s"),
544 ctf_errmsg (ctf_errno (fp)));
548 name = ctf_type_name_raw (fp, tid);
549 if (
name ==
nullptr || strlen (
name) == 0)
551 name = ctf_type_aname (fp, tid);
553 complaint (_(
"ctf_type_aname read_base_type failed - %s"),
554 ctf_errmsg (ctf_errno (fp)));
557 kind = ctf_type_kind (fp, tid);
558 if (kind == CTF_K_INTEGER)
560 uint32_t issigned, ischar, isbool;
563 issigned = cet.cte_format & CTF_INT_SIGNED;
564 ischar = cet.cte_format & CTF_INT_CHAR;
565 isbool = cet.cte_format & CTF_INT_BOOL;
574 if (cet.cte_bits && ((cet.cte_bits % TARGET_CHAR_BIT) == 0))
581 else if (kind == CTF_K_FLOAT)
584 isflt = !((cet.cte_format & CTF_FP_IMAGRY) == CTF_FP_IMAGRY
585 || (cet.cte_format & CTF_FP_DIMAGRY) == CTF_FP_DIMAGRY
586 || (cet.cte_format & CTF_FP_LDIMAGRY) == CTF_FP_LDIMAGRY);
588 type = ctf_init_float_type (of, cet.cte_bits,
name,
name);
592 = ctf_init_float_type (of, cet.cte_bits / 2, NULL,
name);
598 complaint (_(
"read_base_type: unsupported base kind (%d)"), kind);
602 if (
name !=
nullptr && strcmp (
name,
"char") == 0)
605 return set_tid_type (of, tid,
type);
609process_base_type (
struct ctf_context *ccp, ctf_id_t tid)
628 ctf_dict_t *fp = ccp->fp;
634 const char *
name = ctf_type_name_raw (fp, tid);
635 if (
name !=
nullptr && strlen (
name) != 0)
638 kind = ctf_type_kind (fp, tid);
639 if (kind == CTF_K_UNION)
647 return set_tid_type (ccp->of, tid,
type);
654process_struct_members (
struct ctf_context *ccp,
658 struct ctf_field_info fi;
660 fi.cur_context = ccp;
661 if (ctf_member_iter (ccp->fp, tid, ctf_add_member_cb, &fi) == CTF_ERR)
662 complaint (_(
"ctf_member_iter process_struct_members failed - %s"),
663 ctf_errmsg (ctf_errno (ccp->fp)));
672process_structure_type (
struct ctf_context *ccp, ctf_id_t tid)
677 process_struct_members (ccp, tid,
type);
683read_func_kind_type (
struct ctf_context *ccp, ctf_id_t tid)
686 ctf_dict_t *fp = ccp->fp;
687 struct type *
type, *rettype, *atype;
694 if (ctf_func_type_info (fp, tid, &cfi) < 0)
696 const char *fname = ctf_type_name_raw (fp, tid);
697 error (_(
"Error getting function type info: %s"),
698 fname ==
nullptr ?
"noname" : fname);
700 rettype = fetch_tid_type (ccp, cfi.ctc_return);
707 if ((cfi.ctc_flags & CTF_FUNC_VARARG) != 0)
712 std::vector<ctf_id_t>
argv (argc);
713 if (ctf_func_type_args (fp, tid, argc,
argv.data ()) == CTF_ERR)
720 for (
int iparam = 0; iparam < argc; iparam++)
722 atype = fetch_tid_type (ccp, argv[iparam]);
723 if (atype !=
nullptr)
730 return set_tid_type (of, tid,
type);
740 ctf_dict_t *fp = ccp->fp;
745 const char *
name = ctf_type_name_raw (fp, tid);
746 if (
name !=
nullptr && strlen (
name) != 0)
755 return set_tid_type (of, tid,
type);
759process_enum_type (
struct ctf_context *ccp, ctf_id_t tid)
762 struct ctf_field_info fi;
766 fi.cur_context = ccp;
768 if (ctf_enum_iter (ccp->fp, tid, ctf_add_enum_member_cb, &fi) == CTF_ERR)
769 complaint (_(
"ctf_enum_iter process_enum_type failed - %s"),
770 ctf_errmsg (ctf_errno (ccp->fp)));
783 struct type *base_type,
787 struct type *el_type, *inner_array;
790 inner_array = base_type;
803 return set_tid_type (ccp->of, tid, base_type);
812 ctf_dict_t *fp = ccp->fp;
813 struct type *element_type, *range_type, *idx_type;
817 if (ctf_array_info (fp, tid, &ar) == CTF_ERR)
819 complaint (_(
"ctf_array_info read_array_type failed - %s"),
820 ctf_errmsg (ctf_errno (fp)));
824 element_type = fetch_tid_type (ccp, ar.ctr_contents);
825 if (element_type ==
nullptr)
828 idx_type = fetch_tid_type (ccp, ar.ctr_index);
829 if (idx_type ==
nullptr)
834 if (ar.ctr_nelems <= 1)
851read_const_type (
struct ctf_context *ccp, ctf_id_t tid, ctf_id_t btid)
854 struct type *base_type, *cv_type;
856 base_type = fetch_tid_type (ccp, btid);
857 if (base_type ==
nullptr)
859 base_type = read_type_record (ccp, btid);
860 if (base_type ==
nullptr)
862 complaint (_(
"read_const_type: NULL base type (%ld)"), btid);
868 return set_tid_type (
objfile, tid, cv_type);
874read_volatile_type (
struct ctf_context *ccp, ctf_id_t tid, ctf_id_t btid)
877 ctf_dict_t *fp = ccp->fp;
878 struct type *base_type, *cv_type;
880 base_type = fetch_tid_type (ccp, btid);
881 if (base_type ==
nullptr)
883 base_type = read_type_record (ccp, btid);
884 if (base_type ==
nullptr)
886 complaint (_(
"read_volatile_type: NULL base type (%ld)"), btid);
891 if (ctf_type_kind (fp, btid) == CTF_K_ARRAY)
895 return set_tid_type (
objfile, tid, cv_type);
901read_restrict_type (
struct ctf_context *ccp, ctf_id_t tid, ctf_id_t btid)
904 struct type *base_type, *cv_type;
906 base_type = fetch_tid_type (ccp, btid);
907 if (base_type ==
nullptr)
909 base_type = read_type_record (ccp, btid);
910 if (base_type ==
nullptr)
912 complaint (_(
"read_restrict_type: NULL base type (%ld)"), btid);
918 return set_tid_type (
objfile, tid, cv_type);
924read_typedef_type (
struct ctf_context *ccp, ctf_id_t tid,
925 ctf_id_t btid,
const char *
name)
932 set_tid_type (
objfile, tid, this_type);
941 return set_tid_type (
objfile, tid, this_type);
947read_pointer_type (
struct ctf_context *ccp, ctf_id_t tid, ctf_id_t btid)
958 complaint (_(
"read_pointer_type: NULL target type (%ld)"), btid);
966 return set_tid_type (of, tid,
type);
972read_forward_type (
struct ctf_context *ccp, ctf_id_t tid)
975 ctf_dict_t *fp = ccp->fp;
981 const char *
name = ctf_type_name_raw (fp, tid);
982 if (
name !=
nullptr && strlen (
name) != 0)
985 kind = ctf_type_kind_forwarded (fp, tid);
986 if (kind == CTF_K_UNION)
994 return set_tid_type (of, tid,
type);
1000read_type_record (
struct ctf_context *ccp, ctf_id_t tid)
1002 ctf_dict_t *fp = ccp->fp;
1007 kind = ctf_type_kind (fp, tid);
1017 case CTF_K_FUNCTION:
1018 type = read_func_kind_type (ccp, tid);
1021 btid = ctf_type_reference (fp, tid);
1022 type = read_const_type (ccp, tid, btid);
1026 const char *
name = ctf_type_name_raw (fp, tid);
1027 btid = ctf_type_reference (fp, tid);
1028 type = read_typedef_type (ccp, tid, btid,
name);
1031 case CTF_K_VOLATILE:
1032 btid = ctf_type_reference (fp, tid);
1033 type = read_volatile_type (ccp, tid, btid);
1035 case CTF_K_RESTRICT:
1036 btid = ctf_type_reference (fp, tid);
1037 type = read_restrict_type (ccp, tid, btid);
1040 btid = ctf_type_reference (fp, tid);
1041 type = read_pointer_type (ccp, tid, btid);
1051 type = read_forward_type (ccp, tid);
1065ctf_add_type_cb (ctf_id_t tid,
void *arg)
1067 struct ctf_context *ccp = (
struct ctf_context *) arg;
1072 type = get_tid_type (ccp->of, tid);
1073 if (
type !=
nullptr)
1076 ctf_id_t btid = ctf_type_reference (ccp->fp, tid);
1077 kind = ctf_type_kind (ccp->fp, tid);
1082 process_structure_type (ccp, tid);
1085 process_enum_type (ccp, tid);
1087 case CTF_K_FUNCTION:
1088 type = read_func_kind_type (ccp, tid);
1093 process_base_type (ccp, tid);
1096 new_symbol (ccp, read_type_record (ccp, tid), tid);
1099 type = read_const_type (ccp, tid, btid);
1102 case CTF_K_VOLATILE:
1103 type = read_volatile_type (ccp, tid, btid);
1106 case CTF_K_RESTRICT:
1107 type = read_restrict_type (ccp, tid, btid);
1111 type = read_pointer_type (ccp, tid, btid);
1130ctf_add_var_cb (
const char *
name, ctf_id_t
id,
void *arg)
1132 struct ctf_context *ccp = (
struct ctf_context *) arg;
1133 struct symbol *sym =
nullptr;
1137 type = get_tid_type (ccp->of,
id);
1139 kind = ctf_type_kind (ccp->fp,
id);
1142 case CTF_K_FUNCTION:
1143 if (
name !=
nullptr && strcmp (
name,
"main") == 0)
1148 case CTF_K_VOLATILE:
1149 case CTF_K_RESTRICT:
1154 if (
type !=
nullptr)
1164 if (
type ==
nullptr)
1166 complaint (_(
"ctf_add_var_cb: %s has NO type (%ld)"),
name,
id);
1169 sym =
new (&ccp->of->objfile_obstack)
symbol;
1178 complaint (_(
"ctf_add_var_cb: kind unsupported (%d)"), kind);
1183 set_symbol_address (ccp->of, sym,
name);
1192add_stt_entries (
struct ctf_context *ccp,
int functions)
1194 ctf_next_t *i =
nullptr;
1197 struct symbol *sym =
nullptr;
1200 while ((tid = ctf_symbol_next (ccp->fp, &i, &tname, functions)) != CTF_ERR)
1202 type = get_tid_type (ccp->of, tid);
1203 if (
type ==
nullptr)
1205 sym =
new (&ccp->of->objfile_obstack)
symbol;
1212 set_symbol_address (ccp->of, sym, tname);
1219add_stt_obj (
struct ctf_context *ccp)
1221 add_stt_entries (ccp, 0);
1227add_stt_func (
struct ctf_context *ccp)
1229 add_stt_entries (ccp, 1);
1235get_objfile_text_range (
struct objfile *of,
int *tsize)
1237 bfd *abfd = of->
obfd.get ();
1238 const asection *codes;
1240 codes = bfd_get_section_by_name (abfd,
".text");
1241 *tsize = codes ? bfd_section_size (codes) : 0;
1248ctf_start_compunit_symtab (ctf_psymtab *pst,
1249 struct objfile *of, CORE_ADDR text_offset)
1251 struct ctf_context *ccp;
1253 ccp = &pst->context;
1255 (of, pst->filename,
nullptr,
1257 ccp->builder->record_debugformat (
"ctf");
1265ctf_end_compunit_symtab (ctf_psymtab *pst,
1266 CORE_ADDR end_addr,
int section)
1268 struct ctf_context *ccp;
1270 ccp = &pst->context;
1272 = ccp->builder->end_compunit_symtab (end_addr, section);
1273 delete ccp->builder;
1274 ccp->builder =
nullptr;
1281ctf_psymtab_add_enums (
struct ctf_context *ccp, ctf_id_t tid)
1285 ctf_next_t *i =
nullptr;
1287 while ((ename = ctf_enum_next (ccp->fp, tid, &i, &val)) !=
nullptr)
1289 ccp->pst->add_psymbol (ename,
true,
1292 0,
language_c, ccp->partial_symtabs, ccp->of);
1294 if (ctf_errno (ccp->fp) != ECTF_NEXT_END)
1295 complaint (_(
"ctf_enum_next ctf_psymtab_add_enums failed - %s"),
1296 ctf_errmsg (ctf_errno (ccp->fp)));
1303ctf_psymtab_add_stt_entries (ctf_dict_t *cfp, ctf_psymtab *pst,
1304 struct objfile *of,
int functions)
1306 ctf_next_t *i =
nullptr;
1310 while ((tid = ctf_symbol_next (cfp, &i, &tname, functions)) != CTF_ERR)
1312 uint32_t kind = ctf_type_kind (cfp, tid);
1327 if (kind == CTF_K_FUNCTION)
1329 else if (kind == CTF_K_CONST)
1334 pst->add_psymbol (tname,
true,
1335 tdomain, aclass, -1,
1337 0,
language_c, pst->context.partial_symtabs, of);
1344ctf_psymtab_add_stt_obj (ctf_dict_t *cfp, ctf_psymtab *pst,
1347 ctf_psymtab_add_stt_entries (cfp, pst, of, 0);
1353ctf_psymtab_add_stt_func (ctf_dict_t *cfp, ctf_psymtab *pst,
1356 ctf_psymtab_add_stt_entries (cfp, pst, of, 1);
1364 struct ctf_context *ccp;
1366 gdb_assert (!readin);
1371 if (ctf_type_iter (ccp->fp, ctf_add_type_cb, ccp) == CTF_ERR)
1372 complaint (_(
"ctf_type_iter psymtab_to_symtab failed - %s"),
1373 ctf_errmsg (ctf_errno (ccp->fp)));
1377 if (ctf_variable_iter (ccp->fp, ctf_add_var_cb, ccp) == CTF_ERR)
1378 complaint (_(
"ctf_variable_iter psymtab_to_symtab failed - %s"),
1379 ctf_errmsg (ctf_errno (ccp->fp)));
1395 warning (_(
"bug: psymtab for %s is already read in."), filename);
1400 gdb_printf (_(
"Reading in CTF data for %s..."), filename);
1408 offset = get_objfile_text_range (
objfile, &tsize);
1409 ctf_start_compunit_symtab (
this,
objfile, offset);
1412 set_text_low (offset);
1413 set_text_high (offset + tsize);
1436create_partial_symtab (
const char *
name,
1446 pst->context.arc = arc;
1447 pst->context.fp = cfp;
1449 pst->context.partial_symtabs = partial_symtabs;
1450 pst->context.pst = pst;
1451 pst->context.builder =
nullptr;
1459ctf_psymtab_type_cb (ctf_id_t tid,
void *arg)
1461 struct ctf_context *ccp;
1465 ccp = (
struct ctf_context *) arg;
1469 kind = ctf_type_kind (ccp->fp, tid);
1473 ctf_psymtab_add_enums (ccp, tid);
1480 case CTF_K_FUNCTION:
1492 case CTF_K_VOLATILE:
1493 case CTF_K_RESTRICT:
1507 const char *
name = ctf_type_name_raw (ccp->fp, tid);
1508 if (
name ==
nullptr || strlen (
name) == 0)
1511 ccp->pst->add_psymbol (
name,
false,
1512 domain, aclass, section,
1514 0,
language_c, ccp->partial_symtabs, ccp->of);
1522ctf_psymtab_var_cb (
const char *
name, ctf_id_t
id,
void *arg)
1524 struct ctf_context *ccp = (
struct ctf_context *) arg;
1526 ccp->pst->add_psymbol (
name,
true,
1529 0,
language_c, ccp->partial_symtabs, ccp->of);
1537scan_partial_symbols (ctf_dict_t *cfp,
psymtab_storage *partial_symtabs,
1538 struct ctf_per_tu_data *tup,
const char *fname)
1541 bool isparent =
false;
1543 if (strcmp (fname,
".ctf") == 0)
1545 fname = bfd_get_filename (of->
obfd.get ());
1549 ctf_psymtab *pst = create_partial_symtab (fname, tup->arc, cfp,
1550 partial_symtabs, of);
1552 struct ctf_context *ccx = &pst->context;
1553 if (isparent ==
false)
1556 if (ctf_type_iter (cfp, ctf_psymtab_type_cb, ccx) == CTF_ERR)
1557 complaint (_(
"ctf_type_iter scan_partial_symbols failed - %s"),
1558 ctf_errmsg (ctf_errno (cfp)));
1560 if (ctf_variable_iter (cfp, ctf_psymtab_var_cb, ccx) == CTF_ERR)
1561 complaint (_(
"ctf_variable_iter scan_partial_symbols failed - %s"),
1562 ctf_errmsg (ctf_errno (cfp)));
1567 ctf_psymtab_add_stt_obj (cfp, pst, of);
1568 ctf_psymtab_add_stt_func (cfp, pst, of);
1576build_ctf_archive_member (ctf_dict_t *ctf,
const char *
name,
void *arg)
1578 struct ctf_per_tu_data *tup = (
struct ctf_per_tu_data *) arg;
1579 ctf_dict_t *parent = tup->fp;
1581 if (strcmp (
name,
".ctf") != 0)
1582 ctf_import (ctf, parent);
1591 scan_partial_symbols (ctf, pss, tup,
name);
1603 struct ctf_per_tu_data pcu;
1604 bfd *abfd = of->
obfd.get ();
1607 ctf_archive_t *arc = ctf_bfdopen (abfd, &
err);
1609 error (_(
"ctf_bfdopen failed on %s - %s"),
1610 bfd_get_filename (abfd), ctf_errmsg (
err));
1612 ctf_dict_t *fp = ctf_dict_open (arc, NULL, &
err);
1614 error (_(
"ctf_dict_open failed on %s - %s"),
1615 bfd_get_filename (abfd), ctf_errmsg (
err));
1616 ctf_dict_key.emplace (of, fp);
1623 of->
qf.emplace_front (psf);
1626 if (ctf_archive_iter (arc, build_ctf_archive_member, &pcu) < 0)
1627 error (_(
"ctf_archive_iter failed in input file %s: - %s"),
1628 bfd_get_filename (abfd), ctf_errmsg (
err));
#define bits(obj, st, fn)
void * xcalloc(size_t number, size_t size)
void add_symbol_to_list(struct symbol *symbol, struct pending **listhead)
void set(unsigned key, void *datum)
#define complaint(FMT,...)
void elfctf_build_psymtabs(struct objfile *of)
const struct floatformat ** gdbarch_floatformat_for_type(struct gdbarch *gdbarch, const char *name, int length)
int gdbarch_int_bit(struct gdbarch *gdbarch)
struct type * make_restrict_type(struct type *type)
struct type * lookup_pointer_type(struct type *type)
bool set_type_align(struct type *type, ULONGEST align)
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 * create_array_type(struct type *result_type, struct type *element_type, struct type *range_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)
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 * copy_type(const struct type *type)
#define TYPE_ZALLOC(t, size)
#define FIELD_BITSIZE(thisfld)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t err
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
void set_objfile_main_name(struct objfile *objfile, const char *name, enum language lang)
struct type * objfile_int_type(struct objfile *of, int size_in_bytes, bool unsigned_p)
#define SECT_OFF_TEXT(objfile)
#define OBJSTAT(objfile, expr)
static struct type * read_structure_type(struct die_info *die, struct dwarf2_cu *cu)
static struct symbol * new_symbol(struct die_info *, struct type *, struct dwarf2_cu *, struct symbol *=NULL)
static struct type * add_array_cv_type(struct die_info *die, struct dwarf2_cu *cu, struct type *base_type, int cnst, int voltl)
static struct type * read_array_type(struct die_info *die, struct dwarf2_cu *cu)
static struct type * read_base_type(struct die_info *die, struct dwarf2_cu *cu)
static struct type * read_enum_type(const char **, struct type *, struct objfile *)
static int attach_fields_to_type(struct stab_field_info *, struct type *, struct objfile *)
void set_type(struct type *type)
void set_loc_bitpos(LONGEST bitpos)
void set_loc_enumval(LONGEST enumval)
void set_name(const char *name)
void set_section_index(short idx)
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 >())
void set_language(enum language language, struct obstack *obstack)
const char * linkage_name() const
struct type * builtin_error
struct type * builtin_int
struct type * builtin_void
struct gdbarch * arch() const
struct objfile_per_bfd_storage * per_bfd
CORE_ADDR text_section_offset() const
auto_obstack objfile_obstack
std::forward_list< quick_symbol_functions_up > qf
virtual void expand_psymtab(struct objfile *)=0
virtual void read_symtab(struct objfile *)=0
struct type * type() const
void set_aclass_index(unsigned int aclass_index)
void set_type(struct type *type)
void set_value_address(CORE_ADDR address)
void set_domain(domain_enum domain)
struct type * target_type() const
void set_code(type_code code)
struct field & field(int idx) const
void set_has_no_signedness(bool has_no_signedness)
void set_target_type(struct type *target_type)
void set_is_stub(bool is_stub)
void set_has_varargs(bool has_varargs)
void set_num_fields(int num_fields)
void set_name(const char *name)
void set_length(ULONGEST length)
range_bounds * bounds() const
void set_fields(struct field *fields)
void set_target_is_stub(bool target_is_stub)
void gdb_printf(struct ui_file *stream, const char *format,...)
void gdb_flush(struct ui_file *stream)