Documentation
¶
Index ¶
- Constants
- func GetDebugSectionElf(f *elf.File, name string) ([]byte, error)
- func GetDebugSectionMacho(f *macho.File, name string) ([]byte, error)
- func GetDebugSectionPE(f *pe.File, name string) ([]byte, error)
- type AddrType
- type ArrayType
- type BasicType
- type BoolType
- type ChanType
- type CharType
- type CommonType
- type ComplexType
- type DotDotDotType
- type EnumType
- type EnumValue
- type FloatType
- type FuncType
- type IntType
- type InterfaceType
- type MapType
- type PtrType
- type QualType
- type SliceType
- type StringType
- type StructField
- type StructType
- type Type
- type TypedefType
- type UcharType
- type UintType
- type UnspecifiedType
- type VoidType
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func GetDebugSectionElf ¶ added in v1.1.0
GetDebugSectionElf returns the data contents of the specified debug section, decompressing it if it is compressed. For example GetDebugSectionElf("line") will return the contents of .debug_line, if .debug_line doesn't exist it will try to return the decompressed contents of .zdebug_line.
func GetDebugSectionMacho ¶ added in v1.1.0
GetDebugSectionMacho returns the data contents of the specified debug section, decompressing it if it is compressed. For example GetDebugSectionMacho("line") will return the contents of __debug_line, if __debug_line doesn't exist it will try to return the decompressed contents of __zdebug_line.
func GetDebugSectionPE ¶ added in v1.1.0
GetDebugSectionPE returns the data contents of the specified debug section, decompressing it if it is compressed. For example GetDebugSectionPE("line") will return the contents of .debug_line, if .debug_line doesn't exist it will try to return the decompressed contents of .zdebug_line.
Types ¶
type ArrayType ¶
type ArrayType struct {
CommonType
Type Type
StrideBitSize int64 // if > 0, number of bits to hold each element
Count int64 // if == -1, an incomplete array, like char x[].
}
An ArrayType represents a fixed size array type.
type BasicType ¶
type BasicType struct {
CommonType
BitSize int64
BitOffset int64
}
A BasicType holds fields common to all basic types.
type ChanType ¶
type ChanType struct {
TypedefType
ElemType Type
}
A ChanType represents a Go channel type.
type CommonType ¶
type CommonType struct {
ByteSize int64 // size of value of this type, in bytes
Name string // name that can be used to refer to type
ReflectKind reflect.Kind // the reflect kind of the type.
Offset dwarf.Offset // the offset at which this type was read
}
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 ¶
func (c *CommonType) Common() *CommonType
func (*CommonType) Size ¶
func (c *CommonType) Size() int64
type ComplexType ¶
type ComplexType struct {
BasicType
}
A ComplexType represents a complex floating point type.
type DotDotDotType ¶
type DotDotDotType struct {
CommonType
}
A DotDotDotType represents the variadic ... function parameter.
func (*DotDotDotType) String ¶
func (t *DotDotDotType) String() string
type EnumType ¶
type EnumType struct {
CommonType
EnumName string
Val []*EnumValue
}
An EnumType represents an enumerated type. The only indication of its native integer type is its ByteSize (inside CommonType).
type FuncType ¶
type FuncType struct {
CommonType
ReturnType Type
ParamType []Type
}
A FuncType represents a function type.
type InterfaceType ¶
type InterfaceType struct {
TypedefType
}
An InterfaceType represents a Go interface.
func (*InterfaceType) String ¶
func (t *InterfaceType) String() string
type MapType ¶
type MapType struct {
TypedefType
KeyType Type
ElemType Type
}
A MapType represents a Go map type. It looks like a TypedefType, describing the runtime-internal structure, with extra fields.
type QualType ¶
type QualType struct {
CommonType
Qual string
Type Type
}
A QualType represents a type that has the C/C++ "const", "restrict", or "volatile" qualifier.
type SliceType ¶
type SliceType struct {
StructType
ElemType Type
}
A SliceType represents a Go slice type. It looks like a StructType, describing the runtime-internal structure, with extra fields.
type StringType ¶
type StringType struct {
StructType
}
A StringType represents a Go string type. It looks like a StructType, describing the runtime-internal structure, but we wrap it for neatness.
func (*StringType) String ¶
func (t *StringType) String() string
type StructField ¶
type StructField struct {
Name string
Type Type
ByteOffset int64
ByteSize int64
BitOffset int64 // within the ByteSize bytes at ByteOffset
BitSize int64 // zero if not a bit field
Embedded bool
}
A StructField represents a field in a struct, union, or C++ class type.
type StructType ¶
type StructType struct {
CommonType
StructName string
Kind string // "struct", "union", or "class".
Field []*StructField
Incomplete bool // if true, struct, union, class is declared but not defined
}
A StructType represents a struct, union, or C++ class type.
func (*StructType) Defn ¶
func (t *StructType) Defn() string
func (*StructType) String ¶
func (t *StructType) String() string
type Type ¶
type Type interface {
Common() *CommonType
String() string
Size() int64
}
A Type conventionally represents a pointer to any of the specific Type structures (CharType, StructType, etc.). TODO: remove this use dwarf.Type
type TypedefType ¶
type TypedefType struct {
CommonType
Type Type
}
A TypedefType represents a named type.
func (*TypedefType) Size ¶
func (t *TypedefType) Size() int64
func (*TypedefType) String ¶
func (t *TypedefType) String() string
type UcharType ¶
type UcharType struct {
BasicType
}
A UcharType represents an unsigned character type.
type UnspecifiedType ¶
type UnspecifiedType struct {
BasicType
}
An UnspecifiedType represents an implicit, unknown, ambiguous or nonexistent type.