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,
130 unrelocated_addr addr)
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 ();
352 for (
int i = 0; i < nfields; ++i)
354 struct ctf_nextfield &
field = fip->fields[i];
367 const char *name_hint)
370 const struct floatformat **format;
375 if (format !=
nullptr)
388ctf_add_member_cb (
const char *
name,
390 unsigned long offset,
393 struct ctf_field_info *fip = (
struct ctf_field_info *) arg;
394 struct ctf_context *ccp = fip->cur_context;
395 struct ctf_nextfield new_field;
400 fp = &new_field.field;
403 kind = ctf_type_kind (ccp->fp, tid);
404 t = fetch_tid_type (ccp, tid);
407 t = read_type_record (ccp, tid);
410 complaint (_(
"ctf_add_member_cb: %s has NO type (%ld)"),
name, tid);
412 set_tid_type (ccp->of, tid, t);
416 if (kind == CTF_K_STRUCT || kind == CTF_K_UNION)
417 process_struct_members (ccp, tid, t);
421 fp->
set_bitsize (get_bitsize (ccp->fp, tid, kind));
423 fip->fields.emplace_back (new_field);
432ctf_add_enum_member_cb (
const char *
name,
int enum_value,
void *arg)
434 struct ctf_field_info *fip = (
struct ctf_field_info *) arg;
435 struct ctf_nextfield new_field;
437 struct ctf_context *ccp = fip->cur_context;
439 fp = &new_field.field;
447 struct symbol *sym =
new (&ccp->of->objfile_obstack)
symbol;
458 fip->fields.emplace_back (new_field);
470 ctf_dict_t *fp = ccp->fp;
471 struct symbol *sym =
nullptr;
473 const char *
name = ctf_type_name_raw (fp, tid);
487 uint32_t kind = ctf_type_kind (fp, tid);
501 if (sym->
type ()->
code () == TYPE_CODE_VOID)
534 ctf_dict_t *fp = ccp->fp;
540 if (ctf_type_encoding (fp, tid, &cet))
542 complaint (_(
"ctf_type_encoding read_base_type failed - %s"),
543 ctf_errmsg (ctf_errno (fp)));
547 name = ctf_type_name_raw (fp, tid);
548 if (
name ==
nullptr || strlen (
name) == 0)
550 name = ctf_type_aname (fp, tid);
552 complaint (_(
"ctf_type_aname read_base_type failed - %s"),
553 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);
599 type = alloc.new_type (TYPE_CODE_ERROR, cet.cte_bits,
name);
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)
719 for (
int iparam = 0; iparam < argc; iparam++)
721 atype = fetch_tid_type (ccp, argv[iparam]);
722 if (atype !=
nullptr)
729 return set_tid_type (of, tid,
type);
739 ctf_dict_t *fp = ccp->fp;
744 const char *
name = ctf_type_name_raw (fp, tid);
745 if (
name !=
nullptr && strlen (
name) != 0)
754 return set_tid_type (of, tid,
type);
758process_enum_type (
struct ctf_context *ccp, ctf_id_t tid)
761 struct ctf_field_info fi;
765 fi.cur_context = ccp;
767 if (ctf_enum_iter (ccp->fp, tid, ctf_add_enum_member_cb, &fi) == CTF_ERR)
768 complaint (_(
"ctf_enum_iter process_enum_type failed - %s"),
769 ctf_errmsg (ctf_errno (ccp->fp)));
782 struct type *base_type,
786 struct type *el_type, *inner_array;
789 inner_array = base_type;
802 return set_tid_type (ccp->of, tid, base_type);
811 ctf_dict_t *fp = ccp->fp;
812 struct type *element_type, *range_type, *idx_type;
816 if (ctf_array_info (fp, tid, &ar) == CTF_ERR)
818 complaint (_(
"ctf_array_info read_array_type failed - %s"),
819 ctf_errmsg (ctf_errno (fp)));
823 element_type = fetch_tid_type (ccp, ar.ctr_contents);
824 if (element_type ==
nullptr)
827 idx_type = fetch_tid_type (ccp, ar.ctr_index);
828 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)
933 set_tid_type (
objfile, tid, this_type);
942 return set_tid_type (
objfile, tid, this_type);
948read_pointer_type (
struct ctf_context *ccp, ctf_id_t tid, ctf_id_t btid)
959 complaint (_(
"read_pointer_type: NULL target type (%ld)"), btid);
967 return set_tid_type (of, tid,
type);
973read_forward_type (
struct ctf_context *ccp, ctf_id_t tid)
976 ctf_dict_t *fp = ccp->fp;
982 const char *
name = ctf_type_name_raw (fp, tid);
983 if (
name !=
nullptr && strlen (
name) != 0)
986 kind = ctf_type_kind_forwarded (fp, tid);
987 if (kind == CTF_K_UNION)
995 return set_tid_type (of, tid,
type);
1001read_type_record (
struct ctf_context *ccp, ctf_id_t tid)
1003 ctf_dict_t *fp = ccp->fp;
1008 kind = ctf_type_kind (fp, tid);
1018 case CTF_K_FUNCTION:
1019 type = read_func_kind_type (ccp, tid);
1022 btid = ctf_type_reference (fp, tid);
1023 type = read_const_type (ccp, tid, btid);
1027 const char *
name = ctf_type_name_raw (fp, tid);
1028 btid = ctf_type_reference (fp, tid);
1029 type = read_typedef_type (ccp, tid, btid,
name);
1032 case CTF_K_VOLATILE:
1033 btid = ctf_type_reference (fp, tid);
1034 type = read_volatile_type (ccp, tid, btid);
1036 case CTF_K_RESTRICT:
1037 btid = ctf_type_reference (fp, tid);
1038 type = read_restrict_type (ccp, tid, btid);
1041 btid = ctf_type_reference (fp, tid);
1042 type = read_pointer_type (ccp, tid, btid);
1052 type = read_forward_type (ccp, tid);
1066ctf_add_type_cb (ctf_id_t tid,
void *arg)
1068 struct ctf_context *ccp = (
struct ctf_context *) arg;
1073 type = get_tid_type (ccp->of, tid);
1074 if (
type !=
nullptr)
1077 ctf_id_t btid = ctf_type_reference (ccp->fp, tid);
1078 kind = ctf_type_kind (ccp->fp, tid);
1083 process_structure_type (ccp, tid);
1086 process_enum_type (ccp, tid);
1088 case CTF_K_FUNCTION:
1089 type = read_func_kind_type (ccp, tid);
1094 process_base_type (ccp, tid);
1097 new_symbol (ccp, read_type_record (ccp, tid), tid);
1100 type = read_const_type (ccp, tid, btid);
1103 case CTF_K_VOLATILE:
1104 type = read_volatile_type (ccp, tid, btid);
1107 case CTF_K_RESTRICT:
1108 type = read_restrict_type (ccp, tid, btid);
1112 type = read_pointer_type (ccp, tid, btid);
1131ctf_add_var_cb (
const char *
name, ctf_id_t
id,
void *arg)
1133 struct ctf_context *ccp = (
struct ctf_context *) arg;
1134 struct symbol *sym =
nullptr;
1138 type = get_tid_type (ccp->of,
id);
1140 kind = ctf_type_kind (ccp->fp,
id);
1143 case CTF_K_FUNCTION:
1144 if (
name !=
nullptr && strcmp (
name,
"main") == 0)
1149 case CTF_K_VOLATILE:
1150 case CTF_K_RESTRICT:
1155 if (
type !=
nullptr)
1165 if (
type ==
nullptr)
1167 complaint (_(
"ctf_add_var_cb: %s has NO type (%ld)"),
name,
id);
1170 sym =
new (&ccp->of->objfile_obstack)
symbol;
1179 complaint (_(
"ctf_add_var_cb: kind unsupported (%d)"), kind);
1184 set_symbol_address (ccp->of, sym,
name);
1193add_stt_entries (
struct ctf_context *ccp,
int functions)
1195 ctf_next_t *i =
nullptr;
1198 struct symbol *sym =
nullptr;
1201 while ((tid = ctf_symbol_next (ccp->fp, &i, &tname, functions)) != CTF_ERR)
1203 type = get_tid_type (ccp->of, tid);
1204 if (
type ==
nullptr)
1206 sym =
new (&ccp->of->objfile_obstack)
symbol;
1213 set_symbol_address (ccp->of, sym, tname);
1220add_stt_obj (
struct ctf_context *ccp)
1222 add_stt_entries (ccp, 0);
1228add_stt_func (
struct ctf_context *ccp)
1230 add_stt_entries (ccp, 1);
1236get_objfile_text_range (
struct objfile *of,
size_t *tsize)
1238 bfd *abfd = of->
obfd.get ();
1239 const asection *codes;
1241 codes = bfd_get_section_by_name (abfd,
".text");
1242 *tsize = codes ? bfd_section_size (codes) : 0;
1249ctf_start_compunit_symtab (ctf_psymtab *pst,
1250 struct objfile *of, CORE_ADDR text_offset)
1252 struct ctf_context *ccp;
1254 ccp = &pst->context;
1256 (of, pst->filename,
nullptr,
1258 ccp->builder->record_debugformat (
"ctf");
1265ctf_end_compunit_symtab (ctf_psymtab *pst,
1268 struct ctf_context *ccp;
1270 ccp = &pst->context;
1272 = ccp->builder->end_compunit_symtab (end_addr);
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 unrelocated_addr (0),
1295 if (ctf_errno (ccp->fp) != ECTF_NEXT_END)
1296 complaint (_(
"ctf_enum_next ctf_psymtab_add_enums failed - %s"),
1297 ctf_errmsg (ctf_errno (ccp->fp)));
1304ctf_psymtab_add_stt_entries (ctf_dict_t *cfp, ctf_psymtab *pst,
1305 struct objfile *of,
int functions)
1307 ctf_next_t *i =
nullptr;
1311 while ((tid = ctf_symbol_next (cfp, &i, &tname, functions)) != CTF_ERR)
1313 uint32_t kind = ctf_type_kind (cfp, tid);
1328 if (kind == CTF_K_FUNCTION)
1330 else if (kind == CTF_K_CONST)
1335 pst->add_psymbol (tname,
true,
1336 tdomain, aclass, -1,
1338 unrelocated_addr (0),
1339 language_c, pst->context.partial_symtabs, of);
1346ctf_psymtab_add_stt_obj (ctf_dict_t *cfp, ctf_psymtab *pst,
1349 ctf_psymtab_add_stt_entries (cfp, pst, of, 0);
1355ctf_psymtab_add_stt_func (ctf_dict_t *cfp, ctf_psymtab *pst,
1358 ctf_psymtab_add_stt_entries (cfp, pst, of, 1);
1366 struct ctf_context *ccp;
1368 gdb_assert (!readin);
1373 if (ctf_type_iter (ccp->fp, ctf_add_type_cb, ccp) == CTF_ERR)
1374 complaint (_(
"ctf_type_iter psymtab_to_symtab failed - %s"),
1375 ctf_errmsg (ctf_errno (ccp->fp)));
1379 if (ctf_variable_iter (ccp->fp, ctf_add_var_cb, ccp) == CTF_ERR)
1380 complaint (_(
"ctf_variable_iter psymtab_to_symtab failed - %s"),
1381 ctf_errmsg (ctf_errno (ccp->fp)));
1397 warning (_(
"bug: psymtab for %s is already read in."), filename);
1402 gdb_printf (_(
"Reading in CTF data for %s..."), filename);
1410 offset = get_objfile_text_range (
objfile, &tsize);
1411 ctf_start_compunit_symtab (
this,
objfile, offset);
1414 set_text_low (unrelocated_addr (0));
1415 set_text_high (unrelocated_addr (tsize));
1437create_partial_symtab (
const char *
name,
1446 unrelocated_addr (0));
1448 pst->context.arc = arc;
1449 pst->context.fp = cfp;
1451 pst->context.partial_symtabs = partial_symtabs;
1452 pst->context.pst = pst;
1453 pst->context.builder =
nullptr;
1461ctf_psymtab_type_cb (ctf_id_t tid,
void *arg)
1463 struct ctf_context *ccp;
1467 ccp = (
struct ctf_context *) arg;
1471 kind = ctf_type_kind (ccp->fp, tid);
1475 ctf_psymtab_add_enums (ccp, tid);
1482 case CTF_K_FUNCTION:
1494 case CTF_K_VOLATILE:
1495 case CTF_K_RESTRICT:
1509 const char *
name = ctf_type_name_raw (ccp->fp, tid);
1510 if (
name ==
nullptr || strlen (
name) == 0)
1513 ccp->pst->add_psymbol (
name,
false,
1514 domain, aclass, section,
1516 unrelocated_addr (0),
1525ctf_psymtab_var_cb (
const char *
name, ctf_id_t
id,
void *arg)
1527 struct ctf_context *ccp = (
struct ctf_context *) arg;
1529 ccp->pst->add_psymbol (
name,
true,
1532 unrelocated_addr (0),
1541scan_partial_symbols (ctf_dict_t *cfp,
psymtab_storage *partial_symtabs,
1542 struct ctf_per_tu_data *tup,
const char *fname)
1545 bool isparent =
false;
1547 if (strcmp (fname,
".ctf") == 0)
1549 fname = bfd_get_filename (of->
obfd.get ());
1553 ctf_psymtab *pst = create_partial_symtab (fname, tup->arc, cfp,
1554 partial_symtabs, of);
1556 struct ctf_context *ccx = &pst->context;
1557 if (isparent ==
false)
1560 if (ctf_type_iter (cfp, ctf_psymtab_type_cb, ccx) == CTF_ERR)
1561 complaint (_(
"ctf_type_iter scan_partial_symbols failed - %s"),
1562 ctf_errmsg (ctf_errno (cfp)));
1564 if (ctf_variable_iter (cfp, ctf_psymtab_var_cb, ccx) == CTF_ERR)
1565 complaint (_(
"ctf_variable_iter scan_partial_symbols failed - %s"),
1566 ctf_errmsg (ctf_errno (cfp)));
1571 ctf_psymtab_add_stt_obj (cfp, pst, of);
1572 ctf_psymtab_add_stt_func (cfp, pst, of);
1580build_ctf_archive_member (ctf_dict_t *ctf,
const char *
name,
void *arg)
1582 struct ctf_per_tu_data *tup = (
struct ctf_per_tu_data *) arg;
1583 ctf_dict_t *parent = tup->fp;
1585 if (strcmp (
name,
".ctf") != 0)
1586 ctf_import (ctf, parent);
1595 scan_partial_symbols (ctf, pss, tup,
name);
1607 struct ctf_per_tu_data pcu;
1608 bfd *abfd = of->
obfd.get ();
1611 ctf_archive_t *arc = ctf_bfdopen (abfd, &
err);
1613 error (_(
"ctf_bfdopen failed on %s - %s"),
1614 bfd_get_filename (abfd), ctf_errmsg (
err));
1616 ctf_dict_t *fp = ctf_dict_open (arc, NULL, &
err);
1618 error (_(
"ctf_dict_open failed on %s - %s"),
1619 bfd_get_filename (abfd), ctf_errmsg (
err));
1620 ctf_dict_key.emplace (of, fp);
1627 of->
qf.emplace_front (psf);
1630 if (ctf_archive_iter (arc, build_ctf_archive_member, &pcu) < 0)
1631 error (_(
"ctf_archive_iter failed in input file %s: - %s"),
1632 bfd_get_filename (abfd), ctf_errmsg (
err));
#define bits(obj, st, fn)
void * xcalloc(size_t number, size_t size)
static struct buildsym_compunit * buildsym_compunit
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)
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)
bool set_type_align(struct type *type, ULONGEST align)
struct type * make_cv_type(int cnst, int voltl, struct type *type, struct type **typeptr)
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)
struct type * init_complex_type(const char *name, struct type *target_type)
struct type * init_boolean_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
struct type * copy_type(const struct type *type)
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 *)
struct type * builtin_error
struct type * builtin_int
struct type * builtin_void
void set_type(struct type *type)
void set_loc_bitpos(LONGEST bitpos)
void set_bitsize(unsigned int bitsize)
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 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(unsigned int num_fields)
void set_name(const char *name)
void alloc_fields(unsigned int nfields, bool init=true)
void set_length(ULONGEST length)
range_bounds * bounds() const
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)