Documentation
¶
Index ¶
Constants ¶
View Source
const ( ElfClass64 = 2 ElfData2LSB = 1 ElfVersion = 1 ET_CORE = 4 PT_NOTE = 4 PT_LOAD = 1 )
ELF constants
Variables ¶
This section is empty.
Functions ¶
func GetELFMachine ¶
func GetELFMachine() uint16
GetELFMachine returns the ELF machine type for the current architecture.
Types ¶
type CoreInfo ¶
type CoreInfo struct {
Pid int
Threads []Thread
VMAs []VMA
Notes []Note
// File table for NT_FILE note
FileTable []FileEntry
}
CoreInfo contains all information needed to generate a core file.
type ELFWriter ¶
type ELFWriter struct {
// contains filtered or unexported fields
}
ELFWriter handles writing ELF core files
type FileEntry ¶
type FileEntry struct {
Start uintptr
End uintptr
FileOfs uint64
Dev uint64
Inode uint64
Path string
}
FileEntry represents a file in the NT_FILE note.
type LoadSegment ¶
LoadSegment represents a PT_LOAD segment
type NoteWriter ¶
type NoteWriter struct {
// contains filtered or unexported fields
}
NoteWriter handles writing ELF notes
func (*NoteWriter) Bytes ¶
func (nw *NoteWriter) Bytes() []byte
Bytes returns the written notes as bytes
func (*NoteWriter) Size ¶
func (nw *NoteWriter) Size() int
Size returns the total size of written notes
type VMA ¶
type VMA struct {
Start uintptr
End uintptr
Perms Perm
Offset uint64
Dev uint64
Inode uint64
Path string
Kind VMAKind
VmFlags []VMFlag // Memory advice flags from smaps
IsZero bool // True if this VMA should be zero-filled (no permissions)
// Internal fields for tracking
FileOffset uint64 // Offset in core file
MemSize uint64 // Size in core file
}
VMA represents a virtual memory area.
func (*VMA) IsDumpable ¶
IsDumpable returns true if the VMA should be included in the core dump.
Click to show internal directories.
Click to hide internal directories.