Save and restore the current inlined depth over function calls.

llvm-svn: 163433
This commit is contained in:
Jim Ingham 2012-09-07 23:36:43 +00:00
parent 6cd41da75d
commit 625fca7c5a
2 changed files with 6 additions and 1 deletions

View File

@ -128,6 +128,8 @@ public:
uint32_t orig_stop_id; // Dunno if I need this yet but it is an interesting bit of data.
lldb::StopInfoSP stop_info_sp; // You have to restore the stop info or you might continue with the wrong signals.
RegisterCheckpoint register_backup; // You need to restore the registers, of course...
uint32_t current_inlined_depth;
lldb::addr_t current_inlined_pc;
};
static void
@ -280,7 +282,7 @@ public:
uint32_t
GetCurrentInlinedDepth()
{
return GetStackFrameList()->DecrementCurrentInlinedDepth();
return GetStackFrameList()->GetCurrentInlinedDepth();
}
virtual lldb::StackFrameSP

View File

@ -241,6 +241,8 @@ Thread::CheckpointThreadState (ThreadStateCheckpoint &saved_state)
ProcessSP process_sp (GetProcess());
if (process_sp)
saved_state.orig_stop_id = process_sp->GetStopID();
saved_state.current_inlined_depth = GetCurrentInlinedDepth();
return true;
}
@ -251,6 +253,7 @@ Thread::RestoreThreadStateFromCheckpoint (ThreadStateCheckpoint &saved_state)
if (saved_state.stop_info_sp)
saved_state.stop_info_sp->MakeStopInfoValid();
SetStopInfo(saved_state.stop_info_sp);
GetStackFrameList()->SetCurrentInlinedDepth (saved_state.current_inlined_depth);
return true;
}