Documentation
¶
Overview ¶
Package faults records memory faults generated by a coprocessor.
Usage of the word "faults" is a shorthand and should probably be referred to as "memory faults" in a user facing context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category string
Category classifies the approximate reason for a memory fault
const ( // a program memory fault is special because it will always cause a fatal error ProgramMemory Category = "program memory" // these are general "memory faults" NullDereference Category = "null dereference" StackError Category = "stack collision" IllegalAddress Category = "illegal address" // these are memory faults but are usually treated as warnings MisalignedAddressing Category = "misaligned addressing" UnimplementedPeripheral Category = "unimplemented peripheral" // an undefined symbol is encountered when a symbol has not been resolved at load time. the // fault is raised whenever the symbol is encountered UndefinedSymbol Category = "undefined symbol" )
List of valid Category values
type Entry ¶
type Entry struct {
Category Category
// description of the event that triggered the memory fault
Event string
// addresses related to the fault
InstructionAddr uint32
AccessAddr uint32
// number of times this specific illegal access has been seen
Count int
}
Entry is a single entry in the fault log
type Faults ¶
type Faults struct {
// all the accesses in order of the first time they appear. the Count field
// in the IllegalAccessEntry can be used to see if that entry was seen more
// than once *after* the first appearance
Log []*Entry
// is true once a stack collision has been detected. once a stack collision
// has occured then subsequent illegal accesses cannot be trusted and will
// likely not be logged
HasStackCollision bool
// contains filtered or unexported fields
}
Faults records memory accesses by the coprocesser that are "illegal".
func (*Faults) Clear ¶
func (flt *Faults) Clear()
Clear all entries from faults log. Does not clear the HasStackCollision flag
Click to show internal directories.
Click to hide internal directories.