core

package
v1.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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")
)
View Source
var ErrNoThreads = errors.New("no threads found in core file")

ErrNoThreads core file did not contain any threads.

View Source
var ErrUnrecognizedFormat = errors.New("unrecognized core format")

ErrUnrecognizedFormat is returned when the core file is not recognized as any of the supported formats.

Functions

func OpenCore

func OpenCore(corePath, exePath string, debugInfoDirs []string) (*proc.TargetGroup, error)

OpenCore will open the core file and return a *proc.TargetGroup. If the DWARF information cannot be found in the binary, Delve will look for external debug files in the directories passed in.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL