|
The Pedigree Project 0.1
|
Collaboration diagram for Backtrace: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.
| Backtrace::~Backtrace | ( | ) |
Definition at line 33 of file Backtrace.cc.
| uintptr_t Backtrace::getBasePointer | ( | size_t | n | ) |
Returns the base pointer of the n'th stack frame.
Definition at line 163 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 158 of file Backtrace.cc.
References m_pReturnAddresses.
| size_t Backtrace::numStackFrames | ( | ) |
Returns the number of stack frames retrieved.
Definition at line 154 of file Backtrace.cc.
References m_nStackFrames.
| 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 35 of file Backtrace.cc.
References KernelElf::instance(), performBpBacktrace(), and performDwarfBacktrace().
Referenced by Backtracer::execute().
Here is the caller graph for this function:| 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 82 of file Backtrace.cc.
References ProcessorBase::getBasePointer(), ProcessorBase::getInstructionPointer(), ProcessorBase::information(), m_nStackFrames, m_pBasePointers, m_pReturnAddresses, and m_pStates.
Referenced by SlamAllocator::allocate(), and performBacktrace().
Here is the caller graph for this function:
|
private |
Performs a DWARF backtrace.
Definition at line 56 of file Backtrace.cc.
References KernelElf::instance(), m_nStackFrames, m_pBasePointers, m_pReturnAddresses, m_pStates, and DwarfUnwinder::unwind().
Referenced by performBacktrace().
Here is the caller graph for this function:| void Backtrace::prettyPrint | ( | HugeStaticString & | buf, |
| size_t | nFrames = 0, |
||
| size_t | nFromFrame = 0 |
||
| ) |
Definition at line 119 of file Backtrace.cc.
|
friend |
Definition at line 33 of file Backtrace.h.
|
friend |
Definition at line 34 of file Backtrace.h.
|
friend |
Definition at line 35 of file Backtrace.h.
|
private |
The number of stack frames retrieved by a performBacktrace call.
Definition at line 98 of file Backtrace.h.
Referenced by numStackFrames(), performBpBacktrace(), and performDwarfBacktrace().
|
private |
The base pointers.
Definition at line 88 of file Backtrace.h.
Referenced by getBasePointer(), performBpBacktrace(), and performDwarfBacktrace().
|
private |
The return addresses.
Definition at line 84 of file Backtrace.h.
Referenced by SlamAllocator::allocate(), getReturnAddress(), performBpBacktrace(), and performDwarfBacktrace().
|
private |
Processor register states.
Definition at line 93 of file Backtrace.h.
Referenced by performBpBacktrace(), and performDwarfBacktrace().