Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrWriteCore is returned when attempting to write to the core // process memory. ErrWriteCore = errors.New("can not write to core process") // ErrShortRead is returned on a short read. ErrShortRead = errors.New("short read") // ErrContinueCore is returned when trying to continue execution of a core process. ErrContinueCore = errors.New("can not continue execution of core process") // ErrChangeRegisterCore is returned when trying to change register values for core files. ErrChangeRegisterCore = errors.New("can not change register values of core process") )
var ErrNoThreads = errors.New("no threads found in core file")
ErrNoThreads core file did not contain any threads.
var ErrUnrecognizedFormat = errors.New("unrecognized core format")
ErrUnrecognizedFormat is returned when the core file is not recognized as any of the supported formats.
Functions ¶
Types ¶
type SplicedMemory ¶
type SplicedMemory struct {
// contains filtered or unexported fields
}
A SplicedMemory represents a memory space formed from multiple regions, each of which may override previously regions. For example, in the following core, the program text was loaded at 0x400000: Start End Page Offset 0x0000000000400000 0x000000000044f000 0x0000000000000000 but then it's partially overwritten with an RW mapping whose data is stored in the core file:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000004000 0x000000000049a000 0x0000000000000000 0x0000000000002000 0x0000000000002000 RW 1000
This can be represented in a SplicedMemory by adding the original region, then putting the RW mapping on top of it.
func (*SplicedMemory) Add ¶
func (r *SplicedMemory) Add(reader proc.MemoryReader, off, length uint64)
Add adds a new region to the SplicedMemory, which may override existing regions.
func (*SplicedMemory) ReadMemory ¶
func (r *SplicedMemory) ReadMemory(buf []byte, addr uint64) (n int, err error)
ReadMemory implements MemoryReader.ReadMemory.