41#define CTF_NULL_TYPEID 0
45#define CTF_INIT_TYPEID 1
116 union GTY ((desc (
"0")))
118 uint32_t
GTY ((tag (
"0"))) _size;
119 uint32_t
GTY ((tag ("1"))) _type;
121 uint32_t ctti_lsizehi;
122 uint32_t ctti_lsizelo;
125#define ctti_size _u._size
126#define ctti_type _u._type
130#define CTF_FUNC_VARARG 0x1
134typedef struct GTY ((chain_next (
"%h.dmd_next")))
ctf_dmdef
136 const char * dmd_name;
138 uint32_t dmd_name_offset;
140 HOST_WIDE_INT dmd_value;
144#define ctf_dmd_list_next(elem) ((ctf_dmdef_t *)((elem)->dmd_next))
151 const char * farg_name;
152 uint32_t farg_name_offset;
156#define ctf_farg_list_next(elem) ((ctf_func_arg_t *)((elem)->farg_next))
163 const char * dtd_name;
175 union GTY ((desc (
"ctf_dtu_d_union_selector (&%1)")))
190#define ctf_type_id(dtd) ((uint32_t) dtd->dtd_type)
197 const char * dvd_name;
198 uint32_t dvd_name_offset;
199 unsigned int dvd_visibility;
211 const char * ctsloc_file;
212 unsigned int ctsloc_line;
213 unsigned int ctsloc_col;
242 return htab_hash_pointer (dtd->
dtd_key);
262 return htab_hash_pointer (dvd->
dvd_key);
278 unsigned short ctfc_magic;
279 unsigned char ctfc_version;
280 unsigned char ctfc_flags;
281 uint32_t ctfc_cuname_offset;
284 hash_table <ctfc_dtd_hasher> *
GTY (()) ctfc_types;
296 uint64_t ctfc_num_types;
297 uint64_t ctfc_num_stypes;
298 uint64_t ctfc_num_global_funcs;
299 uint64_t ctfc_num_global_objts;
304 uint64_t ctfc_num_vlen_bytes;
317 uint64_t ctfc_vars_list_count;
336 uint64_t ctfc_numbytes_asm;
340 size_t ctfc_aux_strlen;
347#define CTF_AUX_STRTAB 1
387#define CTF_ADD_NONROOT 0
388#define CTF_ADD_ROOT 1
395extern void ctf_output (
const char * filename);
bool traverse_btf_func_types(funcs_traverse_callback callback, void *data)
Definition btfout.cc:1690
void btf_early_finish(void)
Definition btfout.cc:1175
void btf_finalize(void)
Definition btfout.cc:1654
void btf_finish(void)
Definition btfout.cc:1612
void btf_mark_type_used(tree t)
Definition btfout.cc:1512
Definition hash-table.h:375
#define GTY(x)
Definition coretypes.h:41
union tree_node * tree
Definition coretypes.h:97
ctf_dvdef_ref ctf_dvd_lookup(const ctf_container_ref ctfc, dw_die_ref die)
Definition ctfc.cc:169
ctf_dtdef_ref ctf_add_unknown(ctf_container_ref ctfc, uint32_t flag, const char *name, const ctf_encoding_t *ep, dw_die_ref die)
Definition ctfc.cc:533
ctf_dtdef_ref ctf_add_array(ctf_container_ref ctfc, uint32_t flag, const ctf_arinfo_t *arp, dw_die_ref die)
Definition ctfc.cc:547
unsigned int ctfc_get_num_ctf_types(ctf_container_ref ctfc)
Definition ctfc.cc:49
ctf_dtdef_ref ctf_add_enum(ctf_container_ref ctfc, uint32_t flag, const char *name, HOST_WIDE_INT size, bool eunsigned, dw_die_ref die)
Definition ctfc.cc:570
void ctfc_delete_strtab(ctf_strtable_t *strtab)
Definition ctfc.cc:971
ctf_dtdef_ref ctf_add_typedef(ctf_container_ref ctfc, uint32_t flag, const char *name, ctf_dtdef_ref ref, dw_die_ref die)
Definition ctfc.cc:465
int ctf_add_variable(ctf_container_ref ctfc, const char *name, ctf_dtdef_ref ref, dw_die_ref die, unsigned int external_vis, dw_die_ref die_var_decl)
Definition ctfc.cc:695
ctf_dtdef_ref ctf_add_function(ctf_container_ref ctfc, uint32_t flag, const char *name, const ctf_funcinfo_t *ctc, dw_die_ref die, bool from_global_func, int linkage)
Definition ctfc.cc:771
void init_ctf_strtable(ctf_strtable_t *strtab)
Definition ctfc.cc:913
void ctf_init(void)
Definition ctfc.cc:1036
ctf_container_ref ctf_get_tu_ctfc(void)
Definition ctfc.cc:33
bool ctf_type_exists(ctf_container_ref ctfc, dw_die_ref type, ctf_dtdef_ref *dtd)
Definition ctfc.cc:861
ctf_strtable_t * ctfc_get_strtab(ctf_container_ref ctfc, int aux)
Definition ctfc.cc:65
size_t ctfc_get_strtab_len(ctf_container_ref ctfc, int aux)
Definition ctfc.cc:73
ctf_dtdef_ref ctf_add_reftype(ctf_container_ref ctfc, uint32_t flag, ctf_dtdef_ref ref, uint32_t kind, dw_die_ref die)
Definition ctfc.cc:429
int ctf_add_function_arg(ctf_container_ref ctfc, dw_die_ref func, const char *name, ctf_dtdef_ref arg_dtd)
Definition ctfc.cc:739
int ctfc_get_dtd_srcloc(ctf_dtdef_ref dtd, ctf_srcloc_ref loc)
Definition ctfc.cc:882
size_t ctfc_get_num_vlen_bytes(ctf_container_ref ctfc)
Definition ctfc.cc:82
ctf_dtdef_ref ctf_dtd_lookup(const ctf_container_ref ctfc, const dw_die_ref type)
Definition ctfc.cc:136
ctf_dtdef_ref ctf_add_float(ctf_container_ref ctfc, uint32_t flag, const char *name, const ctf_encoding_t *ep, dw_die_ref die)
Definition ctfc.cc:519
const char * ctf_add_string(ctf_container_ref ctfc, const char *name, uint32_t *name_offset, int aux_str=CTF_STRTAB)
Definition ctfc.cc:318
ctf_dtdef_ref ctf_add_integer(ctf_container_ref ctfc, uint32_t flag, const char *name, const ctf_encoding_t *ep, dw_die_ref die)
Definition ctfc.cc:526
int ctf_add_member_offset(ctf_container_ref ctfc, dw_die_ref sou, const char *name, ctf_dtdef_ref type, uint64_t bit_offset)
Definition ctfc.cc:654
ctf_dtdef_ref ctf_add_sou(ctf_container_ref ctfc, uint32_t flag, const char *name, uint32_t kind, size_t size, dw_die_ref die)
Definition ctfc.cc:800
ctf_dtdef_ref ctf_add_pointer(ctf_container_ref ctfc, uint32_t flag, ctf_dtdef_ref ref, dw_die_ref die)
Definition ctfc.cc:540
void ctfc_delete_container(ctf_container_ref ctfc)
Definition ctfc.cc:993
bool ctfc_is_empty_container(ctf_container_ref ctfc)
Definition ctfc.cc:41
ctf_dtdef_ref ctf_add_slice(ctf_container_ref ctfc, uint32_t flag, ctf_dtdef_ref ref, uint32_t bit_offset, uint32_t bit_size, dw_die_ref die)
Definition ctfc.cc:487
void ctf_add_cuname(ctf_container_ref ctfc, const char *filename)
Definition ctfc.cc:332
ctf_dtdef_ref ctf_add_forward(ctf_container_ref ctfc, uint32_t flag, const char *name, uint32_t kind, dw_die_ref die)
Definition ctfc.cc:449
ctf_container_ref tu_ctfc
Definition ctfc.cc:30
int ctfc_get_dvd_srcloc(ctf_dvdef_ref dvd, ctf_srcloc_ref loc)
Definition ctfc.cc:895
bool ctf_dvd_ignore_lookup(const ctf_container_ref ctfc, dw_die_ref die)
Definition ctfc.cc:203
unsigned int ctfc_get_num_ctf_vars(ctf_container_ref ctfc)
Definition ctfc.cc:56
ctf_dtdef_ref ctf_lookup_tree_type(ctf_container_ref ctfc, const tree type)
Definition ctfc.cc:843
enum ctf_dtu_d_union_enum ctf_dtu_d_union_selector(ctf_dtdef_ref ctftype)
Definition ctfc.cc:91
int ctf_add_enumerator(ctf_container_ref ctfc, ctf_dtdef_ref enum_dtd, const char *name, HOST_WIDE_INT value, dw_die_ref die)
Definition ctfc.cc:605
ctf_dvdef_ref ctf_dvd_lookup(const ctf_container_ref ctfc, dw_die_ref die)
Definition ctfc.cc:169
bool ctf_type_exists(ctf_container_ref, dw_die_ref, ctf_dtdef_ref *)
Definition ctfc.cc:861
ctf_dtdef_ref ctf_add_forward(ctf_container_ref, uint32_t, const char *, uint32_t, dw_die_ref)
Definition ctfc.cc:449
struct ctf_dmdef ctf_dmdef_t
uint64_t ctf_id_t
Definition ctfc.h:49
struct ctf_itype ctf_itype_t
struct ctf_sliceinfo ctf_sliceinfo_t
ctf_dtdef_ref ctf_add_sou(ctf_container_ref, uint32_t, const char *, uint32_t, size_t, dw_die_ref)
Definition ctfc.cc:800
void ctfc_delete_container(ctf_container_ref)
Definition ctfc.cc:993
ctf_container_t * ctf_container_ref
Definition ctfc.h:347
void ctf_add_cuname(ctf_container_ref, const char *)
Definition ctfc.cc:332
size_t ctfc_get_num_vlen_bytes(ctf_container_ref)
Definition ctfc.cc:82
ctf_dtu_d_union_enum
Definition ctfc.h:218
@ CTF_DTU_D_ARGUMENTS
Definition ctfc.h:222
@ CTF_DTU_D_SLICE
Definition ctfc.h:223
@ CTF_DTU_D_MEMBERS
Definition ctfc.h:219
@ CTF_DTU_D_ENCODING
Definition ctfc.h:221
@ CTF_DTU_D_ARRAY
Definition ctfc.h:220
ctf_dvdef_t * ctf_dvdef_ref
Definition ctfc.h:203
struct ctf_strtable ctf_strtable_t
ctf_dtdef_ref ctf_add_slice(ctf_container_ref, uint32_t, ctf_dtdef_ref, uint32_t, uint32_t, dw_die_ref)
Definition ctfc.cc:487
unsigned int ctfc_get_num_ctf_types(ctf_container_ref)
Definition ctfc.cc:49
ctf_dtdef_ref ctf_add_reftype(ctf_container_ref, uint32_t, ctf_dtdef_ref, uint32_t, dw_die_ref)
Definition ctfc.cc:429
ctf_dtdef_ref ctf_add_integer(ctf_container_ref, uint32_t, const char *, const ctf_encoding_t *, dw_die_ref)
Definition ctfc.cc:526
ctf_dtdef_ref ctf_lookup_tree_type(ctf_container_ref, const tree)
Definition ctfc.cc:843
void ctf_init(void)
Definition ctfc.cc:1036
ctf_container_ref ctf_get_tu_ctfc(void)
Definition ctfc.cc:33
void btf_early_finish(void)
Definition btfout.cc:1175
ctf_dtdef_ref ctf_add_array(ctf_container_ref, uint32_t, const ctf_arinfo_t *, dw_die_ref)
Definition ctfc.cc:547
bool(* funcs_traverse_callback)(ctf_dtdef_ref, void *)
Definition ctfc.h:456
struct ctf_encoding ctf_encoding_t
ctf_dtdef_t * ctf_dtdef_ref
Definition ctfc.h:53
enum ctf_dtu_d_union_enum ctf_dtu_d_union_selector(ctf_dtdef_ref)
Definition ctfc.cc:91
int ctf_add_enumerator(ctf_container_ref, ctf_dtdef_ref, const char *, HOST_WIDE_INT, dw_die_ref)
Definition ctfc.cc:605
ctf_dtdef_ref ctf_add_typedef(ctf_container_ref, uint32_t, const char *, ctf_dtdef_ref, dw_die_ref)
Definition ctfc.cc:465
struct ctf_string ctf_string_t
ctf_dtdef_ref ctf_add_pointer(ctf_container_ref, uint32_t, ctf_dtdef_ref, dw_die_ref)
Definition ctfc.cc:540
int ctfc_get_dvd_srcloc(ctf_dvdef_ref, ctf_srcloc_ref)
Definition ctfc.cc:895
ctf_dtdef_ref ctf_add_unknown(ctf_container_ref, uint32_t, const char *, const ctf_encoding_t *, dw_die_ref)
Definition ctfc.cc:533
void ctfc_delete_strtab(ctf_strtable_t *)
Definition ctfc.cc:971
void btf_finalize(void)
Definition btfout.cc:1654
ctf_strtable_t * ctfc_get_strtab(ctf_container_ref, int)
Definition ctfc.cc:65
bool ctfc_is_empty_container(ctf_container_ref)
Definition ctfc.cc:41
const char * ctf_add_string(ctf_container_ref, const char *, uint32_t *, int)
Definition ctfc.cc:318
void btf_mark_type_used(tree)
Definition btfout.cc:1512
struct ctf_func_arg ctf_func_arg_t
void ctf_output(const char *filename)
Definition ctfout.cc:803
bool traverse_btf_func_types(funcs_traverse_callback, void *)
Definition btfout.cc:1690
ctf_srcloc_t * ctf_srcloc_ref
Definition ctfc.h:214
struct ctf_funcinfo ctf_funcinfo_t
unsigned int ctfc_get_num_ctf_vars(ctf_container_ref)
Definition ctfc.cc:56
int ctf_add_variable(ctf_container_ref, const char *, ctf_dtdef_ref, dw_die_ref, unsigned int, dw_die_ref)
Definition ctfc.cc:695
void btf_finish(void)
Definition btfout.cc:1612
size_t ctfc_get_strtab_len(ctf_container_ref, int)
Definition ctfc.cc:73
ctf_dtdef_ref ctf_add_function(ctf_container_ref, uint32_t, const char *, const ctf_funcinfo_t *, dw_die_ref, bool, int)
Definition ctfc.cc:771
void init_ctf_strtable(ctf_strtable_t *)
Definition ctfc.cc:913
ctf_dtdef_ref ctf_add_enum(ctf_container_ref, uint32_t, const char *, HOST_WIDE_INT, bool, dw_die_ref)
Definition ctfc.cc:570
int ctfc_get_dtd_srcloc(ctf_dtdef_ref, ctf_srcloc_ref)
Definition ctfc.cc:882
struct ctf_srcloc ctf_srcloc_t
int ctf_add_function_arg(ctf_container_ref, dw_die_ref, const char *, ctf_dtdef_ref)
Definition ctfc.cc:739
struct ctf_arinfo ctf_arinfo_t
ctf_container_ref tu_ctfc
Definition ctfc.cc:30
bool ctf_dvd_ignore_lookup(const ctf_container_ref ctfc, dw_die_ref die)
Definition ctfc.cc:203
struct ctf_container ctf_container_t
void ctf_finalize(void)
Definition ctfout.cc:837
int ctf_add_member_offset(ctf_container_ref, dw_die_ref, const char *, ctf_dtdef_ref, uint64_t)
Definition ctfc.cc:654
ctf_dtdef_ref ctf_dtd_lookup(const ctf_container_ref ctfc, dw_die_ref die)
Definition ctfc.cc:136
ctf_dtdef_ref ctf_add_float(ctf_container_ref, uint32_t, const char *, const ctf_encoding_t *, dw_die_ref)
Definition ctfc.cc:519
unsigned int ctr_nelems
Definition ctfc.h:90
ctf_dtdef_ref ctr_contents
Definition ctfc.h:88
ctf_dtdef_ref ctr_index
Definition ctfc.h:89
hash_table< ctfc_dtd_hasher > * ctfc_types
Definition ctfc.h:282
size_t ctfc_strlen
Definition ctfc.h:336
ctf_dtdef_t ** ctfc_types_list
Definition ctfc.h:319
unsigned char ctfc_flags
Definition ctfc.h:278
unsigned short ctfc_magic
Definition ctfc.h:276
hash_table< ctfc_dvd_hasher > * ctfc_vars
Definition ctfc.h:284
uint64_t ctfc_num_vlen_bytes
Definition ctfc.h:302
uint64_t ctfc_num_stypes
Definition ctfc.h:295
ctf_id_t ctfc_nextid
Definition ctfc.h:305
hash_table< ctfc_dvd_hasher > * ctfc_ignore_vars
Definition ctfc.h:286
uint64_t ctfc_num_types
Definition ctfc.h:294
uint64_t ctfc_vars_list_count
Definition ctfc.h:315
ctf_strtable_t ctfc_strtable
Definition ctfc.h:289
uint64_t ctfc_num_global_funcs
Definition ctfc.h:296
uint32_t ctfc_cuname_offset
Definition ctfc.h:279
size_t ctfc_aux_strlen
Definition ctfc.h:338
ctf_dvdef_t ** ctfc_vars_list
Definition ctfc.h:313
ctf_dvdef_t ** ctfc_gobjts_list
Definition ctfc.h:326
uint64_t ctfc_numbytes_asm
Definition ctfc.h:334
ctf_dtdef_t ** ctfc_gfuncs_list
Definition ctfc.h:323
ctf_strtable_t ctfc_aux_strtable
Definition ctfc.h:292
uint64_t ctfc_num_global_objts
Definition ctfc.h:297
unsigned char ctfc_version
Definition ctfc.h:277
HOST_WIDE_INT dmd_value
Definition ctfc.h:139
struct ctf_dmdef * dmd_next
Definition ctfc.h:140
uint32_t dmd_name_offset
Definition ctfc.h:137
const char * dmd_name
Definition ctfc.h:135
ctf_dtdef_ref dmd_type
Definition ctfc.h:136
uint64_t dmd_offset
Definition ctfc.h:138
BOOL_BITFIELD from_global_func
Definition ctfc.h:169
ctf_func_arg_t * dtu_argv
Definition ctfc.h:182
BOOL_BITFIELD dtd_enum_unsigned
Definition ctfc.h:171
ctf_sliceinfo_t dtu_slice
Definition ctfc.h:184
ctf_dtdef_ref ref_type
Definition ctfc.h:164
union ctf_dtdef::@13 dtd_u
ctf_itype_t dtd_data
Definition ctfc.h:165
ctf_dmdef_t * dtu_members
Definition ctfc.h:176
uint32_t linkage
Definition ctfc.h:166
ctf_arinfo_t dtu_arr
Definition ctfc.h:178
dw_die_ref dtd_key
Definition ctfc.h:161
ctf_id_t dtd_type
Definition ctfc.h:163
const char * dtd_name
Definition ctfc.h:162
ctf_encoding_t dtu_enc
Definition ctfc.h:180
unsigned int dvd_visibility
Definition ctfc.h:197
uint32_t dvd_name_offset
Definition ctfc.h:196
const char * dvd_name
Definition ctfc.h:195
ctf_dtdef_ref dvd_type
Definition ctfc.h:198
ctf_id_t dvd_id
Definition ctfc.h:199
dw_die_ref dvd_key
Definition ctfc.h:194
unsigned int cte_offset
Definition ctfc.h:80
unsigned int cte_bits
Definition ctfc.h:81
unsigned int cte_format
Definition ctfc.h:79
const char * farg_name
Definition ctfc.h:150
struct ctf_func_arg * farg_next
Definition ctfc.h:152
uint32_t farg_name_offset
Definition ctfc.h:151
ctf_dtdef_ref farg_type
Definition ctfc.h:149
ctf_dtdef_ref ctc_return
Definition ctfc.h:97
unsigned int ctc_flags
Definition ctfc.h:99
unsigned int ctc_argc
Definition ctfc.h:98
uint32_t ctti_lsizehi
Definition ctfc.h:120
uint32_t ctti_info
Definition ctfc.h:115
uint32_t _type
Definition ctfc.h:118
uint32_t ctti_lsizelo
Definition ctfc.h:121
uint32_t ctti_name
Definition ctfc.h:114
uint32_t _size
Definition ctfc.h:117
unsigned short cts_offset
Definition ctfc.h:105
unsigned short cts_bits
Definition ctfc.h:106
ctf_dtdef_ref cts_type
Definition ctfc.h:104
unsigned int ctsloc_line
Definition ctfc.h:210
unsigned int ctsloc_col
Definition ctfc.h:211
const char * ctsloc_file
Definition ctfc.h:209
struct ctf_string * cts_next
Definition ctfc.h:60
const char * cts_str
Definition ctfc.h:59
ctf_string_t * ctstab_head
Definition ctfc.h:67
int ctstab_num
Definition ctfc.h:69
size_t ctstab_len
Definition ctfc.h:70
ctf_string_t * ctstab_tail
Definition ctfc.h:68
const char * ctstab_estr
Definition ctfc.h:71
ctf_dtdef_ref compare_type
Definition ctfc.h:231
static bool equal(ctf_dtdef_ref, ctf_dtdef_ref)
Definition ctfc.h:244
static hashval_t hash(ctf_dtdef_ref)
Definition ctfc.h:238
ctf_dvdef_ref compare_type
Definition ctfc.h:251
static bool equal(ctf_dvdef_ref, ctf_dvdef_ref)
Definition ctfc.h:264
static hashval_t hash(ctf_dvdef_ref)
Definition ctfc.h:258
Definition dwarf2out.cc:3146
Definition hash-traits.h:321
#define BOOL_BITFIELD
Definition system.h:896
#define bool
Definition system.h:886