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 ¶
- type Crash
- func (m *Crash) GetData() []byte
- func (m *Crash) Marshal() (data []byte, err error)
- func (m *Crash) MarshalTo(data []byte) (n int, err error)
- func (*Crash) ProtoMessage()
- func (m *Crash) Reset()
- func (m *Crash) Size() (n int)
- func (m *Crash) String() string
- func (m *Crash) Unmarshal(data []byte) error
- type Entry
- func (m *Entry) GetCommand() []string
- func (m *Entry) GetOrigFilename() string
- func (m *Entry) GetSHA1() []byte
- func (m *Entry) GetTimestamp() int64
- func (m *Entry) Marshal() (data []byte, err error)
- func (m *Entry) MarshalTo(data []byte) (n int, err error)
- func (*Entry) ProtoMessage()
- func (m *Entry) Reset()
- func (m *Entry) Size() (n int)
- func (m *Entry) String() string
- func (m *Entry) Unmarshal(data []byte) error
- type Info
- func (m *Info) GetClassification() string
- func (m *Info) GetDisassembly() []Instruction
- func (m *Info) GetExtra() []string
- func (m *Info) GetFaultingFrame() StackEntry
- func (m *Info) GetFaultingInsn() Instruction
- func (m *Info) GetHash() string
- func (m *Info) GetRegisters() []Register
- func (m *Info) GetStack() []StackEntry
- func (m *Info) Marshal() (data []byte, err error)
- func (m *Info) MarshalTo(data []byte) (n int, err error)
- func (*Info) ProtoMessage()
- func (m *Info) Reset()
- func (m *Info) Size() (n int)
- func (m *Info) String() string
- func (m *Info) Unmarshal(data []byte) error
- type Instruction
- func (m *Instruction) GetAddress() uint64
- func (m *Instruction) GetText() string
- func (m *Instruction) Marshal() (data []byte, err error)
- func (m *Instruction) MarshalTo(data []byte) (n int, err error)
- func (*Instruction) ProtoMessage()
- func (m *Instruction) Reset()
- func (m *Instruction) Size() (n int)
- func (m *Instruction) String() string
- func (m *Instruction) Unmarshal(data []byte) error
- type Register
- func (m *Register) GetName() string
- func (m *Register) GetValue() uint64
- func (m *Register) Marshal() (data []byte, err error)
- func (m *Register) MarshalTo(data []byte) (n int, err error)
- func (*Register) ProtoMessage()
- func (m *Register) Reset()
- func (m *Register) Size() (n int)
- func (m *Register) String() string
- func (m *Register) Unmarshal(data []byte) error
- type StackEntry
- func (m *StackEntry) GetAddress() uint64
- func (m *StackEntry) GetModule() string
- func (m *StackEntry) GetSymbol() string
- func (m *StackEntry) Marshal() (data []byte, err error)
- func (m *StackEntry) MarshalTo(data []byte) (n int, err error)
- func (*StackEntry) ProtoMessage()
- func (m *StackEntry) Reset()
- func (m *StackEntry) Size() (n int)
- func (m *StackEntry) String() string
- func (m *StackEntry) Unmarshal(data []byte) error
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) ProtoMessage ¶
func (*Crash) ProtoMessage()
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 (*Entry) GetOrigFilename ¶
func (*Entry) GetTimestamp ¶
func (*Entry) ProtoMessage ¶
func (*Entry) ProtoMessage()
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 (*Info) GetDisassembly ¶
func (m *Info) GetDisassembly() []Instruction
func (*Info) GetFaultingFrame ¶
func (m *Info) GetFaultingFrame() StackEntry
func (*Info) GetFaultingInsn ¶
func (m *Info) GetFaultingInsn() Instruction
func (*Info) GetRegisters ¶
func (*Info) GetStack ¶
func (m *Info) GetStack() []StackEntry
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
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) 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) ProtoMessage ¶
func (*Register) ProtoMessage()
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) 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