Add previous CPU state member and associated accessors.
Used to store the unwound state of the CPU from this frame, which will form the actual state of the following frame. Needed in order to properly support continuation of unwinding from a partial stack trace.
This commit is contained in:
parent
09aaa658b0
commit
a9bec97e47
@ -25,6 +25,7 @@ StackFrame::StackFrame(stack_frame_type type, CpuState* cpuState,
|
||||
:
|
||||
fType(type),
|
||||
fCpuState(cpuState),
|
||||
fPreviousCpuState(NULL),
|
||||
fFrameAddress(frameAddress),
|
||||
fInstructionPointer(instructionPointer),
|
||||
fReturnAddress(0),
|
||||
@ -49,6 +50,7 @@ StackFrame::~StackFrame()
|
||||
|
||||
SetImage(NULL);
|
||||
SetFunction(NULL);
|
||||
SetPreviousCpuState(NULL);
|
||||
|
||||
fDebugInfo->ReleaseReference();
|
||||
fCpuState->ReleaseReference();
|
||||
@ -80,6 +82,18 @@ StackFrame::Init()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
StackFrame::SetPreviousCpuState(CpuState* state)
|
||||
{
|
||||
if (fPreviousCpuState != NULL)
|
||||
fPreviousCpuState->ReleaseReference();
|
||||
|
||||
fPreviousCpuState = state;
|
||||
|
||||
if (fPreviousCpuState != NULL)
|
||||
fPreviousCpuState->AcquireReference();
|
||||
}
|
||||
|
||||
void
|
||||
StackFrame::SetReturnAddress(target_addr_t address)
|
||||
{
|
||||
|
@ -55,6 +55,10 @@ public:
|
||||
target_addr_t InstructionPointer() const
|
||||
{ return fInstructionPointer; }
|
||||
|
||||
CpuState* GetPreviousCpuState() const
|
||||
{ return fPreviousCpuState; }
|
||||
void SetPreviousCpuState(CpuState* state);
|
||||
|
||||
target_addr_t ReturnAddress() const { return fReturnAddress; }
|
||||
void SetReturnAddress(target_addr_t address);
|
||||
|
||||
@ -89,6 +93,7 @@ private:
|
||||
private:
|
||||
stack_frame_type fType;
|
||||
CpuState* fCpuState;
|
||||
CpuState* fPreviousCpuState;
|
||||
target_addr_t fFrameAddress;
|
||||
target_addr_t fInstructionPointer;
|
||||
target_addr_t fReturnAddress;
|
||||
|
Loading…
Reference in New Issue
Block a user