forked from OSchip/llvm-project
Save and restore the current inlined depth over function calls.
llvm-svn: 163433
This commit is contained in:
parent
6cd41da75d
commit
625fca7c5a
lldb
|
@ -128,6 +128,8 @@ public:
|
||||||
uint32_t orig_stop_id; // Dunno if I need this yet but it is an interesting bit of data.
|
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.
|
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...
|
RegisterCheckpoint register_backup; // You need to restore the registers, of course...
|
||||||
|
uint32_t current_inlined_depth;
|
||||||
|
lldb::addr_t current_inlined_pc;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -280,7 +282,7 @@ public:
|
||||||
uint32_t
|
uint32_t
|
||||||
GetCurrentInlinedDepth()
|
GetCurrentInlinedDepth()
|
||||||
{
|
{
|
||||||
return GetStackFrameList()->DecrementCurrentInlinedDepth();
|
return GetStackFrameList()->GetCurrentInlinedDepth();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual lldb::StackFrameSP
|
virtual lldb::StackFrameSP
|
||||||
|
|
|
@ -241,6 +241,8 @@ Thread::CheckpointThreadState (ThreadStateCheckpoint &saved_state)
|
||||||
ProcessSP process_sp (GetProcess());
|
ProcessSP process_sp (GetProcess());
|
||||||
if (process_sp)
|
if (process_sp)
|
||||||
saved_state.orig_stop_id = process_sp->GetStopID();
|
saved_state.orig_stop_id = process_sp->GetStopID();
|
||||||
|
saved_state.current_inlined_depth = GetCurrentInlinedDepth();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,6 +253,7 @@ Thread::RestoreThreadStateFromCheckpoint (ThreadStateCheckpoint &saved_state)
|
||||||
if (saved_state.stop_info_sp)
|
if (saved_state.stop_info_sp)
|
||||||
saved_state.stop_info_sp->MakeStopInfoValid();
|
saved_state.stop_info_sp->MakeStopInfoValid();
|
||||||
SetStopInfo(saved_state.stop_info_sp);
|
SetStopInfo(saved_state.stop_info_sp);
|
||||||
|
GetStackFrameList()->SetCurrentInlinedDepth (saved_state.current_inlined_depth);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue