The Pedigree Project
0.1
|
Public Member Functions | |
Backtrace () | |
void | performBacktrace (InterruptState &state) |
size_t | numStackFrames () |
uintptr_t | getReturnAddress (size_t n) |
uintptr_t | getBasePointer (size_t n) |
void | prettyPrint (HugeStaticString &buf, size_t nFrames=0, size_t nFromFrame=0) |
void | performBpBacktrace (uintptr_t base, uintptr_t instruction) |
Private Member Functions | |
void | performDwarfBacktrace (InterruptState &state) |
Private Attributes | |
uintptr_t | m_pReturnAddresses [MAX_STACK_FRAMES] |
uintptr_t | m_pBasePointers [MAX_STACK_FRAMES] |
ProcessorState | m_pStates [MAX_STACK_FRAMES] |
size_t | m_nStackFrames |
Friends | |
class | AllocationCommand |
class | LocksCommand |
class | SlamAllocator |
Definition at line 32 of file Backtrace.h.
Backtrace::Backtrace | ( | ) |
Creates a new Backtrace object.
Definition at line 31 of file Backtrace.cc.
uintptr_t Backtrace::getBasePointer | ( | size_t | n | ) |
Returns the base pointer of the n'th stack frame.
Definition at line 242 of file Backtrace.cc.
References m_pBasePointers.
uintptr_t Backtrace::getReturnAddress | ( | size_t | n | ) |
Returns the return address of the n'th stack frame.
Definition at line 236 of file Backtrace.cc.
References m_pReturnAddresses.
Referenced by LocksCommand::setFatal().
size_t Backtrace::numStackFrames | ( | ) |
Returns the number of stack frames retrieved.
Definition at line 231 of file Backtrace.cc.
References m_nStackFrames.
Referenced by LocksCommand::setFatal().
void Backtrace::performBacktrace | ( | InterruptState & | state | ) |
Performs a backtrace from the given base pointer address, or if none was specified, the current EBP location.
Definition at line 39 of file Backtrace.cc.
References KernelElf::instance(), performBpBacktrace(), and performDwarfBacktrace().
Referenced by Backtracer::execute().
void Backtrace::performBpBacktrace | ( | uintptr_t | base, |
uintptr_t | instruction | ||
) |
Performs a "normal" backtrace, based on following a linked list of frame pointers.
Definition at line 95 of file Backtrace.cc.
References Processor::getBasePointer(), Processor::getInstructionPointer(), KernelElf::globalLookupSymbol(), Processor::information(), KernelElf::instance(), VirtualAddressSpace::isMapped(), m_nStackFrames, m_pBasePointers, m_pReturnAddresses, and m_pStates.
Referenced by SlamAllocator::allocate(), AllocationCommand::execute(), performBacktrace(), and LocksCommand::setFatal().
|
private |
Performs a DWARF backtrace.
Definition at line 65 of file Backtrace.cc.
References KernelElf::instance(), m_nStackFrames, m_pBasePointers, m_pReturnAddresses, m_pStates, and DwarfUnwinder::unwind().
Referenced by performBacktrace().
|
private |
The number of stack frames retrieved by a performBacktrace call.
Definition at line 102 of file Backtrace.h.
Referenced by numStackFrames(), performBpBacktrace(), and performDwarfBacktrace().
|
private |
The base pointers.
Definition at line 92 of file Backtrace.h.
Referenced by getBasePointer(), performBpBacktrace(), and performDwarfBacktrace().
|
private |
The return addresses.
Definition at line 88 of file Backtrace.h.
Referenced by SlamAllocator::allocate(), AllocationCommand::execute(), getReturnAddress(), performBpBacktrace(), and performDwarfBacktrace().
|
private |
Processor register states.
Definition at line 97 of file Backtrace.h.
Referenced by performBpBacktrace(), and performDwarfBacktrace().