Documentation

Overview

Package crash is a generated protocol buffer package.

It is generated from these files:

crash.proto

It has these top-level messages:

StackEntry
Instruction
Register
Info
Entry
Crash

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crash

type Crash struct {
	Entry            `protobuf:"bytes,1,req,name=entry,embedded=entry" json:"entry"`
	Data             []byte `protobuf:"bytes,2,opt,name=data" json:"data"`
	XXX_unrecognized []byte `json:"-"`
}

Crash embeds Entry, so it contains all the information above as well as the full contents of the crashfile. This is suitable for sending on to distributed agents etc for further processing, and will marshal easily to JSON etc.

func (*Crash) GetData

func (m *Crash) GetData() []byte

func (*Crash) Marshal

func (m *Crash) Marshal() (data []byte, err error)

func (*Crash) MarshalTo

func (m *Crash) MarshalTo(data []byte) (n int, err error)

func (*Crash) ProtoMessage

func (*Crash) ProtoMessage()

func (*Crash) Reset

func (m *Crash) Reset()

func (*Crash) Size

func (m *Crash) Size() (n int)

func (*Crash) String

func (m *Crash) String() string

func (*Crash) Unmarshal

func (m *Crash) Unmarshal(data []byte) error

type Entry

type Entry struct {
	Info             `protobuf:"bytes,1,req,name=info,embedded=info" json:"info"`
	Timestamp        int64    `protobuf:"varint,2,opt,name=timestamp" json:"timestamp"`
	OrigFilename     string   `protobuf:"bytes,3,opt,name=orig_filename" json:"orig_filename"`
	SHA1             []byte   `protobuf:"bytes,4,opt,name=sha1" json:"sha1"`
	Command          []string `protobuf:"bytes,5,rep,name=command" json:"command"`
	XXX_unrecognized []byte   `json:"-"`
}

Entry embeds Info and adds some metadata. This is the entry that will be stored in the Bolt database to track crashfiles we have already seen. It does not contain the contents of the crashfile, to save space.

func (*Entry) GetCommand

func (m *Entry) GetCommand() []string

func (*Entry) GetOrigFilename

func (m *Entry) GetOrigFilename() string

func (*Entry) GetSHA1

func (m *Entry) GetSHA1() []byte

func (*Entry) GetTimestamp

func (m *Entry) GetTimestamp() int64

func (*Entry) Marshal

func (m *Entry) Marshal() (data []byte, err error)

func (*Entry) MarshalTo

func (m *Entry) MarshalTo(data []byte) (n int, err error)

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) Size

func (m *Entry) Size() (n int)

func (*Entry) String

func (m *Entry) String() string

func (*Entry) Unmarshal

func (m *Entry) Unmarshal(data []byte) error

type Info

type Info struct {
	Stack            []StackEntry  `protobuf:"bytes,1,rep,name=stack" json:"stack"`
	Registers        []Register    `protobuf:"bytes,2,rep,name=registers" json:"registers"`
	Disassembly      []Instruction `protobuf:"bytes,3,rep,name=disassembly" json:"disassembly"`
	FaultingInsn     Instruction   `protobuf:"bytes,4,opt,name=faulting_insn" json:"faulting_insn"`
	FaultingFrame    StackEntry    `protobuf:"bytes,5,opt,name=faulting_frame" json:"faulting_frame"`
	Hash             string        `protobuf:"bytes,6,opt,name=hash" json:"hash"`
	Classification   string        `protobuf:"bytes,7,opt,name=classification" json:"classification"`
	Extra            []string      `protobuf:"bytes,8,rep,name=extra" json:"extra"`
	XXX_unrecognized []byte        `json:"-"`
}

Info is just the information that we extract from the debugger. It is wrapped by CrashEntry, and that is wrapped by Crash.

func (*Info) GetClassification

func (m *Info) GetClassification() string

func (*Info) GetDisassembly

func (m *Info) GetDisassembly() []Instruction

func (*Info) GetExtra

func (m *Info) GetExtra() []string

func (*Info) GetFaultingFrame

func (m *Info) GetFaultingFrame() StackEntry

func (*Info) GetFaultingInsn

func (m *Info) GetFaultingInsn() Instruction

func (*Info) GetHash

func (m *Info) GetHash() string

func (*Info) GetRegisters

func (m *Info) GetRegisters() []Register

func (*Info) GetStack

func (m *Info) GetStack() []StackEntry

func (*Info) Marshal

func (m *Info) Marshal() (data []byte, err error)

func (*Info) MarshalTo

func (m *Info) MarshalTo(data []byte) (n int, err error)

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) Reset

func (m *Info) Reset()

func (*Info) Size

func (m *Info) Size() (n int)

func (*Info) String

func (m *Info) String() string

func (*Info) Unmarshal

func (m *Info) Unmarshal(data []byte) error

type Instruction

type Instruction struct {
	Address          uint64 `protobuf:"varint,1,req,name=address" json:"address"`
	Text             string `protobuf:"bytes,2,req,name=text" json:"text"`
	XXX_unrecognized []byte `json:"-"`
}

Instruction is a very simplistic instruction representation. For "real" analysis using Go I'd recommend the capstone disassembly library using the Go bindings at github.com/bnagy/gapstone

func (*Instruction) GetAddress

func (m *Instruction) GetAddress() uint64

func (*Instruction) GetText

func (m *Instruction) GetText() string

func (*Instruction) Marshal

func (m *Instruction) Marshal() (data []byte, err error)

func (*Instruction) MarshalTo

func (m *Instruction) MarshalTo(data []byte) (n int, err error)

func (*Instruction) ProtoMessage

func (*Instruction) ProtoMessage()

func (*Instruction) Reset

func (m *Instruction) Reset()

func (*Instruction) Size

func (m *Instruction) Size() (n int)

func (*Instruction) String

func (m *Instruction) String() string

func (*Instruction) Unmarshal

func (m *Instruction) Unmarshal(data []byte) error

type Register

type Register struct {
	Name             string `protobuf:"bytes,1,req,name=name" json:"name"`
	Value            uint64 `protobuf:"varint,2,req,name=value" json:"value"`
	XXX_unrecognized []byte `json:"-"`
}

Register represents one register

func (*Register) GetName

func (m *Register) GetName() string

func (*Register) GetValue

func (m *Register) GetValue() uint64

func (*Register) Marshal

func (m *Register) Marshal() (data []byte, err error)

func (*Register) MarshalTo

func (m *Register) MarshalTo(data []byte) (n int, err error)

func (*Register) ProtoMessage

func (*Register) ProtoMessage()

func (*Register) Reset

func (m *Register) Reset()

func (*Register) Size

func (m *Register) Size() (n int)

func (*Register) String

func (m *Register) String() string

func (*Register) Unmarshal

func (m *Register) Unmarshal(data []byte) error

type StackEntry

type StackEntry struct {
	Address          uint64 `protobuf:"varint,1,req,name=address" json:"address"`
	Symbol           string `protobuf:"bytes,2,req,name=symbol" json:"symbol"`
	Module           string `protobuf:"bytes,3,req,name=module" json:"module"`
	XXX_unrecognized []byte `json:"-"`
}

StackEntry represents one stack frame

func (*StackEntry) GetAddress

func (m *StackEntry) GetAddress() uint64

func (*StackEntry) GetModule

func (m *StackEntry) GetModule() string

func (*StackEntry) GetSymbol

func (m *StackEntry) GetSymbol() string

func (*StackEntry) Marshal

func (m *StackEntry) Marshal() (data []byte, err error)

func (*StackEntry) MarshalTo

func (m *StackEntry) MarshalTo(data []byte) (n int, err error)

func (*StackEntry) ProtoMessage

func (*StackEntry) ProtoMessage()

func (*StackEntry) Reset

func (m *StackEntry) Reset()

func (*StackEntry) Size

func (m *StackEntry) Size() (n int)

func (*StackEntry) String

func (m *StackEntry) String() string

func (*StackEntry) Unmarshal

func (m *StackEntry) Unmarshal(data []byte) error

Source Files