1*c42dbd0eSchristosThis is ctf-spec.info, produced by makeinfo version 6.8 from 2*c42dbd0eSchristosctf-spec.texi. 3*c42dbd0eSchristos 4*c42dbd0eSchristosCopyright (C) 2021-2022 Free Software Foundation, Inc. 5*c42dbd0eSchristos 6*c42dbd0eSchristos Permission is granted to copy, distribute and/or modify this document 7*c42dbd0eSchristosunder the terms of the GNU General Public License, Version 3 or any 8*c42dbd0eSchristoslater version published by the Free Software Foundation. A copy of the 9*c42dbd0eSchristoslicense is included in the section entitled "GNU General Public 10*c42dbd0eSchristosLicense". 11*c42dbd0eSchristos 12*c42dbd0eSchristosINFO-DIR-SECTION Software development 13*c42dbd0eSchristosSTART-INFO-DIR-ENTRY 14*c42dbd0eSchristos* CTF: (ctf-spec). The CTF file format. 15*c42dbd0eSchristosEND-INFO-DIR-ENTRY 16*c42dbd0eSchristos 17*c42dbd0eSchristos 18*c42dbd0eSchristosFile: ctf-spec.info, Node: Top, Next: Overview, Up: (dir) 19*c42dbd0eSchristos 20*c42dbd0eSchristosThe CTF file format 21*c42dbd0eSchristos******************* 22*c42dbd0eSchristos 23*c42dbd0eSchristosThis manual describes version 3 of the CTF file format, which is 24*c42dbd0eSchristosintended to model the C type system in a fashion that C programs can 25*c42dbd0eSchristosconsume at runtime. 26*c42dbd0eSchristos 27*c42dbd0eSchristos* Menu: 28*c42dbd0eSchristos 29*c42dbd0eSchristos* Overview:: 30*c42dbd0eSchristos* CTF archive:: 31*c42dbd0eSchristos* CTF dictionaries:: 32*c42dbd0eSchristos* Index:: 33*c42dbd0eSchristos 34*c42dbd0eSchristos 35*c42dbd0eSchristosFile: ctf-spec.info, Node: Overview, Next: CTF archive, Prev: Top, Up: Top 36*c42dbd0eSchristos 37*c42dbd0eSchristosOverview 38*c42dbd0eSchristos******** 39*c42dbd0eSchristos 40*c42dbd0eSchristosThe CTF file format compactly describes C types and the association 41*c42dbd0eSchristosbetween function and data symbols and types: if embedded in ELF objects, 42*c42dbd0eSchristosit can exploit the ELF string table to reduce duplication further. 43*c42dbd0eSchristosThere is no real concept of namespacing: only top-level types are 44*c42dbd0eSchristosdescribed, not types scoped to within single functions. 45*c42dbd0eSchristos 46*c42dbd0eSchristos CTF dictionaries can be "children" of other dictionaries, in a 47*c42dbd0eSchristosone-level hierarchy: child dictionaries can refer to types in the 48*c42dbd0eSchristosparent, but the opposite is not sensible (since if you refer to a child 49*c42dbd0eSchristostype in the parent, the actual type you cited would vary depending on 50*c42dbd0eSchristoswhat child was attached). This parent/child definition is recorded in 51*c42dbd0eSchristosthe child, but only as a recommendation: users of the API have to attach 52*c42dbd0eSchristosparents to children explicitly, and can choose to attach a child to any 53*c42dbd0eSchristosparent they like, or to none, though doing so might lead to unpleasant 54*c42dbd0eSchristosconsequences like dangling references to types. *Note Type indexes and 55*c42dbd0eSchristostype IDs::. Type lookups in child dicts that are not associated with a 56*c42dbd0eSchristosparent at all will fail with 'ECTF_NOPARENT' if a parent type was 57*c42dbd0eSchristosneeded. 58*c42dbd0eSchristos 59*c42dbd0eSchristos The associated API to generate, merge together, and query this file 60*c42dbd0eSchristosformat will be described in the accompanying 'libctf' manual once it is 61*c42dbd0eSchristoswritten. There is no API to modify dictionaries once they've been 62*c42dbd0eSchristoswritten out: CTF is a write-once file format. (However, it is always 63*c42dbd0eSchristospossible to dynamically create a new child dictionary on the fly and 64*c42dbd0eSchristosattach it to a pre-existing, read-only parent.) 65*c42dbd0eSchristos 66*c42dbd0eSchristos There are two major pieces to CTF: the "archive" and the 67*c42dbd0eSchristos"dictionary". Some relatives and ancestors of CTF call dictionaries 68*c42dbd0eSchristos"containers": the archive format is unique to this variant of CTF. (Much 69*c42dbd0eSchristosof the source code still uses the old term.) 70*c42dbd0eSchristos 71*c42dbd0eSchristos The archive file format is a very simple mmappable archive used to 72*c42dbd0eSchristosgroup multiple dictionaries together into groups: it is expected to 73*c42dbd0eSchristosslowly go away and be replaced by other mechanisms, but right now it is 74*c42dbd0eSchristosan important part of the file format, used to group dictionaries 75*c42dbd0eSchristoscontaining types with conflicting definitions in different TUs with the 76*c42dbd0eSchristosoverarching dictionary used to store all other types. (Even when 77*c42dbd0eSchristosarchives go away, the 'libctf' API used to access them will remain, and 78*c42dbd0eSchristosaccess the other mechanisms that replace it instead.) 79*c42dbd0eSchristos 80*c42dbd0eSchristos The CTF dictionary consists of a "preamble", which does not vary 81*c42dbd0eSchristosbetween versions of the CTF file format, and a "header" and some number 82*c42dbd0eSchristosof "sections", which can vary between versions. 83*c42dbd0eSchristos 84*c42dbd0eSchristos The rest of this specification describes the format of these 85*c42dbd0eSchristossections, first for the latest version of CTF, then for all earlier 86*c42dbd0eSchristosversions supported by 'libctf': the earlier versions are defined in 87*c42dbd0eSchristosterms of their differences from the next later one. We describe each 88*c42dbd0eSchristospart of the format first by reproducing the C structure which defines 89*c42dbd0eSchristosthat part, then describing it at greater length in terms of file 90*c42dbd0eSchristosoffsets. 91*c42dbd0eSchristos 92*c42dbd0eSchristos The description of the file format ends with a description of 93*c42dbd0eSchristosrelevant limits that apply to it. These limits can vary between file 94*c42dbd0eSchristosformat versions. 95*c42dbd0eSchristos 96*c42dbd0eSchristos This document is quite young, so for now the C code in 'ctf.h' should 97*c42dbd0eSchristosbe presumed correct when this document conflicts with it. 98*c42dbd0eSchristos 99*c42dbd0eSchristos 100*c42dbd0eSchristosFile: ctf-spec.info, Node: CTF archive, Next: CTF dictionaries, Prev: Overview, Up: Top 101*c42dbd0eSchristos 102*c42dbd0eSchristos1 CTF archives 103*c42dbd0eSchristos************** 104*c42dbd0eSchristos 105*c42dbd0eSchristosThe CTF archive format maps names to CTF dictionaries. The names may 106*c42dbd0eSchristoscontain any character other than \0, but for now archives containing 107*c42dbd0eSchristosslashes in the names may not extract correctly. It is possible to 108*c42dbd0eSchristosinsert multiple members with the same name, but these are quite hard to 109*c42dbd0eSchristosaccess reliably (you have to iterate through all the members rather than 110*c42dbd0eSchristosopening by name) so this is not recommended. 111*c42dbd0eSchristos 112*c42dbd0eSchristos CTF archives are not themselves compressed: the constituent 113*c42dbd0eSchristoscomponents, CTF dictionaries, can be compressed. (*Note CTF header::). 114*c42dbd0eSchristos 115*c42dbd0eSchristos CTF archives usually contain a collection of related dictionaries, 116*c42dbd0eSchristosone parent and many children of that parent. CTF archives can have a 117*c42dbd0eSchristosmember with a "default name", '.ctf' (which can be represented as 'NULL' 118*c42dbd0eSchristosin the API). If present, this member is usually the parent of all the 119*c42dbd0eSchristoschildren, but it is possible for CTF producers to emit parents with 120*c42dbd0eSchristosdifferent names if they wish (usually for backward- compatibility 121*c42dbd0eSchristospurposes). 122*c42dbd0eSchristos 123*c42dbd0eSchristos '.ctf' sections in ELF objects consist of a single CTF dictionary 124*c42dbd0eSchristosrather than an archive of dictionaries if and only if the section 125*c42dbd0eSchristoscontains no types with identical names but conflicting definitions: if 126*c42dbd0eSchristostwo conflicting definitions exist, the deduplicator will place the type 127*c42dbd0eSchristosmost commonly referred to by other types in the parent and will place 128*c42dbd0eSchristosthe other type in a child named after the translation unit it is found 129*c42dbd0eSchristosin, and will emit a CTF archive containing both dictionaries instead of 130*c42dbd0eSchristosa raw dictionary. All types that refer to such conflicting types are 131*c42dbd0eSchristosalso placed in the per-translation-unit child. 132*c42dbd0eSchristos 133*c42dbd0eSchristos The definition of an archive in 'ctf.h' is as follows: 134*c42dbd0eSchristos 135*c42dbd0eSchristosstruct ctf_archive 136*c42dbd0eSchristos{ 137*c42dbd0eSchristos uint64_t ctfa_magic; 138*c42dbd0eSchristos uint64_t ctfa_model; 139*c42dbd0eSchristos uint64_t ctfa_nfiles; 140*c42dbd0eSchristos uint64_t ctfa_names; 141*c42dbd0eSchristos uint64_t ctfa_ctfs; 142*c42dbd0eSchristos}; 143*c42dbd0eSchristos 144*c42dbd0eSchristostypedef struct ctf_archive_modent 145*c42dbd0eSchristos{ 146*c42dbd0eSchristos uint64_t name_offset; 147*c42dbd0eSchristos uint64_t ctf_offset; 148*c42dbd0eSchristos} ctf_archive_modent_t; 149*c42dbd0eSchristos 150*c42dbd0eSchristos (Note one irregularity here: the 'ctf_archive_t' is not a typedef to 151*c42dbd0eSchristos'struct ctf_archive', but a different typedef, private to 'libctf', so 152*c42dbd0eSchristosthat things that are not really archives can be made to appear as if 153*c42dbd0eSchristosthey were.) 154*c42dbd0eSchristos 155*c42dbd0eSchristos All the above items are always in little-endian byte order, 156*c42dbd0eSchristosregardless of the machine endianness. 157*c42dbd0eSchristos 158*c42dbd0eSchristos The archive header has the following fields: 159*c42dbd0eSchristos 160*c42dbd0eSchristosOffset Name Description 161*c42dbd0eSchristos------------------------------------------------------------------------------------------ 162*c42dbd0eSchristos0x00 'uint64_t ctfa_magic' The magic number for archives, 'CTFA_MAGIC': 163*c42dbd0eSchristos 0x8b47f2a4d7623eeb. 164*c42dbd0eSchristos 165*c42dbd0eSchristos0x08 'uint64_t ctfa_model' The data model for this archive: an arbitrary integer 166*c42dbd0eSchristos that serves no purpose but to be handed back by the 167*c42dbd0eSchristos libctf API. *Note Data models::. 168*c42dbd0eSchristos 169*c42dbd0eSchristos0x10 'uint64_t ctfa_nfiles' The number of CTF dictionaries in this archive. 170*c42dbd0eSchristos 171*c42dbd0eSchristos0x18 'uint64_t ctfa_names' Offset of the name table, in bytes from the start of 172*c42dbd0eSchristos the archive. The name table is an array of 'struct 173*c42dbd0eSchristos ctf_archive_modent_t[ctfa_nfiles]'. 174*c42dbd0eSchristos 175*c42dbd0eSchristos0x20 'uint64_t ctfa_ctfs' Offset of the CTF table. Each element starts with a 176*c42dbd0eSchristos 'uint64_t' size, followed by a CTF dictionary. 177*c42dbd0eSchristos 178*c42dbd0eSchristos 179*c42dbd0eSchristos The array pointed to by 'ctfa_names' is an array of entries of 180*c42dbd0eSchristos'ctf_archive_modent': 181*c42dbd0eSchristos 182*c42dbd0eSchristosOffset Name Description 183*c42dbd0eSchristos--------------------------------------------------------------------------------- 184*c42dbd0eSchristos0x00 'uint64_t name_offset' Offset of this name, in bytes from the start 185*c42dbd0eSchristos of the archive. 186*c42dbd0eSchristos 187*c42dbd0eSchristos0x08 'uint64_t ctf_offset' Offset of this CTF dictionary, in bytes from 188*c42dbd0eSchristos the start of the archive. 189*c42dbd0eSchristos 190*c42dbd0eSchristos 191*c42dbd0eSchristos The 'ctfa_names' array is sorted into ASCIIbetical order by name 192*c42dbd0eSchristos(i.e. by the result of dereferencing the 'name_offset'). 193*c42dbd0eSchristos 194*c42dbd0eSchristos The archive file also contains a name table and a table of CTF 195*c42dbd0eSchristosdictionaries: these are pointed to by the structures above. The name 196*c42dbd0eSchristostable is a simple strtab which is not required to be sorted; the 197*c42dbd0eSchristosdictionary array is described above in the entry for 'ctfa_ctfs'. 198*c42dbd0eSchristos 199*c42dbd0eSchristos The relative order of these various parts is not defined, except that 200*c42dbd0eSchristosthe header naturally always comes first. 201*c42dbd0eSchristos 202*c42dbd0eSchristos 203*c42dbd0eSchristosFile: ctf-spec.info, Node: CTF dictionaries, Next: Index, Prev: CTF archive, Up: Top 204*c42dbd0eSchristos 205*c42dbd0eSchristos2 CTF dictionaries 206*c42dbd0eSchristos****************** 207*c42dbd0eSchristos 208*c42dbd0eSchristosCTF dictionaries consist of a header, starting with a premable, and a 209*c42dbd0eSchristosnumber of sections. 210*c42dbd0eSchristos 211*c42dbd0eSchristos* Menu: 212*c42dbd0eSchristos 213*c42dbd0eSchristos* CTF Preamble:: 214*c42dbd0eSchristos* CTF header:: 215*c42dbd0eSchristos* The type section:: 216*c42dbd0eSchristos* The symtypetab sections:: 217*c42dbd0eSchristos* The variable section:: 218*c42dbd0eSchristos* The label section:: 219*c42dbd0eSchristos* The string section:: 220*c42dbd0eSchristos* Data models:: 221*c42dbd0eSchristos* Limits of CTF:: 222*c42dbd0eSchristos 223*c42dbd0eSchristos 224*c42dbd0eSchristosFile: ctf-spec.info, Node: CTF Preamble, Next: CTF header, Up: CTF dictionaries 225*c42dbd0eSchristos 226*c42dbd0eSchristos2.1 CTF Preamble 227*c42dbd0eSchristos================ 228*c42dbd0eSchristos 229*c42dbd0eSchristosThe preamble is the only part of the CTF dictionary whose format cannot 230*c42dbd0eSchristosvary between versions. It is never compressed. It is correspondingly 231*c42dbd0eSchristossimple: 232*c42dbd0eSchristos 233*c42dbd0eSchristostypedef struct ctf_preamble 234*c42dbd0eSchristos{ 235*c42dbd0eSchristos unsigned short ctp_magic; 236*c42dbd0eSchristos unsigned char ctp_version; 237*c42dbd0eSchristos unsigned char ctp_flags; 238*c42dbd0eSchristos} ctf_preamble_t; 239*c42dbd0eSchristos 240*c42dbd0eSchristos '#define's are provided under the names 'cth_magic', 'cth_version' 241*c42dbd0eSchristosand 'cth_flags' to make the fields of the 'ctf_preamble_t' appear to be 242*c42dbd0eSchristospart of the 'ctf_header_t', so consuming programs rarely need to 243*c42dbd0eSchristosconsider the existence of the preamble as a separate structure. 244*c42dbd0eSchristos 245*c42dbd0eSchristosOffset Name Description 246*c42dbd0eSchristos------------------------------------------------------------------------------- 247*c42dbd0eSchristos0x00 'unsigned short ctp_magic' The magic number for CTF 248*c42dbd0eSchristos dictionaries, 'CTF_MAGIC': 0xdff2. 249*c42dbd0eSchristos 250*c42dbd0eSchristos0x02 'unsigned char ctp_version' The version number of this CTF 251*c42dbd0eSchristos dictionary. 252*c42dbd0eSchristos 253*c42dbd0eSchristos0x03 'ctp_flags' Flags for this CTF file. 254*c42dbd0eSchristos *Note CTF file-wide flags::. 255*c42dbd0eSchristos 256*c42dbd0eSchristos Every element of a dictionary must be naturally aligned unless 257*c42dbd0eSchristosotherwise specified. (This restriction will be lifted in later 258*c42dbd0eSchristosversions.) 259*c42dbd0eSchristos 260*c42dbd0eSchristos CTF dictionaries are stored in the native endianness of the system 261*c42dbd0eSchristosthat generates them: the consumer (e.g., 'libctf') can detect whether to 262*c42dbd0eSchristosendian-flip a CTF dictionary by inspecting the 'ctp_magic'. (If it 263*c42dbd0eSchristosappears as 0xf2df, endian-flipping is needed.) 264*c42dbd0eSchristos 265*c42dbd0eSchristos The version of the CTF dictionary can be determined by inspecting 266*c42dbd0eSchristos'ctp_version'. The following versions are currently valid, and 'libctf' 267*c42dbd0eSchristoscan read all of them: 268*c42dbd0eSchristos 269*c42dbd0eSchristosVersion Number Description 270*c42dbd0eSchristos------------------------------------------------------------------------------------------- 271*c42dbd0eSchristos'CTF_VERSION_1' 1 First version, rare. Very similar to Solaris CTF. 272*c42dbd0eSchristos 273*c42dbd0eSchristos'CTF_VERSION_1_UPGRADED_3' 2 First version, upgraded to v3 or higher and 274*c42dbd0eSchristos written out again. Name may change. Very rare. 275*c42dbd0eSchristos 276*c42dbd0eSchristos'CTF_VERSION_2' 3 Second version, with many range limits lifted. 277*c42dbd0eSchristos 278*c42dbd0eSchristos'CTF_VERSION_3' 4 Third and current version, documented here. 279*c42dbd0eSchristos 280*c42dbd0eSchristos This section documents 'CTF_VERSION_3'. 281*c42dbd0eSchristos 282*c42dbd0eSchristos* Menu: 283*c42dbd0eSchristos 284*c42dbd0eSchristos* CTF file-wide flags:: 285*c42dbd0eSchristos 286*c42dbd0eSchristos 287*c42dbd0eSchristosFile: ctf-spec.info, Node: CTF file-wide flags, Up: CTF Preamble 288*c42dbd0eSchristos 289*c42dbd0eSchristos2.1.1 CTF file-wide flags 290*c42dbd0eSchristos------------------------- 291*c42dbd0eSchristos 292*c42dbd0eSchristosThe preamble contains bitflags in its 'ctp_flags' field that describe 293*c42dbd0eSchristosvarious file-wide properties. Some of the flags are valid only for 294*c42dbd0eSchristosparticular file-format versions, which means the flags can be used to 295*c42dbd0eSchristosfix file-format bugs. Consumers that see unknown flags should 296*c42dbd0eSchristosaccordingly assume that the dictionary is not comprehensible, and refuse 297*c42dbd0eSchristosto open them. 298*c42dbd0eSchristos 299*c42dbd0eSchristos The following flags are currently defined. Many are bug workarounds, 300*c42dbd0eSchristosvalid only in CTFv3, and will not be valid in any future versions: the 301*c42dbd0eSchristossame values may be reused for other flags in v4+. 302*c42dbd0eSchristos 303*c42dbd0eSchristosFlag Versions Value Meaning 304*c42dbd0eSchristos--------------------------------------------------------------------------------------- 305*c42dbd0eSchristos'CTF_F_COMPRESS' All 0x1 Compressed with zlib 306*c42dbd0eSchristos'CTF_F_NEWFUNCINFO' 3 only 0x2 "New-format" func info section. 307*c42dbd0eSchristos'CTF_F_IDXSORTED' 3+ 0x4 The index section is in sorted order 308*c42dbd0eSchristos'CTF_F_DYNSTR' 3 only 0x8 The external strtab is in '.dynstr' and the 309*c42dbd0eSchristos symtab used is '.dynsym'. 310*c42dbd0eSchristos *Note The string section:: 311*c42dbd0eSchristos 312*c42dbd0eSchristos 'CTF_F_NEWFUNCINFO' and 'CTF_F_IDXSORTED' relate to the function info 313*c42dbd0eSchristosand data object sections. *Note The symtypetab sections::. 314*c42dbd0eSchristos 315*c42dbd0eSchristos Further flags (and further compression methods) wil be added in 316*c42dbd0eSchristosfuture. 317*c42dbd0eSchristos 318*c42dbd0eSchristos 319*c42dbd0eSchristosFile: ctf-spec.info, Node: CTF header, Next: The type section, Prev: CTF Preamble, Up: CTF dictionaries 320*c42dbd0eSchristos 321*c42dbd0eSchristos2.2 CTF header 322*c42dbd0eSchristos============== 323*c42dbd0eSchristos 324*c42dbd0eSchristosThe CTF header is the first part of a CTF dictionary, including the 325*c42dbd0eSchristospreamble. All parts of it other than the preamble (*note CTF 326*c42dbd0eSchristosPreamble::) can vary between CTF file versions and are never compressed. 327*c42dbd0eSchristosIt contains things that apply to the dictionary as a whole, and a table 328*c42dbd0eSchristosof the sections into which the rest of the dictionary is divided. The 329*c42dbd0eSchristossections tile the file: each section runs from the offset given until 330*c42dbd0eSchristosthe start of the next section. Only the last section cannot follow this 331*c42dbd0eSchristosrule, so the header has a length for it instead. 332*c42dbd0eSchristos 333*c42dbd0eSchristos All section offsets, here and in the rest of the CTF file, are 334*c42dbd0eSchristosrelative to the _end_ of the header. (This is annoyingly different to 335*c42dbd0eSchristoshow offsets in CTF archives are handled.) 336*c42dbd0eSchristos 337*c42dbd0eSchristos This is the first structure to include offsets into the string table, 338*c42dbd0eSchristoswhich are not straight references because CTF dictionaries can include 339*c42dbd0eSchristosreferences into the ELF string table to save space, as well as into the 340*c42dbd0eSchristosstring table internal to the CTF dictionary. *Note The string section:: 341*c42dbd0eSchristosfor more on these. Offset 0 is always the null string. 342*c42dbd0eSchristos 343*c42dbd0eSchristostypedef struct ctf_header 344*c42dbd0eSchristos{ 345*c42dbd0eSchristos ctf_preamble_t cth_preamble; 346*c42dbd0eSchristos uint32_t cth_parlabel; 347*c42dbd0eSchristos uint32_t cth_parname; 348*c42dbd0eSchristos uint32_t cth_cuname; 349*c42dbd0eSchristos uint32_t cth_lbloff; 350*c42dbd0eSchristos uint32_t cth_objtoff; 351*c42dbd0eSchristos uint32_t cth_funcoff; 352*c42dbd0eSchristos uint32_t cth_objtidxoff; 353*c42dbd0eSchristos uint32_t cth_funcidxoff; 354*c42dbd0eSchristos uint32_t cth_varoff; 355*c42dbd0eSchristos uint32_t cth_typeoff; 356*c42dbd0eSchristos uint32_t cth_stroff; 357*c42dbd0eSchristos uint32_t cth_strlen; 358*c42dbd0eSchristos} ctf_header_t; 359*c42dbd0eSchristos 360*c42dbd0eSchristos In detail: 361*c42dbd0eSchristos 362*c42dbd0eSchristosOffset Name Description 363*c42dbd0eSchristos----------------------------------------------------------------------------------------------- 364*c42dbd0eSchristos0x00 'ctf_preamble_t cth_preamble' The preamble (conceptually embedded in the header). 365*c42dbd0eSchristos *Note CTF Preamble:: 366*c42dbd0eSchristos 367*c42dbd0eSchristos0x04 'uint32_t cth_parlabel' The parent label, if deduplication happened against 368*c42dbd0eSchristos a specific label: a strtab offset. 369*c42dbd0eSchristos *Note The label section::. Currently unused and 370*c42dbd0eSchristos always 0, but may be used in future when semantics 371*c42dbd0eSchristos are attached to the label section. 372*c42dbd0eSchristos 373*c42dbd0eSchristos0x08 'uint32_t cth_parname' The name of the parent dictionary deduplicated 374*c42dbd0eSchristos against: a strtab offset. Interpretation is up to 375*c42dbd0eSchristos the consumer (usually a CTF archive member name). 376*c42dbd0eSchristos 0 (the null string) if this is not a child 377*c42dbd0eSchristos dictionary. 378*c42dbd0eSchristos 379*c42dbd0eSchristos0x1c 'uint32_t cth_cuname' The name of the compilation unit, for consumers 380*c42dbd0eSchristos like GDB that want to know the name of CUs 381*c42dbd0eSchristos associated with single CUs: a strtab offset. 0 if 382*c42dbd0eSchristos this dictionary describes types from many CUs. 383*c42dbd0eSchristos 384*c42dbd0eSchristos0x10 'uint32_t cth_lbloff' The offset of the label section, which tiles the 385*c42dbd0eSchristos type space into named regions. 386*c42dbd0eSchristos *Note The label section::. 387*c42dbd0eSchristos 388*c42dbd0eSchristos0x14 'uint32_t cth_objtoff' The offset of the data object symtypetab section, 389*c42dbd0eSchristos which maps ELF data symbols to types. 390*c42dbd0eSchristos *Note The symtypetab sections::. 391*c42dbd0eSchristos 392*c42dbd0eSchristos0x18 'uint32_t cth_funcoff' The offset of the function info symtypetab section, 393*c42dbd0eSchristos which maps ELF function symbols to a return type 394*c42dbd0eSchristos and arg types. *Note The symtypetab sections::. 395*c42dbd0eSchristos 396*c42dbd0eSchristos0x1c 'uint32_t cth_objtidxoff' The offset of the object index section, which maps 397*c42dbd0eSchristos ELF object symbols to entries in the data object 398*c42dbd0eSchristos section. *Note The symtypetab sections::. 399*c42dbd0eSchristos 400*c42dbd0eSchristos0x20 'uint32_t cth_funcidxoff' The offset of the function info index section, 401*c42dbd0eSchristos which maps ELF function symbols to entries in the 402*c42dbd0eSchristos function info section. 403*c42dbd0eSchristos *Note The symtypetab sections::. 404*c42dbd0eSchristos 405*c42dbd0eSchristos0x24 'uint32_t cth_varoff' The offset of the variable section, which maps 406*c42dbd0eSchristos string names to types. 407*c42dbd0eSchristos *Note The variable section::. 408*c42dbd0eSchristos 409*c42dbd0eSchristos0x28 'uint32_t cth_typeoff' The offset of the type section, the core of CTF, 410*c42dbd0eSchristos which describes types using variable-length array 411*c42dbd0eSchristos elements. *Note The type section::. 412*c42dbd0eSchristos 413*c42dbd0eSchristos0x2c 'uint32_t cth_stroff' The offset of the string section. 414*c42dbd0eSchristos *Note The string section::. 415*c42dbd0eSchristos 416*c42dbd0eSchristos0x30 'uint32_t cth_strlen' The length of the string section (not an offset!). 417*c42dbd0eSchristos The CTF file ends at this point. 418*c42dbd0eSchristos 419*c42dbd0eSchristos 420*c42dbd0eSchristos Everything from this point on (until the end of the file at 421*c42dbd0eSchristos'cth_stroff' + 'cth_strlen') is compressed with zlib if 'CTF_F_COMPRESS' 422*c42dbd0eSchristosis set in the preamble's 'ctp_flags'. 423*c42dbd0eSchristos 424*c42dbd0eSchristos 425*c42dbd0eSchristosFile: ctf-spec.info, Node: The type section, Next: The symtypetab sections, Prev: CTF header, Up: CTF dictionaries 426*c42dbd0eSchristos 427*c42dbd0eSchristos2.3 The type section 428*c42dbd0eSchristos==================== 429*c42dbd0eSchristos 430*c42dbd0eSchristosThis section is the most important section in CTF, describing all the 431*c42dbd0eSchristostop-level types in the program. It consists of an array of type 432*c42dbd0eSchristosstructures, each of which describes a type of some "kind": each kind of 433*c42dbd0eSchristostype has some amount of variable-length data associated with it (some 434*c42dbd0eSchristoskinds have none). The amount of variable-length data associated with a 435*c42dbd0eSchristosgiven type can be determined by inspecting the type, so the reading code 436*c42dbd0eSchristoscan walk through the types in sequence at opening time. 437*c42dbd0eSchristos 438*c42dbd0eSchristos Each type structure is one of a set of overlapping structures in a 439*c42dbd0eSchristosdiscriminated union of sorts: the variable-length data for each type 440*c42dbd0eSchristosimmediately follows the type's type structure. Here's the largest of 441*c42dbd0eSchristosthe overlapping structures, which is only needed for huge types and so 442*c42dbd0eSchristosis very rarely seen: 443*c42dbd0eSchristos 444*c42dbd0eSchristostypedef struct ctf_type 445*c42dbd0eSchristos{ 446*c42dbd0eSchristos uint32_t ctt_name; 447*c42dbd0eSchristos uint32_t ctt_info; 448*c42dbd0eSchristos __extension__ 449*c42dbd0eSchristos union 450*c42dbd0eSchristos { 451*c42dbd0eSchristos uint32_t ctt_size; 452*c42dbd0eSchristos uint32_t ctt_type; 453*c42dbd0eSchristos }; 454*c42dbd0eSchristos uint32_t ctt_lsizehi; 455*c42dbd0eSchristos uint32_t ctt_lsizelo; 456*c42dbd0eSchristos} ctf_type_t; 457*c42dbd0eSchristos 458*c42dbd0eSchristos Here's the much more common smaller form: 459*c42dbd0eSchristos 460*c42dbd0eSchristostypedef struct ctf_stype 461*c42dbd0eSchristos{ 462*c42dbd0eSchristos uint32_t ctt_name; 463*c42dbd0eSchristos uint32_t ctt_info; 464*c42dbd0eSchristos __extension__ 465*c42dbd0eSchristos union 466*c42dbd0eSchristos { 467*c42dbd0eSchristos uint32_t ctt_size; 468*c42dbd0eSchristos uint32_t ctt_type; 469*c42dbd0eSchristos }; 470*c42dbd0eSchristos} ctf_type_t; 471*c42dbd0eSchristos 472*c42dbd0eSchristos If 'ctt_size' is the #define 'CTF_LSIZE_SENT', 0xffffffff, this type 473*c42dbd0eSchristosis described by a 'ctf_type_t': otherwise, a 'ctf_stype_t'. 474*c42dbd0eSchristos 475*c42dbd0eSchristos Here's what the fields mean: 476*c42dbd0eSchristos 477*c42dbd0eSchristosOffset Name Description 478*c42dbd0eSchristos----------------------------------------------------------------------------------------------------- 479*c42dbd0eSchristos0x00 'uint32_t ctt_name' Strtab offset of the type name, if any (0 if none). 480*c42dbd0eSchristos 481*c42dbd0eSchristos0x04 'uint32_t ctt_info' The "info word", containing information on the kind 482*c42dbd0eSchristos of this type, its variable-length data and whether 483*c42dbd0eSchristos it is visible to name lookup. See 484*c42dbd0eSchristos *Note The info word::. 485*c42dbd0eSchristos 486*c42dbd0eSchristos0x08 'uint32_t ctt_size' The size of this type, if this type is of a kind for 487*c42dbd0eSchristos which a size needs to be recorded (constant-size 488*c42dbd0eSchristos types don't need one). If this is 'CTF_LSIZE_SENT', 489*c42dbd0eSchristos this type is a huge type described by 'ctf_type_t'. 490*c42dbd0eSchristos 491*c42dbd0eSchristos0x08 'uint32_t ctt_type' The type this type refers to, if this type is of a 492*c42dbd0eSchristos kind which refers to other types (like a pointer). 493*c42dbd0eSchristos All such types are fixed-size, and no types that are 494*c42dbd0eSchristos variable-size refer to other types, so 'ctt_size' 495*c42dbd0eSchristos and 'ctt_type' overlap. All type kinds that use 496*c42dbd0eSchristos 'ctt_type' are described by 'ctf_stype_t', not 497*c42dbd0eSchristos 'ctf_type_t'. *Note Type indexes and type IDs::. 498*c42dbd0eSchristos 499*c42dbd0eSchristos0x0c ('ctf_type_t' 'uint32_t ctt_lsizehi' The high 32 bits of the size of a very large type. 500*c42dbd0eSchristosonly) The 'CTF_TYPE_LSIZE' macro can be used to get a 501*c42dbd0eSchristos 64-bit size out of this field and the next one. 502*c42dbd0eSchristos 'CTF_SIZE_TO_LSIZE_HI' splits the 'ctt_lsizehi' out 503*c42dbd0eSchristos of it again. 504*c42dbd0eSchristos 505*c42dbd0eSchristos0x10 ('ctf_type_t' 'uint32_t ctt_lsizelo' The low 32 bits of the size of a very large type. 506*c42dbd0eSchristosonly) 'CTF_SIZE_TO_LSIZE_LO' splits the 'ctt_lsizelo' out 507*c42dbd0eSchristos of a 64-bit size. 508*c42dbd0eSchristos 509*c42dbd0eSchristos Two aspects of this need further explanation: the info word, and what 510*c42dbd0eSchristosexactly a type ID is and how you determine it. (Information on the 511*c42dbd0eSchristosvarious type-kind- dependent things, like whether 'ctt_size' or 512*c42dbd0eSchristos'ctt_type' is used, is described in the section devoted to each kind.) 513*c42dbd0eSchristos 514*c42dbd0eSchristos* Menu: 515*c42dbd0eSchristos 516*c42dbd0eSchristos* The info word:: 517*c42dbd0eSchristos* Type indexes and type IDs:: 518*c42dbd0eSchristos* Type kinds:: 519*c42dbd0eSchristos* Integer types:: 520*c42dbd0eSchristos* Floating-point types:: 521*c42dbd0eSchristos* Slices:: 522*c42dbd0eSchristos* Pointers typedefs and cvr-quals:: 523*c42dbd0eSchristos* Arrays:: 524*c42dbd0eSchristos* Function pointers:: 525*c42dbd0eSchristos* Enums:: 526*c42dbd0eSchristos* Structs and unions:: 527*c42dbd0eSchristos* Forward declarations:: 528*c42dbd0eSchristos 529*c42dbd0eSchristos 530*c42dbd0eSchristosFile: ctf-spec.info, Node: The info word, Next: Type indexes and type IDs, Up: The type section 531*c42dbd0eSchristos 532*c42dbd0eSchristos2.3.1 The info word, ctt_info 533*c42dbd0eSchristos----------------------------- 534*c42dbd0eSchristos 535*c42dbd0eSchristosThe info word is a bitfield split into three parts. From MSB to LSB: 536*c42dbd0eSchristos 537*c42dbd0eSchristosBit offset Name Description 538*c42dbd0eSchristos------------------------------------------------------------------------------------------ 539*c42dbd0eSchristos26-31 'kind' Type kind: *note Type kinds::. 540*c42dbd0eSchristos 541*c42dbd0eSchristos25 'isroot' 1 if this type is visible to name lookup 542*c42dbd0eSchristos 543*c42dbd0eSchristos0-24 'vlen' Length of variable-length data for this type (some kinds only). 544*c42dbd0eSchristos The variable-length data directly follows the 'ctf_type_t' or 545*c42dbd0eSchristos 'ctf_stype_t'. This is a kind-dependent array length value, 546*c42dbd0eSchristos not a length in bytes. Some kinds have no variable-length 547*c42dbd0eSchristos data, or fixed-size variable-length data, and do not use this 548*c42dbd0eSchristos value. 549*c42dbd0eSchristos 550*c42dbd0eSchristos The most mysterious of these is undoubtedly 'isroot'. This indicates 551*c42dbd0eSchristoswhether types with names (nonzero 'ctt_name') are visible to name 552*c42dbd0eSchristoslookup: if zero, this type is considered a "non-root type" and you can't 553*c42dbd0eSchristoslook it up by name at all. Multiple types with the same name in the 554*c42dbd0eSchristossame C namespace (struct, union, enum, other) can exist in a single 555*c42dbd0eSchristosdictionary, but only one of them may have a nonzero value for 'isroot'. 556*c42dbd0eSchristos'libctf' validates this at open time and refuses to open dictionaries 557*c42dbd0eSchristosthat violate this constraint. 558*c42dbd0eSchristos 559*c42dbd0eSchristos Historically, this feature was introduced for the encoding of 560*c42dbd0eSchristosbitfields (*note Integer types::): for instance, int bitfields will all 561*c42dbd0eSchristosbe named 'int' with different widths or offsets, but only the full-width 562*c42dbd0eSchristosone at offset zero is wanted when you look up the type named 'int'. 563*c42dbd0eSchristosWith the introduction of slices (*note Slices::) as a more general 564*c42dbd0eSchristosbitfield encoding mechanism, this is less important, but we still use 565*c42dbd0eSchristosnon-root types to handle conflicts if the linker API is used to fuse 566*c42dbd0eSchristosmultiple translation units into one dictionary and those translation 567*c42dbd0eSchristosunits contain types with the same name and conflicting definitions. (We 568*c42dbd0eSchristosdo not discuss this further here, because the linker never does this: 569*c42dbd0eSchristosonly specialized type mergers do, like that used for the Linux kernel. 570*c42dbd0eSchristosThe libctf documentation will describe this in more detail.) 571*c42dbd0eSchristos 572*c42dbd0eSchristos The 'CTF_TYPE_INFO' macro can be used to compose an info word from a 573*c42dbd0eSchristos'kind', 'isroot', and 'vlen'; 'CTF_V2_INFO_KIND', 'CTF_V2_INFO_ISROOT' 574*c42dbd0eSchristosand 'CTF_V2_INFO_VLEN' pick it apart again. 575*c42dbd0eSchristos 576*c42dbd0eSchristos 577*c42dbd0eSchristosFile: ctf-spec.info, Node: Type indexes and type IDs, Next: Type kinds, Prev: The info word, Up: The type section 578*c42dbd0eSchristos 579*c42dbd0eSchristos2.3.2 Type indexes and type IDs 580*c42dbd0eSchristos------------------------------- 581*c42dbd0eSchristos 582*c42dbd0eSchristosTypes are referred to within the CTF file via "type IDs". A type ID is 583*c42dbd0eSchristosa number from 0 to 2^32, from a space divided in half. Types 2^31-1 and 584*c42dbd0eSchristosbelow are in the "parent range": these IDs are used for dictionaries 585*c42dbd0eSchristosthat have not had any other dictionary 'ctf_import'ed into it as a 586*c42dbd0eSchristosparent. Both completely standalone dictionaries and parent dictionaries 587*c42dbd0eSchristoswith children hanging off them have types in this range. Types 2^31 and 588*c42dbd0eSchristosabove are in the "child range": only types in child dictionaries are in 589*c42dbd0eSchristosthis range. 590*c42dbd0eSchristos 591*c42dbd0eSchristos These IDs appear in 'ctf_type_t.ctt_type' (*note The type section::), 592*c42dbd0eSchristosbut the types themselves have no visible ID: quite intentionally, 593*c42dbd0eSchristosbecause adding an ID uses space, and every ID is different so they don't 594*c42dbd0eSchristoscompress well. The IDs are implicit: at open time, the consumer walks 595*c42dbd0eSchristosthrough the entire type section and counts the types in the type 596*c42dbd0eSchristossection. The type section is an array of variable-length elements, so 597*c42dbd0eSchristoseach entry could be considered as having an index, starting from 1. We 598*c42dbd0eSchristoscount these indexes and associate each with its corresponding 599*c42dbd0eSchristos'ctf_type_t' or 'ctf_stype_t'. 600*c42dbd0eSchristos 601*c42dbd0eSchristos Lookups of types with IDs in the parent space look in the parent 602*c42dbd0eSchristosdictionary if this dictionary has one associated with it; lookups of 603*c42dbd0eSchristostypes with IDs in the child space error out if the dictionary does not 604*c42dbd0eSchristoshave a parent, and otherwise convert the ID into an index by shaving off 605*c42dbd0eSchristosthe top bit and look up the index in the child. 606*c42dbd0eSchristos 607*c42dbd0eSchristos These properties mean that the same dictionary can be used as a 608*c42dbd0eSchristosparent of child dictionaries and can also be used directly with no 609*c42dbd0eSchristoschildren at all, but a dictionary created as a child dictionary must 610*c42dbd0eSchristosalways be associated with a parent -- usually, the same parent -- 611*c42dbd0eSchristosbecause its references to its own types have the high bit turned on and 612*c42dbd0eSchristosthis is only flipped off again if this is a child dictionary. (This is 613*c42dbd0eSchristosnot a problem, because if you _don't_ associate the child with a parent, 614*c42dbd0eSchristosany references within it to its parent types will fail, and there are 615*c42dbd0eSchristosalmost certain to be many such references, or why is it a child at all?) 616*c42dbd0eSchristos 617*c42dbd0eSchristos This does mean that consumers should keep a close eye on the 618*c42dbd0eSchristosdistinction between type IDs and type indexes: if you mix them up, 619*c42dbd0eSchristoseverything will appear to work as long as you're only using parent 620*c42dbd0eSchristosdictionaries or standalone dictionaries, but as soon as you start using 621*c42dbd0eSchristoschildren, everything will fail horribly. 622*c42dbd0eSchristos 623*c42dbd0eSchristos Type index zero, and type ID zero, are used to indicate that this 624*c42dbd0eSchristostype cannot be represented in CTF as currently constituted: they are 625*c42dbd0eSchristosemitted by the compiler, but all type chains that terminate in the 626*c42dbd0eSchristosunknown type are erased at link time (structure fields that use them 627*c42dbd0eSchristosjust vanish, etc). So you will probably never see a use of type zero 628*c42dbd0eSchristosoutside the symtypetab sections, where they serve as sentinels of sorts, 629*c42dbd0eSchristosto indicate symbols with no associated type. 630*c42dbd0eSchristos 631*c42dbd0eSchristos The macros 'CTF_V2_TYPE_TO_INDEX' and 'CTF_V2_INDEX_TO_TYPE' may help 632*c42dbd0eSchristosin translation between types and indexes: 'CTF_V2_TYPE_ISPARENT' and 633*c42dbd0eSchristos'CTF_V2_TYPE_ISCHILD' can be used to tell whether a given ID is in the 634*c42dbd0eSchristosparent or child range. 635*c42dbd0eSchristos 636*c42dbd0eSchristos It is quite possible and indeed common for type IDs to point forward 637*c42dbd0eSchristosin the dictionary, as well as backward. 638*c42dbd0eSchristos 639*c42dbd0eSchristos 640*c42dbd0eSchristosFile: ctf-spec.info, Node: Type kinds, Next: Integer types, Prev: Type indexes and type IDs, Up: The type section 641*c42dbd0eSchristos 642*c42dbd0eSchristos2.3.3 Type kinds 643*c42dbd0eSchristos---------------- 644*c42dbd0eSchristos 645*c42dbd0eSchristosEvery type in CTF is of some "kind". Each kind is some variety of C 646*c42dbd0eSchristostype: all structures are a single kind, as are all unions, all pointers, 647*c42dbd0eSchristosall arrays, all integers regardless of their bitfield width, etc. The 648*c42dbd0eSchristoskind of a type is given in the 'kind' field of the 'ctt_info' word 649*c42dbd0eSchristos(*note The info word::). 650*c42dbd0eSchristos 651*c42dbd0eSchristos The space of type kinds is only a quarter full so far, so there is 652*c42dbd0eSchristosplenty of room for expansion. It is likely that in future versions of 653*c42dbd0eSchristosthe file format, types with smaller kinds will be more efficiently 654*c42dbd0eSchristosencoded than types with larger kinds, so their numerical value will 655*c42dbd0eSchristosactually start to matter in future. (So these IDs will probably change 656*c42dbd0eSchristostheir numerical values in a later release of this format, to move more 657*c42dbd0eSchristosfrequently-used kinds like structures and cv-quals towards the top of 658*c42dbd0eSchristosthe space, and move rarely-used kinds like integers downwards. Yes, 659*c42dbd0eSchristosintegers are rare: how many kinds of 'int' are there in a program? 660*c42dbd0eSchristosThey're just very frequently _referenced_.) 661*c42dbd0eSchristos 662*c42dbd0eSchristos Here's the set of kinds so far. Each kind has a '#define' associated 663*c42dbd0eSchristoswith it, also given here. 664*c42dbd0eSchristos 665*c42dbd0eSchristosKind Macro Purpose 666*c42dbd0eSchristos---------------------------------------------------------------------------------------- 667*c42dbd0eSchristos0 'CTF_K_UNKNOWN' Indicates a type that cannot be represented in CTF, or that 668*c42dbd0eSchristos is being skipped. It is very similar to type ID 0, except 669*c42dbd0eSchristos that you can have _multiple_, distinct types of kind 670*c42dbd0eSchristos 'CTF_K_UNKNOWN'. 671*c42dbd0eSchristos 672*c42dbd0eSchristos1 'CTF_K_INTEGER' An integer type. *Note Integer types::. 673*c42dbd0eSchristos 674*c42dbd0eSchristos2 'CTF_K_FLOAT' A floating-point type. *Note Floating-point types::. 675*c42dbd0eSchristos 676*c42dbd0eSchristos3 'CTF_K_POINTER' A pointer. *Note Pointers typedefs and cvr-quals::. 677*c42dbd0eSchristos 678*c42dbd0eSchristos4 'CTF_K_ARRAY' An array. *Note Arrays::. 679*c42dbd0eSchristos 680*c42dbd0eSchristos5 'CTF_K_FUNCTION' A function pointer. *Note Function pointers::. 681*c42dbd0eSchristos 682*c42dbd0eSchristos6 'CTF_K_STRUCT' A structure. *Note Structs and unions::. 683*c42dbd0eSchristos 684*c42dbd0eSchristos7 'CTF_K_UNION' A union. *Note Structs and unions::. 685*c42dbd0eSchristos 686*c42dbd0eSchristos8 'CTF_K_ENUM' An enumerated type. *Note Enums::. 687*c42dbd0eSchristos 688*c42dbd0eSchristos9 'CTF_K_FORWARD' A forward. *Note Forward declarations::. 689*c42dbd0eSchristos 690*c42dbd0eSchristos10 'CTF_K_TYPEDEF' A typedef. *Note Pointers typedefs and cvr-quals::. 691*c42dbd0eSchristos 692*c42dbd0eSchristos11 'CTF_K_VOLATILE' A volatile-qualified type. 693*c42dbd0eSchristos *Note Pointers typedefs and cvr-quals::. 694*c42dbd0eSchristos 695*c42dbd0eSchristos12 'CTF_K_CONST' A const-qualified type. 696*c42dbd0eSchristos *Note Pointers typedefs and cvr-quals::. 697*c42dbd0eSchristos 698*c42dbd0eSchristos13 'CTF_K_RESTRICT' A restrict-qualified type. 699*c42dbd0eSchristos *Note Pointers typedefs and cvr-quals::. 700*c42dbd0eSchristos 701*c42dbd0eSchristos14 'CTF_K_SLICE' A slice, a change of the bit-width or offset of some other 702*c42dbd0eSchristos type. *Note Slices::. 703*c42dbd0eSchristos 704*c42dbd0eSchristos Now we cover all type kinds in turn. Some are more complicated than 705*c42dbd0eSchristosothers. 706*c42dbd0eSchristos 707*c42dbd0eSchristos 708*c42dbd0eSchristosFile: ctf-spec.info, Node: Integer types, Next: Floating-point types, Prev: Type kinds, Up: The type section 709*c42dbd0eSchristos 710*c42dbd0eSchristos2.3.4 Integer types 711*c42dbd0eSchristos------------------- 712*c42dbd0eSchristos 713*c42dbd0eSchristosIntegral types are all represented as types of kind 'CTF_K_INTEGER'. 714*c42dbd0eSchristosThese types fill out 'ctt_size' in the 'ctf_stype_t' with the size in 715*c42dbd0eSchristosbytes of the integral type in question. They are always represented by 716*c42dbd0eSchristos'ctf_stype_t', never 'ctf_type_t'. Their variable-length data is one 717*c42dbd0eSchristos'uint32_t' in length: 'vlen' in the info word should be disregarded and 718*c42dbd0eSchristosis always zero. 719*c42dbd0eSchristos 720*c42dbd0eSchristos The variable-length data for integers has multiple items packed into 721*c42dbd0eSchristosit much like the info word does. 722*c42dbd0eSchristos 723*c42dbd0eSchristosBit offset Name Description 724*c42dbd0eSchristos----------------------------------------------------------------------------------- 725*c42dbd0eSchristos24-31 Encoding The desired display representation of this integer. You 726*c42dbd0eSchristos can extract this field with the 'CTF_INT_ENCODING' 727*c42dbd0eSchristos macro. See below. 728*c42dbd0eSchristos 729*c42dbd0eSchristos16-23 Offset The offset of this integral type in bits from the start 730*c42dbd0eSchristos of its enclosing structure field, adjusted for 731*c42dbd0eSchristos endianness: *note Structs and unions::. You can extract 732*c42dbd0eSchristos this field with the 'CTF_INT_OFFSET' macro. 733*c42dbd0eSchristos 734*c42dbd0eSchristos0-15 Bit-width The width of this integral type in bits. You can 735*c42dbd0eSchristos extract this field with the 'CTF_INT_BITS' macro. 736*c42dbd0eSchristos 737*c42dbd0eSchristos If you choose, bitfields can be represented using the things above as 738*c42dbd0eSchristosa sort of integral type with the 'isroot' bit flipped off and the offset 739*c42dbd0eSchristosand bits values set in the vlen word: you can populate it with the 740*c42dbd0eSchristos'CTF_INT_DATA' macro. (But it may be more convenient to represent them 741*c42dbd0eSchristosusing slices of a full-width integer: *note Slices::.) 742*c42dbd0eSchristos 743*c42dbd0eSchristos Integers that are bitfields usually have a 'ctt_size' rounded up to 744*c42dbd0eSchristosthe nearest power of two in bytes, for natural alignment (e.g. a 17-bit 745*c42dbd0eSchristosinteger would have a 'ctt_size' of 4). However, not all types are 746*c42dbd0eSchristosnaturally aligned on all architectures: packed structures may in theory 747*c42dbd0eSchristosuse integral bitfields with different 'ctt_size', though this is rarely 748*c42dbd0eSchristosobserved. 749*c42dbd0eSchristos 750*c42dbd0eSchristos The "encoding" for integers is a bit-field comprised of the values 751*c42dbd0eSchristosbelow, which consumers can use to decide how to display values of this 752*c42dbd0eSchristostype: 753*c42dbd0eSchristos 754*c42dbd0eSchristosOffset Name Description 755*c42dbd0eSchristos-------------------------------------------------------------------------------------------------------- 756*c42dbd0eSchristos0x01 'CTF_INT_SIGNED' If set, this is a signed int: if false, unsigned. 757*c42dbd0eSchristos 758*c42dbd0eSchristos0x02 'CTF_INT_CHAR' If set, this is a char type. It is platform-dependent whether unadorned 759*c42dbd0eSchristos 'char' is signed or not: the 'CTF_CHAR' macro produces an integral type 760*c42dbd0eSchristos suitable for the definition of 'char' on this platform. 761*c42dbd0eSchristos 762*c42dbd0eSchristos0x04 'CTF_INT_BOOL' If set, this is a boolean type. (It is theoretically possible to turn 763*c42dbd0eSchristos this and 'CTF_INT_CHAR' on at the same time, but it is not clear what 764*c42dbd0eSchristos this would mean.) 765*c42dbd0eSchristos 766*c42dbd0eSchristos0x08 'CTF_INT_VARARGS' If set, this is a varargs-promoted value in a K&R function definition. 767*c42dbd0eSchristos This is not currently produced or consumed by anything that we know of: 768*c42dbd0eSchristos it is set aside for future use. 769*c42dbd0eSchristos 770*c42dbd0eSchristos The GCC "'Complex int'" and fixed-point extensions are not yet 771*c42dbd0eSchristossupported: references to such types will be emitted as type 0. 772*c42dbd0eSchristos 773*c42dbd0eSchristos 774*c42dbd0eSchristosFile: ctf-spec.info, Node: Floating-point types, Next: Slices, Prev: Integer types, Up: The type section 775*c42dbd0eSchristos 776*c42dbd0eSchristos2.3.5 Floating-point types 777*c42dbd0eSchristos-------------------------- 778*c42dbd0eSchristos 779*c42dbd0eSchristosFloating-point types are all represented as types of kind 'CTF_K_FLOAT'. 780*c42dbd0eSchristosLike integers, These types fill out 'ctt_size' in the 'ctf_stype_t' with 781*c42dbd0eSchristosthe size in bytes of the floating-point type in question. They are 782*c42dbd0eSchristosalways represented by 'ctf_stype_t', never 'ctf_type_t'. 783*c42dbd0eSchristos 784*c42dbd0eSchristos This part of CTF shows many rough edges in the more obscure corners 785*c42dbd0eSchristosof floating-point handling, and is likely to change in format v4. 786*c42dbd0eSchristos 787*c42dbd0eSchristos The variable-length data for floats has multiple items packed into it 788*c42dbd0eSchristosjust like integers do: 789*c42dbd0eSchristos 790*c42dbd0eSchristosBit offset Name Description 791*c42dbd0eSchristos------------------------------------------------------------------------------------------- 792*c42dbd0eSchristos24-31 Encoding The desired display representation of this float. You can 793*c42dbd0eSchristos extract this field with the 'CTF_FP_ENCODING' macro. See below. 794*c42dbd0eSchristos 795*c42dbd0eSchristos16-23 Offset The offset of this floating-point type in bits from the start of 796*c42dbd0eSchristos its enclosing structure field, adjusted for endianness: 797*c42dbd0eSchristos *note Structs and unions::. You can extract this field with the 798*c42dbd0eSchristos 'CTF_FP_OFFSET' macro. 799*c42dbd0eSchristos 800*c42dbd0eSchristos0-15 Bit-width The width of this floating-point type in bits. You can extract 801*c42dbd0eSchristos this field with the 'CTF_FP_BITS' macro. 802*c42dbd0eSchristos 803*c42dbd0eSchristos The purpose of the floating-point offset and bit-width is somewhat 804*c42dbd0eSchristosopaque, since there are no such things as floating-point bitfields in C: 805*c42dbd0eSchristosthe bit-width should be filled out with the full width of the type in 806*c42dbd0eSchristosbits, and the offset should always be zero. It is likely that these 807*c42dbd0eSchristosfields will go away in the future. As with integers, you can use 808*c42dbd0eSchristos'CTF_FP_DATA' to assemble one of these vlen items from its component 809*c42dbd0eSchristosparts. 810*c42dbd0eSchristos 811*c42dbd0eSchristos The "encoding" for floats is not a bitfield but a simple value 812*c42dbd0eSchristosindicating the display representation. Many of these are unused, relate 813*c42dbd0eSchristosto Solaris-specific compiler extensions, and will be recycled in future: 814*c42dbd0eSchristossome are unused and will become used in future. 815*c42dbd0eSchristos 816*c42dbd0eSchristosOffset Name Description 817*c42dbd0eSchristos---------------------------------------------------------------------------------------------- 818*c42dbd0eSchristos1 'CTF_FP_SINGLE' This is a single-precision IEEE 754 'float'. 819*c42dbd0eSchristos2 'CTF_FP_DOUBLE' This is a double-precision IEEE 754 'double'. 820*c42dbd0eSchristos3 'CTF_FP_CPLX' This is a 'Complex float'. 821*c42dbd0eSchristos4 'CTF_FP_DCPLX' This is a 'Complex double'. 822*c42dbd0eSchristos5 'CTF_FP_LDCPLX' This is a 'Complex long double'. 823*c42dbd0eSchristos6 'CTF_FP_LDOUBLE' This is a 'long double'. 824*c42dbd0eSchristos7 'CTF_FP_INTRVL' This is a 'float' interval type, a Solaris-specific extension. 825*c42dbd0eSchristos Unused: will be recycled. 826*c42dbd0eSchristos8 'CTF_FP_DINTRVL' This is a 'double' interval type, a Solaris-specific 827*c42dbd0eSchristos extension. Unused: will be recycled. 828*c42dbd0eSchristos9 'CTF_FP_LDINTRVL' This is a 'long double' interval type, a Solaris-specific 829*c42dbd0eSchristos extension. Unused: will be recycled. 830*c42dbd0eSchristos10 'CTF_FP_IMAGRY' This is a the imaginary part of a 'Complex float'. Not 831*c42dbd0eSchristos currently generated. May change. 832*c42dbd0eSchristos11 'CTF_FP_DIMAGRY' This is a the imaginary part of a 'Complex double'. Not 833*c42dbd0eSchristos currently generated. May change. 834*c42dbd0eSchristos12 'CTF_FP_LDIMAGRY' This is a the imaginary part of a 'Complex long double'. Not 835*c42dbd0eSchristos currently generated. May change. 836*c42dbd0eSchristos 837*c42dbd0eSchristos The use of the complex floating-point encodings is obscure: it is 838*c42dbd0eSchristospossible that 'CTF_FP_CPLX' is meant to be used for only the real part 839*c42dbd0eSchristosof complex types, and 'CTF_FP_IMAGRY' et al for the imaginary part - but 840*c42dbd0eSchristosfor now, we are emitting 'CTF_FP_CPLX' to cover the entire type, with no 841*c42dbd0eSchristosway to get at its constituent parts. There appear to be no uses of 842*c42dbd0eSchristosthese encodings anywhere, so they are quite likely to change 843*c42dbd0eSchristosincompatibly in future. 844*c42dbd0eSchristos 845*c42dbd0eSchristos 846*c42dbd0eSchristosFile: ctf-spec.info, Node: Slices, Next: Pointers typedefs and cvr-quals, Prev: Floating-point types, Up: The type section 847*c42dbd0eSchristos 848*c42dbd0eSchristos2.3.6 Slices 849*c42dbd0eSchristos------------ 850*c42dbd0eSchristos 851*c42dbd0eSchristosSlices, with kind 'CTF_K_SLICE', are an unusual CTF construct: they do 852*c42dbd0eSchristosnot directly correspond to any C type, but are a way to model other 853*c42dbd0eSchristostypes in a more convenient fashion for CTF generators. 854*c42dbd0eSchristos 855*c42dbd0eSchristos A slice is like a pointer or other reference type in that they are 856*c42dbd0eSchristosalways represented by 'ctf_stype_t': but unlike pointers and other 857*c42dbd0eSchristosreference types, they populate the 'ctt_size' field just like integral 858*c42dbd0eSchristostypes do, and come with an attached encoding and transform the encoding 859*c42dbd0eSchristosof the underlying type. The underlying type is described in the 860*c42dbd0eSchristosvariable-length data, similarly to structure and union fields: see 861*c42dbd0eSchristosbelow. Requests for the type size should also chase down to the 862*c42dbd0eSchristosreferenced type. 863*c42dbd0eSchristos 864*c42dbd0eSchristos Slices are always nameless: 'ctt_name' is always zero for them. 865*c42dbd0eSchristos 866*c42dbd0eSchristos (The 'libctf' API behaviour is unusual as well, and justifies the 867*c42dbd0eSchristosexistence of slices: 'ctf_type_kind' never returns 'CTF_K_SLICE' but 868*c42dbd0eSchristosalways the underlying type kind, so that consumers never need to know 869*c42dbd0eSchristosabout slices: they can tell if an apparent integer is actually a slice 870*c42dbd0eSchristosif they need to by calling 'ctf_type_reference', which will uniquely 871*c42dbd0eSchristosreturn the underlying integral type rather than erroring out with 872*c42dbd0eSchristos'ECTF_NOTREF' if this is actually a slice. So slices act just like an 873*c42dbd0eSchristosinteger with an encoding, but more closely mirror DWARF and other 874*c42dbd0eSchristosdebugging information formats by allowing CTF file creators to represent 875*c42dbd0eSchristosa bitfield as a slice of an underlying integral type.) 876*c42dbd0eSchristos 877*c42dbd0eSchristos The vlen in the info word for a slice should be ignored and is always 878*c42dbd0eSchristoszero. The variable-length data for a slice is a single 'ctf_slice_t': 879*c42dbd0eSchristos 880*c42dbd0eSchristostypedef struct ctf_slice 881*c42dbd0eSchristos{ 882*c42dbd0eSchristos uint32_t cts_type; 883*c42dbd0eSchristos unsigned short cts_offset; 884*c42dbd0eSchristos unsigned short cts_bits; 885*c42dbd0eSchristos} ctf_slice_t; 886*c42dbd0eSchristos 887*c42dbd0eSchristosOffset Name Description 888*c42dbd0eSchristos---------------------------------------------------------------------------------------- 889*c42dbd0eSchristos0x0 'uint32_t cts_type' The type this slice is a slice of. Must be an 890*c42dbd0eSchristos integral type (or a floating-point type, but 891*c42dbd0eSchristos this nonsensical option will go away in v4.) 892*c42dbd0eSchristos 893*c42dbd0eSchristos0x4 'unsigned short cts_offset' The offset of this integral type in bits from 894*c42dbd0eSchristos the start of its enclosing structure field, 895*c42dbd0eSchristos adjusted for endianness: 896*c42dbd0eSchristos *note Structs and unions::. Identical 897*c42dbd0eSchristos semantics to the 'CTF_INT_OFFSET' field: 898*c42dbd0eSchristos *note Integer types::. This field is much too 899*c42dbd0eSchristos long, because the maximum possible offset of 900*c42dbd0eSchristos an integral type would easily fit in a char: 901*c42dbd0eSchristos this field is bigger just for the sake of 902*c42dbd0eSchristos alignment. This will change in v4. 903*c42dbd0eSchristos 904*c42dbd0eSchristos0x6 'unsigned short cts_bits' The bit-width of this integral type. 905*c42dbd0eSchristos Identical semantics to the 'CTF_INT_BITS' 906*c42dbd0eSchristos field: *note Integer types::. As above, this 907*c42dbd0eSchristos field is really too large and will shrink in 908*c42dbd0eSchristos v4. 909*c42dbd0eSchristos 910*c42dbd0eSchristos 911*c42dbd0eSchristosFile: ctf-spec.info, Node: Pointers typedefs and cvr-quals, Next: Arrays, Prev: Slices, Up: The type section 912*c42dbd0eSchristos 913*c42dbd0eSchristos2.3.7 Pointers, typedefs, and cvr-quals 914*c42dbd0eSchristos--------------------------------------- 915*c42dbd0eSchristos 916*c42dbd0eSchristosPointers, 'typedef's, and 'const', 'volatile' and 'restrict' qualifiers 917*c42dbd0eSchristosare represented identically except for their type kind (though they may 918*c42dbd0eSchristosbe treated differently by consuming libraries like 'libctf', since 919*c42dbd0eSchristospointers affect assignment-compatibility in ways cvr-quals do not, and 920*c42dbd0eSchristosthey may have different alignment requirements, etc). 921*c42dbd0eSchristos 922*c42dbd0eSchristos All of these are represented by 'ctf_stype_t', have no variable data 923*c42dbd0eSchristosat all, and populate 'ctt_type' with the type ID of the type they point 924*c42dbd0eSchristosto. These types can stack: a 'CTF_K_RESTRICT' can point to a 925*c42dbd0eSchristos'CTF_K_CONST' which can point to a 'CTF_K_POINTER' etc. 926*c42dbd0eSchristos 927*c42dbd0eSchristos They are all unnamed: 'ctt_name' is 0. 928*c42dbd0eSchristos 929*c42dbd0eSchristos The size of 'CTF_K_POINTER' is derived from the data model (*note 930*c42dbd0eSchristosData models::), i.e. in practice, from the target machine ABI, and is 931*c42dbd0eSchristosnot explicitly represented. The size of other kinds in this set should 932*c42dbd0eSchristosbe determined by chasing ctf_types as necessary until a 933*c42dbd0eSchristosnon-typedef/const/volatile/restrict is found, and using that. 934*c42dbd0eSchristos 935*c42dbd0eSchristos 936*c42dbd0eSchristosFile: ctf-spec.info, Node: Arrays, Next: Function pointers, Prev: Pointers typedefs and cvr-quals, Up: The type section 937*c42dbd0eSchristos 938*c42dbd0eSchristos2.3.8 Arrays 939*c42dbd0eSchristos------------ 940*c42dbd0eSchristos 941*c42dbd0eSchristosArrays are encoded as types of kind 'CTF_K_ARRAY' in a 'ctf_stype_t'. 942*c42dbd0eSchristosBoth size and kind for arrays are zero. The variable-length data is a 943*c42dbd0eSchristos'ctf_array_t': 'vlen' in the info word should be disregarded and is 944*c42dbd0eSchristosalways zero. 945*c42dbd0eSchristos 946*c42dbd0eSchristostypedef struct ctf_array 947*c42dbd0eSchristos{ 948*c42dbd0eSchristos uint32_t cta_contents; 949*c42dbd0eSchristos uint32_t cta_index; 950*c42dbd0eSchristos uint32_t cta_nelems; 951*c42dbd0eSchristos} ctf_array_t; 952*c42dbd0eSchristos 953*c42dbd0eSchristosOffset Name Description 954*c42dbd0eSchristos---------------------------------------------------------------------------------------- 955*c42dbd0eSchristos0x0 'uint32_t cta_contents' The type of the array elements: a type ID. 956*c42dbd0eSchristos 957*c42dbd0eSchristos0x4 'uint32_t cta_index' The type of the array index: a type ID of an 958*c42dbd0eSchristos integral type. If this is a variable-length 959*c42dbd0eSchristos array, the index type ID will be 0 (but the 960*c42dbd0eSchristos actual index type of this array is probably 961*c42dbd0eSchristos 'int'). Probably redundant and may be 962*c42dbd0eSchristos dropped in v4. 963*c42dbd0eSchristos 964*c42dbd0eSchristos0x8 'uint32_t cta_nelems' The number of array elements. 0 for VLAs, 965*c42dbd0eSchristos and also for the historical variety of VLA 966*c42dbd0eSchristos which has explicit zero dimensions (which 967*c42dbd0eSchristos will have a nonzero 'cta_index'.) 968*c42dbd0eSchristos 969*c42dbd0eSchristos The size of an array can be computed by simple multiplication of the 970*c42dbd0eSchristossize of the 'cta_contents' type by the 'cta_nelems'. 971*c42dbd0eSchristos 972*c42dbd0eSchristos 973*c42dbd0eSchristosFile: ctf-spec.info, Node: Function pointers, Next: Enums, Prev: Arrays, Up: The type section 974*c42dbd0eSchristos 975*c42dbd0eSchristos2.3.9 Function pointers 976*c42dbd0eSchristos----------------------- 977*c42dbd0eSchristos 978*c42dbd0eSchristosFunction pointers are explicitly represented in the CTF type section by 979*c42dbd0eSchristosa type of kind 'CTF_K_FUNCTION', always encoded with a 'ctf_stype_t'. 980*c42dbd0eSchristosThe 'ctt_type' is the function return type ID. The 'vlen' in the info 981*c42dbd0eSchristosword is the number of arguments, each of which is a type ID, a 982*c42dbd0eSchristos'uint32_t': if the last argument is 0, this is a varargs function and 983*c42dbd0eSchristosthe number of arguments is one less than indicated by the vlen. 984*c42dbd0eSchristos 985*c42dbd0eSchristos If the number of arguments is odd, a single 'uint32_t' of padding is 986*c42dbd0eSchristosinserted to maintain alignment. 987*c42dbd0eSchristos 988*c42dbd0eSchristos 989*c42dbd0eSchristosFile: ctf-spec.info, Node: Enums, Next: Structs and unions, Prev: Function pointers, Up: The type section 990*c42dbd0eSchristos 991*c42dbd0eSchristos2.3.10 Enums 992*c42dbd0eSchristos------------ 993*c42dbd0eSchristos 994*c42dbd0eSchristosEnumerated types are represented as types of kind 'CTF_K_ENUM' in a 995*c42dbd0eSchristos'ctf_stype_t'. The 'ctt_size' is always the size of an int from the 996*c42dbd0eSchristosdata model (enum bitfields are implemented via slices). The 'vlen' is a 997*c42dbd0eSchristoscount of enumerations, each of which is represented by a 'ctf_enum_t' in 998*c42dbd0eSchristosthe vlen: 999*c42dbd0eSchristos 1000*c42dbd0eSchristostypedef struct ctf_enum 1001*c42dbd0eSchristos{ 1002*c42dbd0eSchristos uint32_t cte_name; 1003*c42dbd0eSchristos int32_t cte_value; 1004*c42dbd0eSchristos} ctf_enum_t; 1005*c42dbd0eSchristos 1006*c42dbd0eSchristosOffset Name Description 1007*c42dbd0eSchristos------------------------------------------------------------------------ 1008*c42dbd0eSchristos0x0 'uint32_t cte_name' Strtab offset of the enumeration name. 1009*c42dbd0eSchristos Must not be 0. 1010*c42dbd0eSchristos 1011*c42dbd0eSchristos0x4 'int32_t cte_value' The enumeration value. 1012*c42dbd0eSchristos 1013*c42dbd0eSchristos 1014*c42dbd0eSchristos Enumeration values larger than 2^32 are not yet supported and are 1015*c42dbd0eSchristosomitted from the enumeration. (v4 will lift this restriction by 1016*c42dbd0eSchristosencoding the value differently.) 1017*c42dbd0eSchristos 1018*c42dbd0eSchristos Forward declarations of enums are not implemented with this kind: 1019*c42dbd0eSchristos*note Forward declarations::. 1020*c42dbd0eSchristos 1021*c42dbd0eSchristos Enumerated type names, as usual in C, go into their own namespace, 1022*c42dbd0eSchristosand do not conflict with non-enums, structs, or unions with the same 1023*c42dbd0eSchristosname. 1024*c42dbd0eSchristos 1025*c42dbd0eSchristos 1026*c42dbd0eSchristosFile: ctf-spec.info, Node: Structs and unions, Next: Forward declarations, Prev: Enums, Up: The type section 1027*c42dbd0eSchristos 1028*c42dbd0eSchristos2.3.11 Structs and unions 1029*c42dbd0eSchristos------------------------- 1030*c42dbd0eSchristos 1031*c42dbd0eSchristosStructures and unions are represnted as types of kind 'CTF_K_STRUCT' and 1032*c42dbd0eSchristos'CTF_K_UNION': their representation is otherwise identical, and it is 1033*c42dbd0eSchristosperfectly allowed for "structs" to contain overlapping fields etc, so we 1034*c42dbd0eSchristoswill treat them together for the rest of this section. 1035*c42dbd0eSchristos 1036*c42dbd0eSchristos They fill out 'ctt_size', and use 'ctf_type_t' in preference to 1037*c42dbd0eSchristos'ctf_stype_t' if the structure size is greater than 'CTF_MAX_SIZE' 1038*c42dbd0eSchristos(0xfffffffe). 1039*c42dbd0eSchristos 1040*c42dbd0eSchristos The vlen for structures and unions is a count of structure fields, 1041*c42dbd0eSchristosbut the type used to represent a structure field (and thus the size of 1042*c42dbd0eSchristosthe variable-length array element representing the type) depends on the 1043*c42dbd0eSchristossize of the structure: truly huge structures, greater than 1044*c42dbd0eSchristos'CTF_LSTRUCT_THRESH' bytes in length, use a different type. 1045*c42dbd0eSchristos('CTF_LSTRUCT_THRESH' is 536870912, so such structures are vanishingly 1046*c42dbd0eSchristosrare: in v4, this representation will change somewhat for greater 1047*c42dbd0eSchristoscompactness. It's inherited from v1, where the limits were much lower.) 1048*c42dbd0eSchristos 1049*c42dbd0eSchristos Most structures can get away with using 'ctf_member_t': 1050*c42dbd0eSchristos 1051*c42dbd0eSchristostypedef struct ctf_member_v2 1052*c42dbd0eSchristos{ 1053*c42dbd0eSchristos uint32_t ctm_name; 1054*c42dbd0eSchristos uint32_t ctm_offset; 1055*c42dbd0eSchristos uint32_t ctm_type; 1056*c42dbd0eSchristos} ctf_member_t; 1057*c42dbd0eSchristos 1058*c42dbd0eSchristos Huge structures that are represented by 'ctf_type_t' rather than 1059*c42dbd0eSchristos'ctf_stype_t' have to use 'ctf_lmember_t', which splits the offset as 1060*c42dbd0eSchristos'ctf_type_t' splits the size: 1061*c42dbd0eSchristos 1062*c42dbd0eSchristostypedef struct ctf_lmember_v2 1063*c42dbd0eSchristos{ 1064*c42dbd0eSchristos uint32_t ctlm_name; 1065*c42dbd0eSchristos uint32_t ctlm_offsethi; 1066*c42dbd0eSchristos uint32_t ctlm_type; 1067*c42dbd0eSchristos uint32_t ctlm_offsetlo; 1068*c42dbd0eSchristos} ctf_lmember_t; 1069*c42dbd0eSchristos 1070*c42dbd0eSchristos Here's what the fields of 'ctf_member' mean: 1071*c42dbd0eSchristos 1072*c42dbd0eSchristosOffset Name Description 1073*c42dbd0eSchristos--------------------------------------------------------------------------------------------------------- 1074*c42dbd0eSchristos0x00 'uint32_t ctm_name' Strtab offset of the field name. 1075*c42dbd0eSchristos 1076*c42dbd0eSchristos0x04 'uint32_t ctm_offset' The offset of this field _in bits_. (Usually, for bitfields, this is 1077*c42dbd0eSchristos machine-word-aligned and the individual field has an offset in bits, 1078*c42dbd0eSchristos but the format allows for the offset to be encoded in bits here.) 1079*c42dbd0eSchristos 1080*c42dbd0eSchristos0x08 'uint32_t ctm_type' The type ID of the type of the field. 1081*c42dbd0eSchristos 1082*c42dbd0eSchristos Here's what the fields of the very similar 'ctf_lmember' mean: 1083*c42dbd0eSchristos 1084*c42dbd0eSchristosOffset Name Description 1085*c42dbd0eSchristos------------------------------------------------------------------------------------------------------------ 1086*c42dbd0eSchristos0x00 'uint32_t ctlm_name' Strtab offset of the field name. 1087*c42dbd0eSchristos 1088*c42dbd0eSchristos0x04 'uint32_t ctlm_offsethi' The high 32 bits of the offset of this field in bits. 1089*c42dbd0eSchristos 1090*c42dbd0eSchristos0x08 'uint32_t ctlm_type' The type ID of the type of the field. 1091*c42dbd0eSchristos 1092*c42dbd0eSchristos0x0c 'uint32_t ctlm_offsetlo' The low 32 bits of the offset of this field in bits. 1093*c42dbd0eSchristos 1094*c42dbd0eSchristos Macros 'CTF_LMEM_OFFSET', 'CTF_OFFSET_TO_LMEMHI' and 1095*c42dbd0eSchristos'CTF_OFFSET_TO_LMEMLO' serve to extract and install the values of the 1096*c42dbd0eSchristos'ctlm_offset' fields, much as with the split size fields in 1097*c42dbd0eSchristos'ctf_type_t'. 1098*c42dbd0eSchristos 1099*c42dbd0eSchristos Unnamed structure and union fields are simply implemented by 1100*c42dbd0eSchristoscollapsing the unnamed field's members into the containing structure or 1101*c42dbd0eSchristosunion: this does mean that a structure containing an unnamed union can 1102*c42dbd0eSchristosend up being a "structure" with multiple members at the same offset. (A 1103*c42dbd0eSchristosfuture format revision may collapse 'CTF_K_STRUCT' and 'CTF_K_UNION' 1104*c42dbd0eSchristosinto the same kind and decide among them based on whether their members 1105*c42dbd0eSchristosdo in fact overlap.) 1106*c42dbd0eSchristos 1107*c42dbd0eSchristos Structure and union type names, as usual in C, go into their own 1108*c42dbd0eSchristosnamespace, just as enum type names do. 1109*c42dbd0eSchristos 1110*c42dbd0eSchristos Forward declarations of structures and unions are not implemented 1111*c42dbd0eSchristoswith this kind: *note Forward declarations::. 1112*c42dbd0eSchristos 1113*c42dbd0eSchristos 1114*c42dbd0eSchristosFile: ctf-spec.info, Node: Forward declarations, Prev: Structs and unions, Up: The type section 1115*c42dbd0eSchristos 1116*c42dbd0eSchristos2.3.12 Forward declarations 1117*c42dbd0eSchristos--------------------------- 1118*c42dbd0eSchristos 1119*c42dbd0eSchristosWhen the compiler encounters a forward declaration of a struct, union, 1120*c42dbd0eSchristosor enum, it emits a type of kind 'CTF_K_FORWARD'. If it later 1121*c42dbd0eSchristosencounters a non- forward declaration of the same thing, it marks the 1122*c42dbd0eSchristosforward as non-root-visible: before link time, therefore, 1123*c42dbd0eSchristosnon-root-visible forwards indicate that a non-forward is coming. 1124*c42dbd0eSchristos 1125*c42dbd0eSchristos After link time, forwards are fused with their corresponding 1126*c42dbd0eSchristosnon-forwards by the deduplicator where possible. They are kept if there 1127*c42dbd0eSchristosis no non-forward definition (maybe it's not visible from any TU at all) 1128*c42dbd0eSchristosor if 'multiple' conflicting structures with the same name might match 1129*c42dbd0eSchristosit. Otherwise, all other forwards are converted to structures, unions, 1130*c42dbd0eSchristosor enums as appropriate, even across TUs if only one structure could 1131*c42dbd0eSchristoscorrespond to the forward (after all, all types across all TUs land in 1132*c42dbd0eSchristosthe same dictionary unless they conflict, so promoting forwards to their 1133*c42dbd0eSchristosconcrete type seems most helpful). 1134*c42dbd0eSchristos 1135*c42dbd0eSchristos A forward has a rather strange representation: it is encoded with a 1136*c42dbd0eSchristos'ctf_stype_t' but the 'ctt_type' is populated not with a type (if it's a 1137*c42dbd0eSchristosforward, we don't have an underlying type yet: if we did, we'd have 1138*c42dbd0eSchristospromoted it and this wouldn't be a forward any more) but with the 'kind' 1139*c42dbd0eSchristosof the forward. This means that we can distinguish forwards to structs, 1140*c42dbd0eSchristosenums and unions reliably and ensure they land in the appropriate 1141*c42dbd0eSchristosnamespace even before the actual struct, union or enum is found. 1142*c42dbd0eSchristos 1143*c42dbd0eSchristos 1144*c42dbd0eSchristosFile: ctf-spec.info, Node: The symtypetab sections, Next: The variable section, Prev: The type section, Up: CTF dictionaries 1145*c42dbd0eSchristos 1146*c42dbd0eSchristos2.4 The symtypetab sections 1147*c42dbd0eSchristos=========================== 1148*c42dbd0eSchristos 1149*c42dbd0eSchristosThese are two very simple sections with identical formats, used by 1150*c42dbd0eSchristosconsumers to map from ELF function and data symbols directly to their 1151*c42dbd0eSchristostypes. So they are usually populated only in CTF sections that are 1152*c42dbd0eSchristosembedded in ELF objects. 1153*c42dbd0eSchristos 1154*c42dbd0eSchristos Their format is very simple: an array of type IDs. Which symbol each 1155*c42dbd0eSchristostype ID corresponds to depends on whether the optional _index section_ 1156*c42dbd0eSchristosassociated with this symtypetab section has any content. 1157*c42dbd0eSchristos 1158*c42dbd0eSchristos If the index section is nonempty, it is an array of 'uint32_t' string 1159*c42dbd0eSchristostable offsets, each giving the name of the symbol whose type is at the 1160*c42dbd0eSchristossame offset in the corresponding non-index section: users can look up 1161*c42dbd0eSchristossymbols in such a table by name. The index section and corresponding 1162*c42dbd0eSchristossymtypetab section is usually ASCIIbetically sorted (indicated by the 1163*c42dbd0eSchristos'CTF_F_IDXSORTED' flag in the header): if it's sorted, it can be 1164*c42dbd0eSchristosbsearched for a symbol name rather than having to use a slower linear 1165*c42dbd0eSchristossearch. 1166*c42dbd0eSchristos 1167*c42dbd0eSchristos If the data object index section is empty, the entries in the data 1168*c42dbd0eSchristosobject and function info sections are associated 1:1 with ELF symbols of 1169*c42dbd0eSchristostype 'STT_OBJECT' (for data object) or 'STT_FUNC' (for function info) 1170*c42dbd0eSchristoswith a nonzero value: the linker shuffles the symtypetab sections to 1171*c42dbd0eSchristoscorrespond with the order of the symbols in the ELF file. Symbols with 1172*c42dbd0eSchristosno name, undefined symbols and symbols named "'_START_'" and "'_END_'" 1173*c42dbd0eSchristosare skipped and never appear in either section. Symbols that have no 1174*c42dbd0eSchristoscorresponding type are represented by type ID 0. The section may have 1175*c42dbd0eSchristosfewer entries than the symbol table, in which case no later entries have 1176*c42dbd0eSchristosassociated types. This format is more compact than an indexed form if 1177*c42dbd0eSchristosmost entries have types (since there is no need to record any symbol 1178*c42dbd0eSchristosnames), but if the producer and consumer disagree even slightly about 1179*c42dbd0eSchristoswhich symbols are omitted, the types of all further symbols will be 1180*c42dbd0eSchristoswrong! 1181*c42dbd0eSchristos 1182*c42dbd0eSchristos The compiler always emits indexed symtypetab tables, because there is 1183*c42dbd0eSchristosno symbol table yet. The linker will always have to read them all in 1184*c42dbd0eSchristosand always works through them from start to end, so there is no benefit 1185*c42dbd0eSchristoshaving the compiler sort them either. The linker (actually, 'libctf''s 1186*c42dbd0eSchristoslinking machinery) will automatically sort unsorted indexed sections, 1187*c42dbd0eSchristosand convert indexed sections that contain a lot of pads into the more 1188*c42dbd0eSchristoscompact, unindexed form. 1189*c42dbd0eSchristos 1190*c42dbd0eSchristos If child dicts are in use, only symbols that use types actually 1191*c42dbd0eSchristosmentioned in the child appear in the child's symtypetab: symbols that 1192*c42dbd0eSchristosuse only types in the parent appear in the parent's symtypetab instead. 1193*c42dbd0eSchristosSo the child's symtypetab will almost always be very sparse, and thus 1194*c42dbd0eSchristoswill usually use the indexed form even in fully linked objects. (It is, 1195*c42dbd0eSchristosof course, impossible for symbols to exist that use types from multiple 1196*c42dbd0eSchristoschild dicts at once, since it's impossible to declare a function in C 1197*c42dbd0eSchristosthat uses types that are only visible in two different, disjoint 1198*c42dbd0eSchristostranslation units.) 1199*c42dbd0eSchristos 1200*c42dbd0eSchristos 1201*c42dbd0eSchristosFile: ctf-spec.info, Node: The variable section, Next: The label section, Prev: The symtypetab sections, Up: CTF dictionaries 1202*c42dbd0eSchristos 1203*c42dbd0eSchristos2.5 The variable section 1204*c42dbd0eSchristos======================== 1205*c42dbd0eSchristos 1206*c42dbd0eSchristosThe variable section is a simple array mapping names (strtab entries) to 1207*c42dbd0eSchristostype IDs, intended to provide a replacement for the data object section 1208*c42dbd0eSchristosin dynamic situations in which there is no static ELF strtab but the 1209*c42dbd0eSchristosconsumer instead hands back names. The section is sorted into 1210*c42dbd0eSchristosASCIIbetical order by name for rapid lookup, like the CTF archive name 1211*c42dbd0eSchristostable. 1212*c42dbd0eSchristos 1213*c42dbd0eSchristos The section is an array of these structures: 1214*c42dbd0eSchristos 1215*c42dbd0eSchristostypedef struct ctf_varent 1216*c42dbd0eSchristos{ 1217*c42dbd0eSchristos uint32_t ctv_name; 1218*c42dbd0eSchristos uint32_t ctv_type; 1219*c42dbd0eSchristos} ctf_varent_t; 1220*c42dbd0eSchristos 1221*c42dbd0eSchristosOffset Name Description 1222*c42dbd0eSchristos----------------------------------------------------------- 1223*c42dbd0eSchristos0x00 'uint32_t ctv_name' Strtab offset of the name 1224*c42dbd0eSchristos 1225*c42dbd0eSchristos0x04 'uint32_t ctv_type' Type ID of this type 1226*c42dbd0eSchristos 1227*c42dbd0eSchristos There is no analogue of the function info section yet: v4 will 1228*c42dbd0eSchristosprobably drop this section in favour of a way to put both indexed (thus, 1229*c42dbd0eSchristosnamed) and nonindexed symbols into the symtypetab sections at the same 1230*c42dbd0eSchristostime. 1231*c42dbd0eSchristos 1232*c42dbd0eSchristos 1233*c42dbd0eSchristosFile: ctf-spec.info, Node: The label section, Next: The string section, Prev: The variable section, Up: CTF dictionaries 1234*c42dbd0eSchristos 1235*c42dbd0eSchristos2.6 The label section 1236*c42dbd0eSchristos===================== 1237*c42dbd0eSchristos 1238*c42dbd0eSchristosThe label section is a currently-unused facility allowing the tiling of 1239*c42dbd0eSchristosthe type space with names taken from the strtab. The section is an 1240*c42dbd0eSchristosarray of these structures: 1241*c42dbd0eSchristos 1242*c42dbd0eSchristostypedef struct ctf_lblent 1243*c42dbd0eSchristos{ 1244*c42dbd0eSchristos uint32_t ctl_label; 1245*c42dbd0eSchristos uint32_t ctl_type; 1246*c42dbd0eSchristos} ctf_lblent_t; 1247*c42dbd0eSchristos 1248*c42dbd0eSchristosOffset Name Description 1249*c42dbd0eSchristos------------------------------------------------------------- 1250*c42dbd0eSchristos0x00 'uint32_t ctl_label' Strtab offset of the label 1251*c42dbd0eSchristos 1252*c42dbd0eSchristos0x04 'uint32_t ctl_type' Type ID of the last type 1253*c42dbd0eSchristos covered by this label 1254*c42dbd0eSchristos 1255*c42dbd0eSchristos Semantics will be attached to labels soon, probably in v4 (the plan 1256*c42dbd0eSchristosis to use them to allow multiple disjoint namespaces in a single CTF 1257*c42dbd0eSchristosfile, removing many uses of CTF archives, in particular in the '.ctf' 1258*c42dbd0eSchristossection in ELF objects). 1259*c42dbd0eSchristos 1260*c42dbd0eSchristos 1261*c42dbd0eSchristosFile: ctf-spec.info, Node: The string section, Next: Data models, Prev: The label section, Up: CTF dictionaries 1262*c42dbd0eSchristos 1263*c42dbd0eSchristos2.7 The string section 1264*c42dbd0eSchristos====================== 1265*c42dbd0eSchristos 1266*c42dbd0eSchristosThis section is a simple ELF-format strtab, starting with a zero byte 1267*c42dbd0eSchristos(thus ensuring that the string with offset 0 is the null string, as 1268*c42dbd0eSchristosassumed elsewhere in this spec). The strtab is usually ASCIIbetically 1269*c42dbd0eSchristossorted to somewhat improve compression efficiency. 1270*c42dbd0eSchristos 1271*c42dbd0eSchristos Where the strtab is unusual is the _references_ to it. CTF has two 1272*c42dbd0eSchristosstring tables, the internal strtab and an external strtab associated 1273*c42dbd0eSchristoswith the CTF dictionary at open time: usually, this is the ELF dynamic 1274*c42dbd0eSchristosstrtab ('.dynstr') of a CTF dictionary embedded in an ELF file. We 1275*c42dbd0eSchristosdistinguish between these strtabs by the most significant bit, bit 31, 1276*c42dbd0eSchristosof the 32-bit strtab references: if it is 0, the offset is in the 1277*c42dbd0eSchristosinternal strtab: if 1, the offset is in the external strtab. 1278*c42dbd0eSchristos 1279*c42dbd0eSchristos There is a bug workaround in this area: in format v3 (the first 1280*c42dbd0eSchristosversion to have working support for external strtabs), the external 1281*c42dbd0eSchristosstrtab is '.strtab' unless the 'CTF_F_DYNSTR' flag is set on the 1282*c42dbd0eSchristosdictionary (*note CTF file-wide flags::). Format v4 will introduce a 1283*c42dbd0eSchristosheader field that explicitly names the external strtab, making this flag 1284*c42dbd0eSchristosunnecessary. 1285*c42dbd0eSchristos 1286*c42dbd0eSchristos 1287*c42dbd0eSchristosFile: ctf-spec.info, Node: Data models, Next: Limits of CTF, Prev: The string section, Up: CTF dictionaries 1288*c42dbd0eSchristos 1289*c42dbd0eSchristos2.8 Data models 1290*c42dbd0eSchristos=============== 1291*c42dbd0eSchristos 1292*c42dbd0eSchristosThe data model is a simple integer which indicates the ABI in use on 1293*c42dbd0eSchristosthis platform. Right now, it is very simple, distinguishing only 1294*c42dbd0eSchristosbetween 32- and 64-bit types: a model of 1 indicates ILP32, 2 indicats 1295*c42dbd0eSchristosLP64. The mapping from ABI integer to type sizes is hardwired into 1296*c42dbd0eSchristos'libctf': currently, we use this to hardwire the size of pointers, 1297*c42dbd0eSchristosfunction pointers, and enumerated types, 1298*c42dbd0eSchristos 1299*c42dbd0eSchristos This is a very kludgy corner of CTF and will probably be replaced 1300*c42dbd0eSchristoswith explicit header fields to record this sort of thing in future. 1301*c42dbd0eSchristos 1302*c42dbd0eSchristos 1303*c42dbd0eSchristosFile: ctf-spec.info, Node: Limits of CTF, Prev: Data models, Up: CTF dictionaries 1304*c42dbd0eSchristos 1305*c42dbd0eSchristos2.9 Limits of CTF 1306*c42dbd0eSchristos================= 1307*c42dbd0eSchristos 1308*c42dbd0eSchristosThe following limits are imposed by various aspects of CTF version 3: 1309*c42dbd0eSchristos 1310*c42dbd0eSchristos'CTF_MAX_TYPE' 1311*c42dbd0eSchristos Maximum type identifier (maximum number of types accessible with 1312*c42dbd0eSchristos parent and child containers in use): 0xfffffffe 1313*c42dbd0eSchristos'CTF_MAX_PTYPE' 1314*c42dbd0eSchristos Maximum type identifier in a parent dictioanry: maximum number of 1315*c42dbd0eSchristos types in any one dictionary: 0x7fffffff 1316*c42dbd0eSchristos'CTF_MAX_NAME' 1317*c42dbd0eSchristos Maximum offset into a string table: 0x7fffffff 1318*c42dbd0eSchristos'CTF_MAX_VLEN' 1319*c42dbd0eSchristos Maximum number of members in a struct, union, or enum: maximum 1320*c42dbd0eSchristos number of function args: 0xffffff 1321*c42dbd0eSchristos'CTF_MAX_SIZE' 1322*c42dbd0eSchristos Maximum size of a 'ctf_stype_t' in bytes before we fall back to 1323*c42dbd0eSchristos 'ctf_type_t': 0xfffffffe bytes 1324*c42dbd0eSchristos 1325*c42dbd0eSchristos Other maxima without associated macros: 1326*c42dbd0eSchristos * Maximum value of an enumerated type: 2^32 1327*c42dbd0eSchristos * Maximum size of an array element: 2^32 1328*c42dbd0eSchristos 1329*c42dbd0eSchristos These maxima are generally considered to be too low, because C 1330*c42dbd0eSchristosprograms can and do exceed them: they will be lifted in format v4. 1331*c42dbd0eSchristos 1332*c42dbd0eSchristos 1333*c42dbd0eSchristosFile: ctf-spec.info, Node: Index, Prev: CTF dictionaries, Up: Top 1334*c42dbd0eSchristos 1335*c42dbd0eSchristosIndex 1336*c42dbd0eSchristos***** 1337*c42dbd0eSchristos 1338*c42dbd0eSchristos[index] 1339*c42dbd0eSchristos* Menu: 1340*c42dbd0eSchristos 1341*c42dbd0eSchristos* alignment: CTF Preamble. (line 33) 1342*c42dbd0eSchristos* archive, CTF archive: CTF archive. (line 6) 1343*c42dbd0eSchristos* Arrays: Arrays. (line 6) 1344*c42dbd0eSchristos* bool: Integer types. (line 6) 1345*c42dbd0eSchristos* Bug workarounds, CTF_F_DYNSTR: The symtypetab sections. 1346*c42dbd0eSchristos (line 6) 1347*c42dbd0eSchristos* Bug workarounds, CTF_F_DYNSTR <1>: The string section. (line 19) 1348*c42dbd0eSchristos* char: Integer types. (line 6) 1349*c42dbd0eSchristos* Child range: Type indexes and type IDs. 1350*c42dbd0eSchristos (line 6) 1351*c42dbd0eSchristos* Complex, double: Floating-point types. (line 6) 1352*c42dbd0eSchristos* Complex, float: Floating-point types. (line 6) 1353*c42dbd0eSchristos* Complex, signed double: Floating-point types. (line 6) 1354*c42dbd0eSchristos* Complex, signed float: Floating-point types. (line 6) 1355*c42dbd0eSchristos* Complex, unsigned double: Floating-point types. (line 6) 1356*c42dbd0eSchristos* Complex, unsigned float: Floating-point types. (line 6) 1357*c42dbd0eSchristos* const: Pointers typedefs and cvr-quals. 1358*c42dbd0eSchristos (line 6) 1359*c42dbd0eSchristos* cta_contents: Arrays. (line 20) 1360*c42dbd0eSchristos* cta_index: Arrays. (line 22) 1361*c42dbd0eSchristos* cta_nelems: Arrays. (line 29) 1362*c42dbd0eSchristos* cte_name: Enums. (line 21) 1363*c42dbd0eSchristos* cte_value: Enums. (line 24) 1364*c42dbd0eSchristos* CTF header: CTF header. (line 6) 1365*c42dbd0eSchristos* CTF versions, versions: CTF Preamble. (line 46) 1366*c42dbd0eSchristos* ctfa_ctfs: CTF archive. (line 76) 1367*c42dbd0eSchristos* ctfa_magic: CTF archive. (line 63) 1368*c42dbd0eSchristos* CTFA_MAGIC: CTF archive. (line 64) 1369*c42dbd0eSchristos* ctfa_model: CTF archive. (line 66) 1370*c42dbd0eSchristos* ctfa_names: CTF archive. (line 72) 1371*c42dbd0eSchristos* ctfa_nfiles: CTF archive. (line 71) 1372*c42dbd0eSchristos* ctf_archive_modent_t: CTF archive. (line 83) 1373*c42dbd0eSchristos* ctf_archive_modent_t, ctf_offset: CTF archive. (line 88) 1374*c42dbd0eSchristos* ctf_archive_modent_t, name_offset: CTF archive. (line 86) 1375*c42dbd0eSchristos* ctf_array_t: Arrays. (line 18) 1376*c42dbd0eSchristos* ctf_array_t, cta_contents: Arrays. (line 20) 1377*c42dbd0eSchristos* ctf_array_t, cta_index: Arrays. (line 22) 1378*c42dbd0eSchristos* ctf_array_t, cta_nelems: Arrays. (line 29) 1379*c42dbd0eSchristos* CTF_CHAR: Integer types. (line 53) 1380*c42dbd0eSchristos* ctf_enum_t: Enums. (line 18) 1381*c42dbd0eSchristos* ctf_enum_t, cte_name: Enums. (line 21) 1382*c42dbd0eSchristos* ctf_enum_t, cte_value: Enums. (line 24) 1383*c42dbd0eSchristos* CTF_FP_BITS: Floating-point types. (line 28) 1384*c42dbd0eSchristos* CTF_FP_CPLX: Floating-point types. (line 47) 1385*c42dbd0eSchristos* CTF_FP_DCPLX: Floating-point types. (line 48) 1386*c42dbd0eSchristos* CTF_FP_DIMAGRY: Floating-point types. (line 60) 1387*c42dbd0eSchristos* CTF_FP_DINTRVL: Floating-point types. (line 54) 1388*c42dbd0eSchristos* CTF_FP_DOUBLE: Floating-point types. (line 46) 1389*c42dbd0eSchristos* CTF_FP_ENCODING: Floating-point types. (line 21) 1390*c42dbd0eSchristos* CTF_FP_IMAGRY: Floating-point types. (line 58) 1391*c42dbd0eSchristos* CTF_FP_INTRVL: Floating-point types. (line 52) 1392*c42dbd0eSchristos* CTF_FP_LDCPLX: Floating-point types. (line 49) 1393*c42dbd0eSchristos* CTF_FP_LDIMAGRY: Floating-point types. (line 62) 1394*c42dbd0eSchristos* CTF_FP_LDINTRVL: Floating-point types. (line 56) 1395*c42dbd0eSchristos* CTF_FP_LDOUBLE: Floating-point types. (line 50) 1396*c42dbd0eSchristos* CTF_FP_OFFSET: Floating-point types. (line 25) 1397*c42dbd0eSchristos* CTF_FP_SINGLE: Floating-point types. (line 45) 1398*c42dbd0eSchristos* CTF_F_COMPRESS: CTF file-wide flags. (line 17) 1399*c42dbd0eSchristos* CTF_F_DYNSTR: CTF file-wide flags. (line 21) 1400*c42dbd0eSchristos* CTF_F_DYNSTR <1>: The symtypetab sections. 1401*c42dbd0eSchristos (line 6) 1402*c42dbd0eSchristos* CTF_F_DYNSTR <2>: The string section. (line 19) 1403*c42dbd0eSchristos* CTF_F_IDXSORTED: CTF file-wide flags. (line 20) 1404*c42dbd0eSchristos* CTF_F_IDXSORTED <1>: The symtypetab sections. 1405*c42dbd0eSchristos (line 6) 1406*c42dbd0eSchristos* CTF_F_NEWFUNCINFO: CTF file-wide flags. (line 19) 1407*c42dbd0eSchristos* ctf_header_t: CTF header. (line 44) 1408*c42dbd0eSchristos* ctf_header_t, cth_cuname: CTF header. (line 61) 1409*c42dbd0eSchristos* ctf_header_t, cth_flags: CTF Preamble. (line 30) 1410*c42dbd0eSchristos* ctf_header_t, cth_funcidxoff: CTF header. (line 82) 1411*c42dbd0eSchristos* ctf_header_t, cth_funcoff: CTF header. (line 74) 1412*c42dbd0eSchristos* ctf_header_t, cth_lbloff: CTF header. (line 66) 1413*c42dbd0eSchristos* ctf_header_t, cth_magic: CTF Preamble. (line 24) 1414*c42dbd0eSchristos* ctf_header_t, cth_objtidxoff: CTF header. (line 78) 1415*c42dbd0eSchristos* ctf_header_t, cth_objtoff: CTF header. (line 70) 1416*c42dbd0eSchristos* ctf_header_t, cth_parlabel: CTF header. (line 49) 1417*c42dbd0eSchristos* ctf_header_t, cth_parname: CTF header. (line 55) 1418*c42dbd0eSchristos* ctf_header_t, cth_preamble: CTF header. (line 47) 1419*c42dbd0eSchristos* ctf_header_t, cth_strlen: CTF header. (line 98) 1420*c42dbd0eSchristos* ctf_header_t, cth_stroff: CTF header. (line 95) 1421*c42dbd0eSchristos* ctf_header_t, cth_typeoff: CTF header. (line 91) 1422*c42dbd0eSchristos* ctf_header_t, cth_varoff: CTF header. (line 87) 1423*c42dbd0eSchristos* ctf_header_t, cth_version: CTF Preamble. (line 28) 1424*c42dbd0eSchristos* ctf_id_t: Type indexes and type IDs. 1425*c42dbd0eSchristos (line 6) 1426*c42dbd0eSchristos* CTF_INT_BITS: Integer types. (line 28) 1427*c42dbd0eSchristos* CTF_INT_BOOL: Integer types. (line 57) 1428*c42dbd0eSchristos* CTF_INT_CHAR: Integer types. (line 53) 1429*c42dbd0eSchristos* CTF_INT_DATA: Integer types. (line 34) 1430*c42dbd0eSchristos* CTF_INT_DATA <1>: Floating-point types. (line 36) 1431*c42dbd0eSchristos* CTF_INT_ENCODING: Integer types. (line 20) 1432*c42dbd0eSchristos* CTF_INT_OFFSET: Integer types. (line 25) 1433*c42dbd0eSchristos* CTF_INT_SIGNED: Integer types. (line 49) 1434*c42dbd0eSchristos* CTF_K_CONST: Pointers typedefs and cvr-quals. 1435*c42dbd0eSchristos (line 6) 1436*c42dbd0eSchristos* CTF_K_ENUM: Enums. (line 6) 1437*c42dbd0eSchristos* CTF_K_FLOAT: Floating-point types. (line 6) 1438*c42dbd0eSchristos* CTF_K_FORWARD: Forward declarations. (line 6) 1439*c42dbd0eSchristos* CTF_K_INTEGER: Integer types. (line 6) 1440*c42dbd0eSchristos* CTF_K_POINTER: Pointers typedefs and cvr-quals. 1441*c42dbd0eSchristos (line 6) 1442*c42dbd0eSchristos* CTF_K_RESTRICT: Pointers typedefs and cvr-quals. 1443*c42dbd0eSchristos (line 6) 1444*c42dbd0eSchristos* CTF_K_SLICE: Slices. (line 6) 1445*c42dbd0eSchristos* CTF_K_STRUCT: Structs and unions. (line 6) 1446*c42dbd0eSchristos* CTF_K_TYPEDEF: Pointers typedefs and cvr-quals. 1447*c42dbd0eSchristos (line 6) 1448*c42dbd0eSchristos* CTF_K_UNION: Structs and unions. (line 6) 1449*c42dbd0eSchristos* CTF_K_UNKNOWN: Type kinds. (line 31) 1450*c42dbd0eSchristos* CTF_K_VOLATILE: Pointers typedefs and cvr-quals. 1451*c42dbd0eSchristos (line 6) 1452*c42dbd0eSchristos* ctf_lblent_t: The label section. (line 16) 1453*c42dbd0eSchristos* ctf_lblent_t, ctl_label: The label section. (line 19) 1454*c42dbd0eSchristos* ctf_lblent_t, ctl_type: The label section. (line 20) 1455*c42dbd0eSchristos* ctf_lmember_t: Structs and unions. (line 59) 1456*c42dbd0eSchristos* ctf_lmember_t, ctlm_name: Structs and unions. (line 61) 1457*c42dbd0eSchristos* ctf_lmember_t, ctlm_offsethi: Structs and unions. (line 64) 1458*c42dbd0eSchristos* ctf_lmember_t, ctlm_offsetlo: Structs and unions. (line 68) 1459*c42dbd0eSchristos* CTF_LSIZE_SENT: The type section. (line 49) 1460*c42dbd0eSchristos* CTF_LSTRUCT_THRESH: Structs and unions. (line 23) 1461*c42dbd0eSchristos* CTF_MAGIC: CTF Preamble. (line 25) 1462*c42dbd0eSchristos* CTF_MAX_LSIZE: Structs and unions. (line 13) 1463*c42dbd0eSchristos* ctf_member_t: Structs and unions. (line 47) 1464*c42dbd0eSchristos* ctf_member_t, ctlm_type: Structs and unions. (line 65) 1465*c42dbd0eSchristos* ctf_member_t, ctm_name: Structs and unions. (line 49) 1466*c42dbd0eSchristos* ctf_member_t, ctm_offset: Structs and unions. (line 52) 1467*c42dbd0eSchristos* ctf_member_t, ctm_type: Structs and unions. (line 55) 1468*c42dbd0eSchristos* ctf_offset: CTF archive. (line 88) 1469*c42dbd0eSchristos* ctf_preamble_t: CTF Preamble. (line 22) 1470*c42dbd0eSchristos* ctf_preamble_t, ctp_flags: CTF Preamble. (line 30) 1471*c42dbd0eSchristos* ctf_preamble_t, ctp_magic: CTF Preamble. (line 24) 1472*c42dbd0eSchristos* ctf_preamble_t, ctp_version: CTF Preamble. (line 28) 1473*c42dbd0eSchristos* CTF_SIZE_TO_LSIZE_HI: The type section. (line 79) 1474*c42dbd0eSchristos* CTF_SIZE_TO_LSIZE_LO: The type section. (line 83) 1475*c42dbd0eSchristos* ctf_slice_t: Slices. (line 42) 1476*c42dbd0eSchristos* ctf_slice_t, cts_bits: Slices. (line 59) 1477*c42dbd0eSchristos* ctf_slice_t, cts_offset: Slices. (line 49) 1478*c42dbd0eSchristos* ctf_slice_t, cts_type: Slices. (line 44) 1479*c42dbd0eSchristos* ctf_stype_t: The type section. (line 53) 1480*c42dbd0eSchristos* ctf_stype_t, ctt_info: The type section. (line 57) 1481*c42dbd0eSchristos* ctf_stype_t, ctt_size: The type section. (line 62) 1482*c42dbd0eSchristos* ctf_stype_t, ctt_type: The type section. (line 67) 1483*c42dbd0eSchristos* CTF_TYPE_INFO: The info word. (line 45) 1484*c42dbd0eSchristos* CTF_TYPE_LSIZE: The type section. (line 79) 1485*c42dbd0eSchristos* ctf_type_t: The type section. (line 53) 1486*c42dbd0eSchristos* ctf_type_t, ctt_info: The type section. (line 57) 1487*c42dbd0eSchristos* ctf_type_t, ctt_lsizehi: The type section. (line 76) 1488*c42dbd0eSchristos* ctf_type_t, ctt_lsizelo: The type section. (line 82) 1489*c42dbd0eSchristos* ctf_type_t, ctt_size: The type section. (line 62) 1490*c42dbd0eSchristos* CTF_V2_INDEX_TO_TYPE: Type indexes and type IDs. 1491*c42dbd0eSchristos (line 58) 1492*c42dbd0eSchristos* CTF_V2_INFO_ISROOT: The info word. (line 45) 1493*c42dbd0eSchristos* CTF_V2_INFO_KIND: The info word. (line 45) 1494*c42dbd0eSchristos* CTF_V2_INFO_VLEN: The info word. (line 45) 1495*c42dbd0eSchristos* CTF_V2_TYPE_ISCHILD: Type indexes and type IDs. 1496*c42dbd0eSchristos (line 58) 1497*c42dbd0eSchristos* CTF_V2_TYPE_ISPARENT: Type indexes and type IDs. 1498*c42dbd0eSchristos (line 58) 1499*c42dbd0eSchristos* CTF_V2_TYPE_TO_INDEX: Type indexes and type IDs. 1500*c42dbd0eSchristos (line 58) 1501*c42dbd0eSchristos* ctf_varent_t: The variable section. (line 21) 1502*c42dbd0eSchristos* ctf_varent_t, ctv_name: The variable section. (line 24) 1503*c42dbd0eSchristos* ctf_varent_t, ctv_type: The variable section. (line 26) 1504*c42dbd0eSchristos* CTF_VERSION_3: CTF Preamble. (line 46) 1505*c42dbd0eSchristos* cth_cuname: CTF header. (line 61) 1506*c42dbd0eSchristos* cth_flags: CTF Preamble. (line 30) 1507*c42dbd0eSchristos* cth_funcidxoff: CTF header. (line 82) 1508*c42dbd0eSchristos* cth_funcoff: CTF header. (line 74) 1509*c42dbd0eSchristos* cth_lbloff: CTF header. (line 66) 1510*c42dbd0eSchristos* cth_magic: CTF Preamble. (line 24) 1511*c42dbd0eSchristos* cth_objtidxoff: CTF header. (line 78) 1512*c42dbd0eSchristos* cth_objtoff: CTF header. (line 70) 1513*c42dbd0eSchristos* cth_parlabel: CTF header. (line 49) 1514*c42dbd0eSchristos* cth_parname: CTF header. (line 55) 1515*c42dbd0eSchristos* cth_preamble: CTF header. (line 47) 1516*c42dbd0eSchristos* cth_strlen: CTF header. (line 98) 1517*c42dbd0eSchristos* cth_stroff: CTF header. (line 95) 1518*c42dbd0eSchristos* cth_typeoff: CTF header. (line 91) 1519*c42dbd0eSchristos* cth_varoff: CTF header. (line 87) 1520*c42dbd0eSchristos* cth_version: CTF Preamble. (line 28) 1521*c42dbd0eSchristos* ctlm_name: Structs and unions. (line 61) 1522*c42dbd0eSchristos* ctlm_offsethi: Structs and unions. (line 64) 1523*c42dbd0eSchristos* ctlm_offsetlo: Structs and unions. (line 68) 1524*c42dbd0eSchristos* ctl_label: The label section. (line 19) 1525*c42dbd0eSchristos* ctl_type: The label section. (line 20) 1526*c42dbd0eSchristos* ctm_name: Structs and unions. (line 49) 1527*c42dbd0eSchristos* ctm_offset: Structs and unions. (line 52) 1528*c42dbd0eSchristos* ctm_type: Structs and unions. (line 55) 1529*c42dbd0eSchristos* ctm_type <1>: Structs and unions. (line 65) 1530*c42dbd0eSchristos* ctp_flags: CTF Preamble. (line 30) 1531*c42dbd0eSchristos* ctp_flags <1>: CTF Preamble. (line 58) 1532*c42dbd0eSchristos* ctp_magic: CTF Preamble. (line 24) 1533*c42dbd0eSchristos* ctp_version: CTF Preamble. (line 28) 1534*c42dbd0eSchristos* cts_bits: Slices. (line 59) 1535*c42dbd0eSchristos* cts_offset: Slices. (line 49) 1536*c42dbd0eSchristos* cts_type: Slices. (line 44) 1537*c42dbd0eSchristos* ctt_info: The type section. (line 57) 1538*c42dbd0eSchristos* ctt_lsizehi: The type section. (line 76) 1539*c42dbd0eSchristos* ctt_lsizelo: The type section. (line 82) 1540*c42dbd0eSchristos* ctt_name: The type section. (line 55) 1541*c42dbd0eSchristos* ctt_size: The type section. (line 62) 1542*c42dbd0eSchristos* ctt_type: The type section. (line 67) 1543*c42dbd0eSchristos* ctv_name: The variable section. (line 24) 1544*c42dbd0eSchristos* ctv_type: The variable section. (line 26) 1545*c42dbd0eSchristos* cvr-quals: Pointers typedefs and cvr-quals. 1546*c42dbd0eSchristos (line 6) 1547*c42dbd0eSchristos* Data models: Data models. (line 6) 1548*c42dbd0eSchristos* Data object index section: The symtypetab sections. 1549*c42dbd0eSchristos (line 6) 1550*c42dbd0eSchristos* Data object section: The symtypetab sections. 1551*c42dbd0eSchristos (line 6) 1552*c42dbd0eSchristos* dictionary, CTF dictionary: CTF dictionaries. (line 6) 1553*c42dbd0eSchristos* double: Floating-point types. (line 6) 1554*c42dbd0eSchristos* endianness: CTF Preamble. (line 37) 1555*c42dbd0eSchristos* enum: Enums. (line 6) 1556*c42dbd0eSchristos* enum <1>: Forward declarations. (line 6) 1557*c42dbd0eSchristos* Enums: Enums. (line 6) 1558*c42dbd0eSchristos* float: Floating-point types. (line 6) 1559*c42dbd0eSchristos* Floating-point types: Floating-point types. (line 6) 1560*c42dbd0eSchristos* Forwards: Forward declarations. (line 6) 1561*c42dbd0eSchristos* Function info index section: The symtypetab sections. 1562*c42dbd0eSchristos (line 6) 1563*c42dbd0eSchristos* Function info section: The symtypetab sections. 1564*c42dbd0eSchristos (line 6) 1565*c42dbd0eSchristos* Function pointers: Function pointers. (line 6) 1566*c42dbd0eSchristos* int: Integer types. (line 6) 1567*c42dbd0eSchristos* Integer types: Integer types. (line 6) 1568*c42dbd0eSchristos* Label section: The label section. (line 6) 1569*c42dbd0eSchristos* libctf, effect of slices: Slices. (line 30) 1570*c42dbd0eSchristos* Limits: Limits of CTF. (line 6) 1571*c42dbd0eSchristos* long: Integer types. (line 6) 1572*c42dbd0eSchristos* long long: Integer types. (line 6) 1573*c42dbd0eSchristos* name_offset: CTF archive. (line 86) 1574*c42dbd0eSchristos* Overview: Overview. (line 6) 1575*c42dbd0eSchristos* Parent range: Type indexes and type IDs. 1576*c42dbd0eSchristos (line 6) 1577*c42dbd0eSchristos* Pointers: Pointers typedefs and cvr-quals. 1578*c42dbd0eSchristos (line 6) 1579*c42dbd0eSchristos* Pointers, to functions: Function pointers. (line 6) 1580*c42dbd0eSchristos* restrict: Pointers typedefs and cvr-quals. 1581*c42dbd0eSchristos (line 6) 1582*c42dbd0eSchristos* Sections, data object: The symtypetab sections. 1583*c42dbd0eSchristos (line 6) 1584*c42dbd0eSchristos* Sections, data object index: The symtypetab sections. 1585*c42dbd0eSchristos (line 6) 1586*c42dbd0eSchristos* Sections, function info: The symtypetab sections. 1587*c42dbd0eSchristos (line 6) 1588*c42dbd0eSchristos* Sections, function info index: The symtypetab sections. 1589*c42dbd0eSchristos (line 6) 1590*c42dbd0eSchristos* Sections, header: CTF header. (line 6) 1591*c42dbd0eSchristos* Sections, label: The label section. (line 6) 1592*c42dbd0eSchristos* Sections, string: The string section. (line 6) 1593*c42dbd0eSchristos* Sections, symtypetab: The symtypetab sections. 1594*c42dbd0eSchristos (line 6) 1595*c42dbd0eSchristos* Sections, type: The type section. (line 6) 1596*c42dbd0eSchristos* Sections, variable: The variable section. (line 6) 1597*c42dbd0eSchristos* short: Integer types. (line 6) 1598*c42dbd0eSchristos* signed char: Integer types. (line 6) 1599*c42dbd0eSchristos* signed double: Floating-point types. (line 6) 1600*c42dbd0eSchristos* signed float: Floating-point types. (line 6) 1601*c42dbd0eSchristos* signed int: Integer types. (line 6) 1602*c42dbd0eSchristos* signed long: Integer types. (line 6) 1603*c42dbd0eSchristos* signed long long: Integer types. (line 6) 1604*c42dbd0eSchristos* signed short: Integer types. (line 6) 1605*c42dbd0eSchristos* Slices: Slices. (line 6) 1606*c42dbd0eSchristos* Slices, effect on ctf_type_kind: Slices. (line 30) 1607*c42dbd0eSchristos* Slices, effect on ctf_type_reference: Slices. (line 30) 1608*c42dbd0eSchristos* String section: The string section. (line 6) 1609*c42dbd0eSchristos* struct: Structs and unions. (line 6) 1610*c42dbd0eSchristos* struct <1>: Forward declarations. (line 6) 1611*c42dbd0eSchristos* struct ctf_archive: CTF archive. (line 61) 1612*c42dbd0eSchristos* struct ctf_archive, ctfa_ctfs: CTF archive. (line 76) 1613*c42dbd0eSchristos* struct ctf_archive, ctfa_magic: CTF archive. (line 63) 1614*c42dbd0eSchristos* struct ctf_archive, ctfa_model: CTF archive. (line 66) 1615*c42dbd0eSchristos* struct ctf_archive, ctfa_names: CTF archive. (line 72) 1616*c42dbd0eSchristos* struct ctf_archive, ctfa_nfiles: CTF archive. (line 71) 1617*c42dbd0eSchristos* struct ctf_archive_modent: CTF archive. (line 83) 1618*c42dbd0eSchristos* struct ctf_archive_modent, ctf_offset: CTF archive. (line 88) 1619*c42dbd0eSchristos* struct ctf_archive_modent, name_offset: CTF archive. (line 86) 1620*c42dbd0eSchristos* struct ctf_array: Arrays. (line 18) 1621*c42dbd0eSchristos* struct ctf_array, cta_contents: Arrays. (line 20) 1622*c42dbd0eSchristos* struct ctf_array, cta_index: Arrays. (line 22) 1623*c42dbd0eSchristos* struct ctf_array, cta_nelems: Arrays. (line 29) 1624*c42dbd0eSchristos* struct ctf_enum: Enums. (line 18) 1625*c42dbd0eSchristos* struct ctf_enum, cte_name: Enums. (line 21) 1626*c42dbd0eSchristos* struct ctf_enum, cte_value: Enums. (line 24) 1627*c42dbd0eSchristos* struct ctf_header: CTF header. (line 44) 1628*c42dbd0eSchristos* struct ctf_header, cth_cuname: CTF header. (line 61) 1629*c42dbd0eSchristos* struct ctf_header, cth_flags: CTF Preamble. (line 30) 1630*c42dbd0eSchristos* struct ctf_header, cth_funcidxoff: CTF header. (line 82) 1631*c42dbd0eSchristos* struct ctf_header, cth_funcoff: CTF header. (line 74) 1632*c42dbd0eSchristos* struct ctf_header, cth_lbloff: CTF header. (line 66) 1633*c42dbd0eSchristos* struct ctf_header, cth_magic: CTF Preamble. (line 24) 1634*c42dbd0eSchristos* struct ctf_header, cth_objtidxoff: CTF header. (line 78) 1635*c42dbd0eSchristos* struct ctf_header, cth_objtoff: CTF header. (line 70) 1636*c42dbd0eSchristos* struct ctf_header, cth_parlabel: CTF header. (line 49) 1637*c42dbd0eSchristos* struct ctf_header, cth_parname: CTF header. (line 55) 1638*c42dbd0eSchristos* struct ctf_header, cth_preamble: CTF header. (line 47) 1639*c42dbd0eSchristos* struct ctf_header, cth_strlen: CTF header. (line 98) 1640*c42dbd0eSchristos* struct ctf_header, cth_stroff: CTF header. (line 95) 1641*c42dbd0eSchristos* struct ctf_header, cth_typeoff: CTF header. (line 91) 1642*c42dbd0eSchristos* struct ctf_header, cth_varoff: CTF header. (line 87) 1643*c42dbd0eSchristos* struct ctf_header, cth_version: CTF Preamble. (line 28) 1644*c42dbd0eSchristos* struct ctf_lblent: The label section. (line 16) 1645*c42dbd0eSchristos* struct ctf_lblent, ctl_label: The label section. (line 19) 1646*c42dbd0eSchristos* struct ctf_lblent, ctl_type: The label section. (line 20) 1647*c42dbd0eSchristos* struct ctf_lmember_v2: Structs and unions. (line 59) 1648*c42dbd0eSchristos* struct ctf_lmember_v2, ctlm_name: Structs and unions. (line 61) 1649*c42dbd0eSchristos* struct ctf_lmember_v2, ctlm_offsethi: Structs and unions. (line 64) 1650*c42dbd0eSchristos* struct ctf_lmember_v2, ctlm_offsetlo: Structs and unions. (line 68) 1651*c42dbd0eSchristos* struct ctf_lmember_v2, ctlm_type: Structs and unions. (line 65) 1652*c42dbd0eSchristos* struct ctf_member_v2: Structs and unions. (line 47) 1653*c42dbd0eSchristos* struct ctf_member_v2, ctm_name: Structs and unions. (line 49) 1654*c42dbd0eSchristos* struct ctf_member_v2, ctm_offset: Structs and unions. (line 52) 1655*c42dbd0eSchristos* struct ctf_member_v2, ctm_type: Structs and unions. (line 55) 1656*c42dbd0eSchristos* struct ctf_preamble: CTF Preamble. (line 22) 1657*c42dbd0eSchristos* struct ctf_preamble, ctp_flags: CTF Preamble. (line 30) 1658*c42dbd0eSchristos* struct ctf_preamble, ctp_magic: CTF Preamble. (line 24) 1659*c42dbd0eSchristos* struct ctf_preamble, ctp_version: CTF Preamble. (line 28) 1660*c42dbd0eSchristos* struct ctf_slice: Slices. (line 42) 1661*c42dbd0eSchristos* struct ctf_slice, cts_bits: Slices. (line 59) 1662*c42dbd0eSchristos* struct ctf_slice, cts_offset: Slices. (line 49) 1663*c42dbd0eSchristos* struct ctf_slice, cts_type: Slices. (line 44) 1664*c42dbd0eSchristos* struct ctf_stype: The type section. (line 53) 1665*c42dbd0eSchristos* struct ctf_stype, ctt_info: The type section. (line 57) 1666*c42dbd0eSchristos* struct ctf_stype, ctt_size: The type section. (line 62) 1667*c42dbd0eSchristos* struct ctf_stype, ctt_type: The type section. (line 67) 1668*c42dbd0eSchristos* struct ctf_type: The type section. (line 53) 1669*c42dbd0eSchristos* struct ctf_type, ctt_info: The type section. (line 57) 1670*c42dbd0eSchristos* struct ctf_type, ctt_lsizehi: The type section. (line 76) 1671*c42dbd0eSchristos* struct ctf_type, ctt_lsizelo: The type section. (line 82) 1672*c42dbd0eSchristos* struct ctf_type, ctt_size: The type section. (line 62) 1673*c42dbd0eSchristos* struct ctf_varent: The variable section. (line 21) 1674*c42dbd0eSchristos* struct ctf_varent, ctv_name: The variable section. (line 24) 1675*c42dbd0eSchristos* struct ctf_varent, ctv_type: The variable section. (line 26) 1676*c42dbd0eSchristos* Structures: Structs and unions. (line 6) 1677*c42dbd0eSchristos* Symtypetab section: The symtypetab sections. 1678*c42dbd0eSchristos (line 6) 1679*c42dbd0eSchristos* Type IDs: Type indexes and type IDs. 1680*c42dbd0eSchristos (line 6) 1681*c42dbd0eSchristos* Type IDs, ranges: Type indexes and type IDs. 1682*c42dbd0eSchristos (line 6) 1683*c42dbd0eSchristos* Type indexes: Type indexes and type IDs. 1684*c42dbd0eSchristos (line 6) 1685*c42dbd0eSchristos* Type kinds: Type kinds. (line 6) 1686*c42dbd0eSchristos* Type section: The type section. (line 6) 1687*c42dbd0eSchristos* Type, IDs of: Type indexes and type IDs. 1688*c42dbd0eSchristos (line 6) 1689*c42dbd0eSchristos* Type, indexes of: Type indexes and type IDs. 1690*c42dbd0eSchristos (line 6) 1691*c42dbd0eSchristos* Type, kinds of: Type kinds. (line 6) 1692*c42dbd0eSchristos* typedef: Pointers typedefs and cvr-quals. 1693*c42dbd0eSchristos (line 6) 1694*c42dbd0eSchristos* Typedefs: Pointers typedefs and cvr-quals. 1695*c42dbd0eSchristos (line 6) 1696*c42dbd0eSchristos* Types, floating-point: Floating-point types. (line 6) 1697*c42dbd0eSchristos* Types, integer: Integer types. (line 6) 1698*c42dbd0eSchristos* Types, slices of integral: Slices. (line 6) 1699*c42dbd0eSchristos* union: Structs and unions. (line 6) 1700*c42dbd0eSchristos* union <1>: Forward declarations. (line 6) 1701*c42dbd0eSchristos* Unions: Structs and unions. (line 6) 1702*c42dbd0eSchristos* unsigned char: Integer types. (line 6) 1703*c42dbd0eSchristos* unsigned double: Floating-point types. (line 6) 1704*c42dbd0eSchristos* unsigned float: Floating-point types. (line 6) 1705*c42dbd0eSchristos* unsigned int: Integer types. (line 6) 1706*c42dbd0eSchristos* unsigned long: Integer types. (line 6) 1707*c42dbd0eSchristos* unsigned long long: Integer types. (line 6) 1708*c42dbd0eSchristos* unsigned short: Integer types. (line 6) 1709*c42dbd0eSchristos* Unused bits: Floating-point types. (line 52) 1710*c42dbd0eSchristos* Unused bits <1>: Floating-point types. (line 54) 1711*c42dbd0eSchristos* Unused bits <2>: Floating-point types. (line 56) 1712*c42dbd0eSchristos* Unused bits <3>: Floating-point types. (line 58) 1713*c42dbd0eSchristos* Unused bits <4>: Floating-point types. (line 60) 1714*c42dbd0eSchristos* Unused bits <5>: Floating-point types. (line 62) 1715*c42dbd0eSchristos* Variable section: The variable section. (line 6) 1716*c42dbd0eSchristos* volatile: Pointers typedefs and cvr-quals. 1717*c42dbd0eSchristos (line 6) 1718*c42dbd0eSchristos 1719*c42dbd0eSchristos 1720*c42dbd0eSchristos 1721*c42dbd0eSchristosTag Table: 1722*c42dbd0eSchristosNode: Top548 1723*c42dbd0eSchristosNode: Overview878 1724*c42dbd0eSchristosNode: CTF archive4165 1725*c42dbd0eSchristosNode: CTF dictionaries8791 1726*c42dbd0eSchristosNode: CTF Preamble9208 1727*c42dbd0eSchristosNode: CTF file-wide flags11818 1728*c42dbd0eSchristosNode: CTF header13276 1729*c42dbd0eSchristosNode: The type section19200 1730*c42dbd0eSchristosNode: The info word23865 1731*c42dbd0eSchristosNode: Type indexes and type IDs26395 1732*c42dbd0eSchristosNode: Type kinds29763 1733*c42dbd0eSchristosNode: Integer types33056 1734*c42dbd0eSchristosNode: Floating-point types36604 1735*c42dbd0eSchristosNode: Slices40629 1736*c42dbd0eSchristosNode: Pointers typedefs and cvr-quals44133 1737*c42dbd0eSchristosNode: Arrays45304 1738*c42dbd0eSchristosNode: Function pointers47035 1739*c42dbd0eSchristosNode: Enums47700 1740*c42dbd0eSchristosNode: Structs and unions48982 1741*c42dbd0eSchristosNode: Forward declarations52839 1742*c42dbd0eSchristosNode: The symtypetab sections54418 1743*c42dbd0eSchristosNode: The variable section57496 1744*c42dbd0eSchristosNode: The label section58634 1745*c42dbd0eSchristosNode: The string section59609 1746*c42dbd0eSchristosNode: Data models60871 1747*c42dbd0eSchristosNode: Limits of CTF61540 1748*c42dbd0eSchristosNode: Index62585 1749*c42dbd0eSchristos 1750*c42dbd0eSchristosEnd Tag Table 1751*c42dbd0eSchristos 1752*c42dbd0eSchristos 1753*c42dbd0eSchristosLocal Variables: 1754*c42dbd0eSchristoscoding: utf-8 1755*c42dbd0eSchristosEnd: 1756