Documentation
¶
Index ¶
- Variables
- type BinaryLoader
- type DWARFLoader
- type FuncLoc
- type LinuxBinaryLoader
- func (l *LinuxBinaryLoader) FindVariableAddress(varName string) (uint64, error)
- func (l *LinuxBinaryLoader) GetDWARFLoader() (DWARFLoader, error)
- func (l *LinuxBinaryLoader) GetFile() any
- func (l *LinuxBinaryLoader) GetSymbols() (map[string]uint64, error)
- func (l *LinuxBinaryLoader) Load(filePath string) error
- func (l *LinuxBinaryLoader) LoadByPid(pid int) error
- func (l *LinuxBinaryLoader) PCToFuncLoc(addr uint64) *FuncLoc
- func (l *LinuxBinaryLoader) PtrSize() int
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BinaryLoader ¶ added in v0.7.0
type BinaryLoader interface {
// Load initializes the binary analysis from a file path
Load(filePath string) error
// LoadByPid initializes the binary analysis by process ID
LoadByPid(pid int) error
// GetSymbols returns all symbols from the binary
GetSymbols() (map[string]uint64, error)
// FindVariableAddress locates a specific variable's memory address
FindVariableAddress(varName string) (uint64, error)
// GetFile returns the underlying executable file object
GetFile() interface{}
// PtrSize returns the pointer size (4 for 32-bit, 8 for 64-bit)
PtrSize() int
PCToFuncLoc(addr uint64) *FuncLoc
// GetDWARFLoader returns the DWARF loader if available
GetDWARFLoader() (DWARFLoader, error)
}
func NewBinaryLoader ¶ added in v0.7.0
func NewBinaryLoader() BinaryLoader
type DWARFLoader ¶ added in v0.7.0
type DWARFLoader interface {
// Check if binary has DWARF info
HasDWARF() bool
// Get struct field offset
GetStructOffset(typeName, fieldName string) (uint64, error)
// Get nested struct field offset
GetNestedOffset(outerType, outerField, innerField string) (uint64, error)
// Get size of a struct type
GetStructSize(typeName string) (uint64, error)
}
BinaryLoader defines the interface for analyzing Go binaries
type FuncLoc ¶ added in v0.7.0
type LinuxBinaryLoader ¶ added in v0.7.0
type LinuxBinaryLoader struct {
// contains filtered or unexported fields
}
func (*LinuxBinaryLoader) FindVariableAddress ¶ added in v0.7.0
func (l *LinuxBinaryLoader) FindVariableAddress(varName string) (uint64, error)
func (*LinuxBinaryLoader) GetDWARFLoader ¶ added in v0.7.0
func (l *LinuxBinaryLoader) GetDWARFLoader() (DWARFLoader, error)
func (*LinuxBinaryLoader) GetFile ¶ added in v0.7.0
func (l *LinuxBinaryLoader) GetFile() any
func (*LinuxBinaryLoader) GetSymbols ¶ added in v0.7.0
func (l *LinuxBinaryLoader) GetSymbols() (map[string]uint64, error)
func (*LinuxBinaryLoader) Load ¶ added in v0.7.0
func (l *LinuxBinaryLoader) Load(filePath string) error
func (*LinuxBinaryLoader) LoadByPid ¶ added in v0.7.0
func (l *LinuxBinaryLoader) LoadByPid(pid int) error
func (*LinuxBinaryLoader) PCToFuncLoc ¶ added in v0.7.0
func (l *LinuxBinaryLoader) PCToFuncLoc(addr uint64) *FuncLoc
func (*LinuxBinaryLoader) PtrSize ¶ added in v0.7.0
func (l *LinuxBinaryLoader) PtrSize() int
Click to show internal directories.
Click to hide internal directories.