version: 1.10

package dwarf

import "debug/dwarf"

Overview

Package dwarf provides access to DWARF debugging information loaded from
executable files, as defined in the DWARF 2.0 Standard at
http://dwarfstd.org/doc/dwarf-2.0.0.pdf

Index

Package files

buf.go class_string.go const.go entry.go line.go open.go type.go typeunit.go unit.go

Variables

  1. var ErrUnknownPC = errors.New("ErrUnknownPC")

ErrUnknownPC is the error returned by LineReader.ScanPC when the seek PC is not
covered by any entry in the line table.

type AddrType

  1. type AddrType struct {
  2. BasicType
  3. }

An AddrType represents a machine address type.

type ArrayType

  1. type ArrayType struct {
  2. CommonType
  3. Type Type
  4. StrideBitSize int64 // if > 0, number of bits to hold each element
  5. Count int64 // if == -1, an incomplete array, like char x[].
  6. }

An ArrayType represents a fixed size array type.

func (*ArrayType) Size

  1. func (t *ArrayType) Size() int64

func (*ArrayType) String

  1. func (t *ArrayType) String() string

type Attr

  1. type Attr uint32

An Attr identifies the attribute type in a DWARF Entry’s Field.

  1. const (
  2. AttrSibling Attr = 0x01
  3. AttrLocation Attr = 0x02
  4. AttrName Attr = 0x03
  5. AttrOrdering Attr = 0x09
  6. AttrByteSize Attr = 0x0B
  7. AttrBitOffset Attr = 0x0C
  8. AttrBitSize Attr = 0x0D
  9. AttrStmtList Attr = 0x10
  10. AttrLowpc Attr = 0x11
  11. AttrHighpc Attr = 0x12
  12. AttrLanguage Attr = 0x13
  13. AttrDiscr Attr = 0x15
  14. AttrDiscrValue Attr = 0x16
  15. AttrVisibility Attr = 0x17
  16. AttrImport Attr = 0x18
  17. AttrStringLength Attr = 0x19
  18. AttrCommonRef Attr = 0x1A
  19. AttrCompDir Attr = 0x1B
  20. AttrConstValue Attr = 0x1C
  21. AttrContainingType Attr = 0x1D
  22. AttrDefaultValue Attr = 0x1E
  23. AttrInline Attr = 0x20
  24. AttrIsOptional Attr = 0x21
  25. AttrLowerBound Attr = 0x22
  26. AttrProducer Attr = 0x25
  27. AttrPrototyped Attr = 0x27
  28. AttrReturnAddr Attr = 0x2A
  29. AttrStartScope Attr = 0x2C
  30. AttrStrideSize Attr = 0x2E
  31. AttrUpperBound Attr = 0x2F
  32. AttrAbstractOrigin Attr = 0x31
  33. AttrAccessibility Attr = 0x32
  34. AttrAddrClass Attr = 0x33
  35. AttrArtificial Attr = 0x34
  36. AttrBaseTypes Attr = 0x35
  37. AttrCalling Attr = 0x36
  38. AttrCount Attr = 0x37
  39. AttrDataMemberLoc Attr = 0x38
  40. AttrDeclColumn Attr = 0x39
  41. AttrDeclFile Attr = 0x3A
  42. AttrDeclLine Attr = 0x3B
  43. AttrDeclaration Attr = 0x3C
  44. AttrDiscrList Attr = 0x3D
  45. AttrEncoding Attr = 0x3E
  46. AttrExternal Attr = 0x3F
  47. AttrFrameBase Attr = 0x40
  48. AttrFriend Attr = 0x41
  49. AttrIdentifierCase Attr = 0x42
  50. AttrMacroInfo Attr = 0x43
  51. AttrNamelistItem Attr = 0x44
  52. AttrPriority Attr = 0x45
  53. AttrSegment Attr = 0x46
  54. AttrSpecification Attr = 0x47
  55. AttrStaticLink Attr = 0x48
  56. AttrType Attr = 0x49
  57. AttrUseLocation Attr = 0x4A
  58. AttrVarParam Attr = 0x4B
  59. AttrVirtuality Attr = 0x4C
  60. AttrVtableElemLoc Attr = 0x4D
  61. AttrAllocated Attr = 0x4E
  62. AttrAssociated Attr = 0x4F
  63. AttrDataLocation Attr = 0x50
  64. AttrStride Attr = 0x51
  65. AttrEntrypc Attr = 0x52
  66. AttrUseUTF8 Attr = 0x53
  67. AttrExtension Attr = 0x54
  68. AttrRanges Attr = 0x55
  69. AttrTrampoline Attr = 0x56
  70. AttrCallColumn Attr = 0x57
  71. AttrCallFile Attr = 0x58
  72. AttrCallLine Attr = 0x59
  73. AttrDescription Attr = 0x5A
  74. )

func (Attr) GoString

  1. func (a Attr) GoString() string

func (Attr) String

  1. func (a Attr) String() string

type BasicType

  1. type BasicType struct {
  2. CommonType
  3. BitSize int64
  4. BitOffset int64
  5. }

A BasicType holds fields common to all basic types.

func (*BasicType) Basic

  1. func (b *BasicType) Basic() *BasicType

func (*BasicType) String

  1. func (t *BasicType) String() string

type BoolType

  1. type BoolType struct {
  2. BasicType
  3. }

A BoolType represents a boolean type.

type CharType

  1. type CharType struct {
  2. BasicType
  3. }

A CharType represents a signed character type.

type Class

  1. type Class int

A Class is the DWARF 4 class of an attribute value.

In general, a given attribute’s value may take on one of several possible
classes defined by DWARF, each of which leads to a slightly different
interpretation of the attribute.

DWARF version 4 distinguishes attribute value classes more finely than previous
versions of DWARF. The reader will disambiguate coarser classes from earlier
versions of DWARF into the appropriate DWARF 4 class. For example, DWARF 2 uses
“constant” for constants as well as all types of section offsets, but the reader
will canonicalize attributes in DWARF 2 files that refer to section offsets to
one of the Class*Ptr classes, even though these classes were only defined in
DWARF 3.

  1. const (
  2. // ClassUnknown represents values of unknown DWARF class.
  3. ClassUnknown Class = iota
  4.  
  5. // ClassAddress represents values of type uint64 that are
  6. // addresses on the target machine.
  7. ClassAddress
  8.  
  9. // ClassBlock represents values of type []byte whose
  10. // interpretation depends on the attribute.
  11. ClassBlock
  12.  
  13. // ClassConstant represents values of type int64 that are
  14. // constants. The interpretation of this constant depends on
  15. // the attribute.
  16. ClassConstant
  17.  
  18. // ClassExprLoc represents values of type []byte that contain
  19. // an encoded DWARF expression or location description.
  20. ClassExprLoc
  21.  
  22. // ClassFlag represents values of type bool.
  23. ClassFlag
  24.  
  25. // ClassLinePtr represents values that are an int64 offset
  26. // into the "line" section.
  27. ClassLinePtr
  28.  
  29. // ClassLocListPtr represents values that are an int64 offset
  30. // into the "loclist" section.
  31. ClassLocListPtr
  32.  
  33. // ClassMacPtr represents values that are an int64 offset into
  34. // the "mac" section.
  35. ClassMacPtr
  36.  
  37. // ClassMacPtr represents values that are an int64 offset into
  38. // the "rangelist" section.
  39. ClassRangeListPtr
  40.  
  41. // ClassReference represents values that are an Offset offset
  42. // of an Entry in the info section (for use with Reader.Seek).
  43. // The DWARF specification combines ClassReference and
  44. // ClassReferenceSig into class "reference".
  45. ClassReference
  46.  
  47. // ClassReferenceSig represents values that are a uint64 type
  48. // signature referencing a type Entry.
  49. ClassReferenceSig
  50.  
  51. // ClassString represents values that are strings. If the
  52. // compilation unit specifies the AttrUseUTF8 flag (strongly
  53. // recommended), the string value will be encoded in UTF-8.
  54. // Otherwise, the encoding is unspecified.
  55. ClassString
  56.  
  57. // ClassReferenceAlt represents values of type int64 that are
  58. // an offset into the DWARF "info" section of an alternate
  59. // object file.
  60. ClassReferenceAlt
  61.  
  62. // ClassStringAlt represents values of type int64 that are an
  63. // offset into the DWARF string section of an alternate object
  64. // file.
  65. ClassStringAlt
  66. )

func (Class) GoString

  1. func (i Class) GoString() string

func (Class) String

  1. func (i Class) String() string

type CommonType

  1. type CommonType struct {
  2. ByteSize int64 // size of value of this type, in bytes
  3. Name string // name that can be used to refer to type
  4. }

A CommonType holds fields common to multiple types. If a field is not known or
not applicable for a given type, the zero value is used.

func (*CommonType) Common

  1. func (c *CommonType) Common() *CommonType

func (*CommonType) Size

  1. func (c *CommonType) Size() int64

type ComplexType

  1. type ComplexType struct {
  2. BasicType
  3. }

A ComplexType represents a complex floating point type.

type Data

  1. type Data struct {
  2. // contains filtered or unexported fields
  3. }

Data represents the DWARF debugging information loaded from an executable file
(for example, an ELF or Mach-O executable).

func New

  1. func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Data, error)

New returns a new Data object initialized from the given parameters. Rather than
calling this function directly, clients should typically use the DWARF method of
the File type of the appropriate package debug/elf, debug/macho, or debug/pe.

The []byte arguments are the data from the corresponding debug section in the
object file; for example, for an ELF object, abbrev is the contents of the
“.debug_abbrev” section.

func (*Data) AddTypes

  1. func (d *Data) AddTypes(name string, types []byte) error

AddTypes will add one .debug_types section to the DWARF data. A typical object
with DWARF version 4 debug info will have multiple .debug_types sections. The
name is used for error reporting only, and serves to distinguish one
.debug_types section from another.

func (*Data) LineReader

  1. func (d *Data) LineReader(cu *Entry) (*LineReader, error)

LineReader returns a new reader for the line table of compilation unit cu, which
must be an Entry with tag TagCompileUnit.

If this compilation unit has no line table, it returns nil, nil.

func (*Data) Ranges

  1. func (d *Data) Ranges(e *Entry) ([][2]uint64, error)

Ranges returns the PC ranges covered by e, a slice of [low,high) pairs. Only
some entry types, such as TagCompileUnit or TagSubprogram, have PC ranges; for
others, this will return nil with no error.

func (*Data) Reader

  1. func (d *Data) Reader() *Reader

Reader returns a new Reader for Data. The reader is positioned at byte offset 0
in the DWARF ``info’’ section.

func (*Data) Type

  1. func (d *Data) Type(off Offset) (Type, error)

Type reads the type at off in the DWARF ``info’’ section.

type DecodeError

  1. type DecodeError struct {
  2. Name string
  3. Offset Offset
  4. Err string
  5. }

func (DecodeError) Error

  1. func (e DecodeError) Error() string

type DotDotDotType

  1. type DotDotDotType struct {
  2. CommonType
  3. }

A DotDotDotType represents the variadic … function parameter.

func (*DotDotDotType) String

  1. func (t *DotDotDotType) String() string

type Entry

  1. type Entry struct {
  2. Offset Offset // offset of Entry in DWARF info
  3. Tag Tag // tag (kind of Entry)
  4. Children bool // whether Entry is followed by children
  5. Field []Field
  6. }

An entry is a sequence of attribute/value pairs.

func (*Entry) AttrField

  1. func (e *Entry) AttrField(a Attr) *Field

AttrField returns the Field associated with attribute Attr in Entry, or nil if
there is no such attribute.

func (*Entry) Val

  1. func (e *Entry) Val(a Attr) interface{}

Val returns the value associated with attribute Attr in Entry, or nil if there
is no such attribute.

A common idiom is to merge the check for nil return with the check that the
value has the expected dynamic type, as in:

  1. v, ok := e.Val(AttrSibling).(int64)

type EnumType

  1. type EnumType struct {
  2. CommonType
  3. EnumName string
  4. Val []*EnumValue
  5. }

An EnumType represents an enumerated type. The only indication of its native
integer type is its ByteSize (inside CommonType).

func (*EnumType) String

  1. func (t *EnumType) String() string

type EnumValue

  1. type EnumValue struct {
  2. Name string
  3. Val int64
  4. }

An EnumValue represents a single enumeration value.

type Field

  1. type Field struct {
  2. Attr Attr
  3. Val interface{}
  4. Class Class
  5. }

A Field is a single attribute/value pair in an Entry.

A value can be one of several “attribute classes” defined by DWARF. The Go types
corresponding to each class are:

  1. DWARF class Go type Class
  2. ----------- ------- -----
  3. address uint64 ClassAddress
  4. block []byte ClassBlock
  5. constant int64 ClassConstant
  6. flag bool ClassFlag
  7. reference
  8. to info dwarf.Offset ClassReference
  9. to type unit uint64 ClassReferenceSig
  10. string string ClassString
  11. exprloc []byte ClassExprLoc
  12. lineptr int64 ClassLinePtr
  13. loclistptr int64 ClassLocListPtr
  14. macptr int64 ClassMacPtr
  15. rangelistptr int64 ClassRangeListPtr

For unrecognized or vendor-defined attributes, Class may be ClassUnknown.

type FloatType

  1. type FloatType struct {
  2. BasicType
  3. }

A FloatType represents a floating point type.

type FuncType

  1. type FuncType struct {
  2. CommonType
  3. ReturnType Type
  4. ParamType []Type
  5. }

A FuncType represents a function type.

func (*FuncType) String

  1. func (t *FuncType) String() string

type IntType

  1. type IntType struct {
  2. BasicType
  3. }

An IntType represents a signed integer type.

type LineEntry

  1. type LineEntry struct {
  2. // Address is the program-counter value of a machine
  3. // instruction generated by the compiler. This LineEntry
  4. // applies to each instruction from Address to just before the
  5. // Address of the next LineEntry.
  6. Address uint64
  7.  
  8. // OpIndex is the index of an operation within a VLIW
  9. // instruction. The index of the first operation is 0. For
  10. // non-VLIW architectures, it will always be 0. Address and
  11. // OpIndex together form an operation pointer that can
  12. // reference any individual operation within the instruction
  13. // stream.
  14. OpIndex int
  15.  
  16. // File is the source file corresponding to these
  17. // instructions.
  18. File *LineFile
  19.  
  20. // Line is the source code line number corresponding to these
  21. // instructions. Lines are numbered beginning at 1. It may be
  22. // 0 if these instructions cannot be attributed to any source
  23. // line.
  24. Line int
  25.  
  26. // Column is the column number within the source line of these
  27. // instructions. Columns are numbered beginning at 1. It may
  28. // be 0 to indicate the "left edge" of the line.
  29. Column int
  30.  
  31. // IsStmt indicates that Address is a recommended breakpoint
  32. // location, such as the beginning of a line, statement, or a
  33. // distinct subpart of a statement.
  34. IsStmt bool
  35.  
  36. // BasicBlock indicates that Address is the beginning of a
  37. // basic block.
  38. BasicBlock bool
  39.  
  40. // PrologueEnd indicates that Address is one (of possibly
  41. // many) PCs where execution should be suspended for a
  42. // breakpoint on entry to the containing function.
  43. //
  44. // Added in DWARF 3.
  45. PrologueEnd bool
  46.  
  47. // EpilogueBegin indicates that Address is one (of possibly
  48. // many) PCs where execution should be suspended for a
  49. // breakpoint on exit from this function.
  50. //
  51. // Added in DWARF 3.
  52. EpilogueBegin bool
  53.  
  54. // ISA is the instruction set architecture for these
  55. // instructions. Possible ISA values should be defined by the
  56. // applicable ABI specification.
  57. //
  58. // Added in DWARF 3.
  59. ISA int
  60.  
  61. // Discriminator is an arbitrary integer indicating the block
  62. // to which these instructions belong. It serves to
  63. // distinguish among multiple blocks that may all have with
  64. // the same source file, line, and column. Where only one
  65. // block exists for a given source position, it should be 0.
  66. //
  67. // Added in DWARF 3.
  68. Discriminator int
  69.  
  70. // EndSequence indicates that Address is the first byte after
  71. // the end of a sequence of target machine instructions. If it
  72. // is set, only this and the Address field are meaningful. A
  73. // line number table may contain information for multiple
  74. // potentially disjoint instruction sequences. The last entry
  75. // in a line table should always have EndSequence set.
  76. EndSequence bool
  77. }

A LineEntry is a row in a DWARF line table.

type LineFile

  1. type LineFile struct {
  2. Name string
  3. Mtime uint64 // Implementation defined modification time, or 0 if unknown
  4. Length int // File length, or 0 if unknown
  5. }

A LineFile is a source file referenced by a DWARF line table entry.

type LineReader

  1. type LineReader struct {
  2. // contains filtered or unexported fields
  3. }

A LineReader reads a sequence of LineEntry structures from a DWARF “line”
section for a single compilation unit. LineEntries occur in order of increasing
PC and each LineEntry gives metadata for the instructions from that LineEntry’s
PC to just before the next LineEntry’s PC. The last entry will have its
EndSequence field set.

func (*LineReader) Next

  1. func (r *LineReader) Next(entry *LineEntry) error

Next sets *entry to the next row in this line table and moves to the next row.
If there are no more entries and the line table is properly terminated, it
returns io.EOF.

Rows are always in order of increasing entry.Address, but entry.Line may go
forward or backward.

func (*LineReader) Reset

  1. func (r *LineReader) Reset()

Reset repositions the line table reader at the beginning of the line table.

func (*LineReader) Seek

  1. func (r *LineReader) Seek(pos LineReaderPos)

Seek restores the line table reader to a position returned by Tell.

The argument pos must have been returned by a call to Tell on this line table.

func (*LineReader) SeekPC

  1. func (r *LineReader) SeekPC(pc uint64, entry *LineEntry) error

SeekPC sets *entry to the LineEntry that includes pc and positions the reader on
the next entry in the line table. If necessary, this will seek backwards to find
pc.

If pc is not covered by any entry in this line table, SeekPC returns
ErrUnknownPC. In this case, *entry and the final seek position are unspecified.

Note that DWARF line tables only permit sequential, forward scans. Hence, in the
worst case, this takes time linear in the size of the line table. If the caller
wishes to do repeated fast PC lookups, it should build an appropriate index of
the line table.

func (*LineReader) Tell

  1. func (r *LineReader) Tell() LineReaderPos

Tell returns the current position in the line table.

type LineReaderPos

  1. type LineReaderPos struct {
  2. // contains filtered or unexported fields
  3. }

A LineReaderPos represents a position in a line table.

type Offset

  1. type Offset uint32

An Offset represents the location of an Entry within the DWARF info. (See
Reader.Seek.)

type PtrType

  1. type PtrType struct {
  2. CommonType
  3. Type Type
  4. }

A PtrType represents a pointer type.

func (*PtrType) String

  1. func (t *PtrType) String() string

type QualType

  1. type QualType struct {
  2. CommonType
  3. Qual string
  4. Type Type
  5. }

A QualType represents a type that has the C/C++ “const”, “restrict”, or
“volatile” qualifier.

func (*QualType) Size

  1. func (t *QualType) Size() int64

func (*QualType) String

  1. func (t *QualType) String() string

type Reader

  1. type Reader struct {
  2. // contains filtered or unexported fields
  3. }

A Reader allows reading Entry structures from a DWARF ``info’’ section. The
Entry structures are arranged in a tree. The Reader’s Next function return
successive entries from a pre-order traversal of the tree. If an entry has
children, its Children field will be true, and the children follow, terminated
by an Entry with Tag 0.

func (*Reader) AddressSize

  1. func (r *Reader) AddressSize() int

AddressSize returns the size in bytes of addresses in the current compilation
unit.

func (*Reader) Next

  1. func (r *Reader) Next() (*Entry, error)

Next reads the next entry from the encoded entry stream. It returns nil, nil
when it reaches the end of the section. It returns an error if the current
offset is invalid or the data at the offset cannot be decoded as a valid Entry.

func (*Reader) Seek

  1. func (r *Reader) Seek(off Offset)

Seek positions the Reader at offset off in the encoded entry stream. Offset 0
can be used to denote the first entry.

func (*Reader) SeekPC

  1. func (r *Reader) SeekPC(pc uint64) (*Entry, error)

SeekPC returns the Entry for the compilation unit that includes pc, and
positions the reader to read the children of that unit. If pc is not covered by
any unit, SeekPC returns ErrUnknownPC and the position of the reader is
undefined.

Because compilation units can describe multiple regions of the executable, in
the worst case SeekPC must search through all the ranges in all the compilation
units. Each call to SeekPC starts the search at the compilation unit of the last
call, so in general looking up a series of PCs will be faster if they are
sorted. If the caller wishes to do repeated fast PC lookups, it should build an
appropriate index using the Ranges method.

func (*Reader) SkipChildren

  1. func (r *Reader) SkipChildren()

SkipChildren skips over the child entries associated with the last Entry
returned by Next. If that Entry did not have children or Next has not been
called, SkipChildren is a no-op.

type StructField

  1. type StructField struct {
  2. Name string
  3. Type Type
  4. ByteOffset int64
  5. ByteSize int64 // usually zero; use Type.Size() for normal fields
  6. BitOffset int64 // within the ByteSize bytes at ByteOffset
  7. BitSize int64 // zero if not a bit field
  8. }

A StructField represents a field in a struct, union, or C++ class type.

type StructType

  1. type StructType struct {
  2. CommonType
  3. StructName string
  4. Kind string // "struct", "union", or "class".
  5. Field []*StructField
  6. Incomplete bool // if true, struct, union, class is declared but not defined
  7. }

A StructType represents a struct, union, or C++ class type.

func (*StructType) Defn

  1. func (t *StructType) Defn() string

func (*StructType) String

  1. func (t *StructType) String() string

type Tag

  1. type Tag uint32

A Tag is the classification (the type) of an Entry.

  1. const (
  2. TagArrayType Tag = 0x01
  3. TagClassType Tag = 0x02
  4. TagEntryPoint Tag = 0x03
  5. TagEnumerationType Tag = 0x04
  6. TagFormalParameter Tag = 0x05
  7. TagImportedDeclaration Tag = 0x08
  8. TagLabel Tag = 0x0A
  9. TagLexDwarfBlock Tag = 0x0B
  10. TagMember Tag = 0x0D
  11. TagPointerType Tag = 0x0F
  12. TagReferenceType Tag = 0x10
  13. TagCompileUnit Tag = 0x11
  14. TagStringType Tag = 0x12
  15. TagStructType Tag = 0x13
  16. TagSubroutineType Tag = 0x15
  17. TagTypedef Tag = 0x16
  18. TagUnionType Tag = 0x17
  19. TagUnspecifiedParameters Tag = 0x18
  20. TagVariant Tag = 0x19
  21. TagCommonDwarfBlock Tag = 0x1A
  22. TagCommonInclusion Tag = 0x1B
  23. TagInheritance Tag = 0x1C
  24. TagInlinedSubroutine Tag = 0x1D
  25. TagModule Tag = 0x1E
  26. TagPtrToMemberType Tag = 0x1F
  27. TagSetType Tag = 0x20
  28. TagSubrangeType Tag = 0x21
  29. TagWithStmt Tag = 0x22
  30. TagAccessDeclaration Tag = 0x23
  31. TagBaseType Tag = 0x24
  32. TagCatchDwarfBlock Tag = 0x25
  33. TagConstType Tag = 0x26
  34. TagConstant Tag = 0x27
  35. TagEnumerator Tag = 0x28
  36. TagFileType Tag = 0x29
  37. TagFriend Tag = 0x2A
  38. TagNamelist Tag = 0x2B
  39. TagNamelistItem Tag = 0x2C
  40. TagPackedType Tag = 0x2D
  41. TagSubprogram Tag = 0x2E
  42. TagTemplateTypeParameter Tag = 0x2F
  43. TagTemplateValueParameter Tag = 0x30
  44. TagThrownType Tag = 0x31
  45. TagTryDwarfBlock Tag = 0x32
  46. TagVariantPart Tag = 0x33
  47. TagVariable Tag = 0x34
  48. TagVolatileType Tag = 0x35
  49. // The following are new in DWARF 3.
  50. TagDwarfProcedure Tag = 0x36
  51. TagRestrictType Tag = 0x37
  52. TagInterfaceType Tag = 0x38
  53. TagNamespace Tag = 0x39
  54. TagImportedModule Tag = 0x3A
  55. TagUnspecifiedType Tag = 0x3B
  56. TagPartialUnit Tag = 0x3C
  57. TagImportedUnit Tag = 0x3D
  58. TagMutableType Tag = 0x3E // Later removed from DWARF.
  59. TagCondition Tag = 0x3F
  60. TagSharedType Tag = 0x40
  61. // The following are new in DWARF 4.
  62. TagTypeUnit Tag = 0x41
  63. TagRvalueReferenceType Tag = 0x42
  64. TagTemplateAlias Tag = 0x43
  65. )

func (Tag) GoString

  1. func (t Tag) GoString() string

func (Tag) String

  1. func (t Tag) String() string

type Type

  1. type Type interface {
  2. Common() *CommonType
  3. String() string
  4. Size() int64
  5. }

A Type conventionally represents a pointer to any of the specific Type
structures (CharType, StructType, etc.).

type TypedefType

  1. type TypedefType struct {
  2. CommonType
  3. Type Type
  4. }

A TypedefType represents a named type.

func (*TypedefType) Size

  1. func (t *TypedefType) Size() int64

func (*TypedefType) String

  1. func (t *TypedefType) String() string

type UcharType

  1. type UcharType struct {
  2. BasicType
  3. }

A UcharType represents an unsigned character type.

type UintType

  1. type UintType struct {
  2. BasicType
  3. }

A UintType represents an unsigned integer type.

type UnspecifiedType

  1. type UnspecifiedType struct {
  2. BasicType
  3. }

An UnspecifiedType represents an implicit, unknown, ambiguous or nonexistent
type.

type VoidType

  1. type VoidType struct {
  2. CommonType
  3. }

A VoidType represents the C void type.

func (*VoidType) String

  1. func (t *VoidType) String() string