crashwalk: github.com/bnagy/crashwalk/crash Index | Files

package crash

import "github.com/bnagy/crashwalk/crash"

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

Package Files

crash.pb.go

type Crash Uses

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 Uses

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

func (*Crash) Marshal Uses

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

func (*Crash) MarshalTo Uses

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

func (*Crash) ProtoMessage Uses

func (*Crash) ProtoMessage()

func (*Crash) Reset Uses

func (m *Crash) Reset()

func (*Crash) Size Uses

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

func (*Crash) String Uses

func (m *Crash) String() string

func (*Crash) Unmarshal Uses

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

type Entry Uses

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 Uses

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

func (*Entry) GetOrigFilename Uses

func (m *Entry) GetOrigFilename() string

func (*Entry) GetSHA1 Uses

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

func (*Entry) GetTimestamp Uses

func (m *Entry) GetTimestamp() int64

func (*Entry) Marshal Uses

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

func (*Entry) MarshalTo Uses

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

func (*Entry) ProtoMessage Uses

func (*Entry) ProtoMessage()

func (*Entry) Reset Uses

func (m *Entry) Reset()

func (*Entry) Size Uses

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

func (*Entry) String Uses

func (m *Entry) String() string

func (*Entry) Unmarshal Uses

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

type Info Uses

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 Uses

func (m *Info) GetClassification() string

func (*Info) GetDisassembly Uses

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

func (*Info) GetExtra Uses

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

func (*Info) GetFaultingFrame Uses

func (m *Info) GetFaultingFrame() StackEntry

func (*Info) GetFaultingInsn Uses

func (m *Info) GetFaultingInsn() Instruction

func (*Info) GetHash Uses

func (m *Info) GetHash() string

func (*Info) GetRegisters Uses

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

func (*Info) GetStack Uses

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

func (*Info) Marshal Uses

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

func (*Info) MarshalTo Uses

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

func (*Info) ProtoMessage Uses

func (*Info) ProtoMessage()

func (*Info) Reset Uses

func (m *Info) Reset()

func (*Info) Size Uses

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

func (*Info) String Uses

func (m *Info) String() string

func (*Info) Unmarshal Uses

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

type Instruction Uses

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 Uses

func (m *Instruction) GetAddress() uint64

func (*Instruction) GetText Uses

func (m *Instruction) GetText() string

func (*Instruction) Marshal Uses

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

func (*Instruction) MarshalTo Uses

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

func (*Instruction) ProtoMessage Uses

func (*Instruction) ProtoMessage()

func (*Instruction) Reset Uses

func (m *Instruction) Reset()

func (*Instruction) Size Uses

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

func (*Instruction) String Uses

func (m *Instruction) String() string

func (*Instruction) Unmarshal Uses

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

type Register Uses

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 Uses

func (m *Register) GetName() string

func (*Register) GetValue Uses

func (m *Register) GetValue() uint64

func (*Register) Marshal Uses

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

func (*Register) MarshalTo Uses

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

func (*Register) ProtoMessage Uses

func (*Register) ProtoMessage()

func (*Register) Reset Uses

func (m *Register) Reset()

func (*Register) Size Uses

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

func (*Register) String Uses

func (m *Register) String() string

func (*Register) Unmarshal Uses

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

type StackEntry Uses

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 Uses

func (m *StackEntry) GetAddress() uint64

func (*StackEntry) GetModule Uses

func (m *StackEntry) GetModule() string

func (*StackEntry) GetSymbol Uses

func (m *StackEntry) GetSymbol() string

func (*StackEntry) Marshal Uses

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

func (*StackEntry) MarshalTo Uses

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

func (*StackEntry) ProtoMessage Uses

func (*StackEntry) ProtoMessage()

func (*StackEntry) Reset Uses

func (m *StackEntry) Reset()

func (*StackEntry) Size Uses

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

func (*StackEntry) String Uses

func (m *StackEntry) String() string

func (*StackEntry) Unmarshal Uses

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

Package crash imports 4 packages (graph) and is imported by 5 packages. Updated 2016-07-29. Refresh now. Tools for package owners.