debug

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package debug contains the logic of the 'debug' sub command, this is a lot of code which is fairly distinct from the other sub commands of edb. Because of the amount of files it is placed in its own package for organizational purposes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugCmd

func DebugCmd() *cobra.Command

Types

type Breakpoint

type Breakpoint interface {
	ShouldBreak(process *mimic.Process) bool
	Enabled() bool
	Enable()
	Disable()
}

type CmdArg

type CmdArg struct {
	Name     string
	Required bool
}

type CmdFn

type CmdFn func(args []string)

type Command

type Command struct {
	Name             string
	Summary          string
	Description      string
	Aliases          []string
	Exec             CmdFn
	Args             []CmdArg
	Subcommands      []Command
	CustomCompletion CompletionFn
}

type CompletionFn

type CompletionFn func(args []string) []prompt.Suggest

type DET

type DET struct {
	Tree EntryNode

	// Entry per file, per line
	EntriesPerLoc map[string]map[int64][]*EntryNode

	// SubPrograms by name
	SubPrograms map[string]*EntryNode
	//
	EntitiesByOffset map[dwarf.Offset]*EntryNode
}

DET DWARF Entry table, holds the parsed DWARF entries, used for quick lookups

type EntryNode

type EntryNode struct {
	Parent   *EntryNode
	Entry    *dwarf.Entry
	Children []*EntryNode
}

func (*EntryNode) Print

func (e *EntryNode) Print(indent int)

type FileLineBreakpoint

type FileLineBreakpoint struct {
	File string
	Line int
	// contains filtered or unexported fields
}

FileLineBreakpoint breaks when on a specific file or line, no matter the program

func (*FileLineBreakpoint) Disable

func (ab *FileLineBreakpoint) Disable()

func (*FileLineBreakpoint) Enable

func (ab *FileLineBreakpoint) Enable()

func (*FileLineBreakpoint) Enabled

func (ab *FileLineBreakpoint) Enabled() bool

func (*FileLineBreakpoint) ShouldBreak

func (fl *FileLineBreakpoint) ShouldBreak(process *mimic.Process) bool

type InstructionBreakpoint

type InstructionBreakpoint struct {
	Program        *ebpf.ProgramSpec
	ProgramCounter int
	// contains filtered or unexported fields
}

InstructionBreakpoint breaks only on an exact PI + PC combo

func (*InstructionBreakpoint) Disable

func (ab *InstructionBreakpoint) Disable()

func (*InstructionBreakpoint) Enable

func (ab *InstructionBreakpoint) Enable()

func (*InstructionBreakpoint) Enabled

func (ab *InstructionBreakpoint) Enabled() bool

func (*InstructionBreakpoint) ShouldBreak

func (ib *InstructionBreakpoint) ShouldBreak(process *mimic.Process) bool

type Macro

type Macro struct {
	File     string
	Saved    bool
	Commands []string
}

Jump to

Keyboard shortcuts

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