本文整理汇总了C++中lldb::SBFrame::GetFrameSP方法的典型用法代码示例。如果您正苦于以下问题:C++ SBFrame::GetFrameSP方法的具体用法?C++ SBFrame::GetFrameSP怎么用?C++ SBFrame::GetFrameSP使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lldb::SBFrame
的用法示例。
在下文中一共展示了SBFrame::GetFrameSP方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: frame_sp
bool
SBInstruction::EmulateWithFrame (lldb::SBFrame &frame, uint32_t evaluate_options)
{
if (m_opaque_sp)
{
lldb::StackFrameSP frame_sp (frame.GetFrameSP());
if (frame_sp)
{
lldb_private::ExecutionContext exe_ctx;
frame_sp->CalculateExecutionContext (exe_ctx);
lldb_private::Target *target = exe_ctx.GetTargetPtr();
lldb_private::ArchSpec arch = target->GetArchitecture();
return m_opaque_sp->Emulate (arch,
evaluate_options,
(void *) frame_sp.get(),
&lldb_private::EmulateInstruction::ReadMemoryFrame,
&lldb_private::EmulateInstruction::WriteMemoryFrame,
&lldb_private::EmulateInstruction::ReadRegisterFrame,
&lldb_private::EmulateInstruction::WriteRegisterFrame);
}
}
return false;
}
示例2: frame_sp
lldb::SBValueList
SBBlock::GetVariables (lldb::SBFrame& frame,
bool arguments,
bool locals,
bool statics,
lldb::DynamicValueType use_dynamic)
{
Block *block = GetPtr();
SBValueList value_list;
if (block)
{
StackFrameSP frame_sp(frame.GetFrameSP());
VariableListSP variable_list_sp (block->GetBlockVariableList (true));
if (variable_list_sp)
{
const size_t num_variables = variable_list_sp->GetSize();
if (num_variables)
{
for (size_t i = 0; i < num_variables; ++i)
{
VariableSP variable_sp (variable_list_sp->GetVariableAtIndex(i));
if (variable_sp)
{
bool add_variable = false;
switch (variable_sp->GetScope())
{
case eValueTypeVariableGlobal:
case eValueTypeVariableStatic:
add_variable = statics;
break;
case eValueTypeVariableArgument:
add_variable = arguments;
break;
case eValueTypeVariableLocal:
add_variable = locals;
break;
default:
break;
}
if (add_variable)
{
if (frame_sp)
{
lldb::ValueObjectSP valobj_sp(frame_sp->GetValueObjectForFrameVariable (variable_sp,eNoDynamicValues));
SBValue value_sb;
value_sb.SetSP(valobj_sp, use_dynamic);
value_list.Append (value_sb);
}
}
}
}
}
}
}
return value_list;
}
示例3: exe_ctx
void
SBThread::StepOutOfFrame (lldb::SBFrame &sb_frame)
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
StackFrameSP frame_sp (sb_frame.GetFrameSP());
if (log)
{
SBStream frame_desc_strm;
sb_frame.GetDescription (frame_desc_strm);
log->Printf ("SBThread(%p)::StepOutOfFrame (frame = SBFrame(%p): %s)", exe_ctx.GetThreadPtr(), frame_sp.get(), frame_desc_strm.GetData());
}
if (exe_ctx.HasThreadScope())
{
bool abort_other_plans = false;
bool stop_other_threads = false;
Thread *thread = exe_ctx.GetThreadPtr();
ThreadPlanSP new_plan_sp(thread->QueueThreadPlanForStepOut (abort_other_plans,
NULL,
false,
stop_other_threads,
eVoteYes,
eVoteNoOpinion,
frame_sp->GetFrameIndex()));
// This returns an error, we should use it!
ResumeNewPlan (exe_ctx, new_plan_sp.get());
}
}
示例4: StepOutOfFrame
void SBThread::StepOutOfFrame(lldb::SBFrame &sb_frame) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
if (!sb_frame.IsValid()) {
if (log)
log->Printf(
"SBThread(%p)::StepOutOfFrame passed an invalid frame, returning.",
static_cast<void *>(exe_ctx.GetThreadPtr()));
return;
}
StackFrameSP frame_sp(sb_frame.GetFrameSP());
if (log) {
SBStream frame_desc_strm;
sb_frame.GetDescription(frame_desc_strm);
log->Printf("SBThread(%p)::StepOutOfFrame (frame = SBFrame(%p): %s)",
static_cast<void *>(exe_ctx.GetThreadPtr()),
static_cast<void *>(frame_sp.get()), frame_desc_strm.GetData());
}
if (exe_ctx.HasThreadScope()) {
bool abort_other_plans = false;
bool stop_other_threads = false;
Thread *thread = exe_ctx.GetThreadPtr();
if (sb_frame.GetThread().GetThreadID() != thread->GetID()) {
log->Printf("SBThread(%p)::StepOutOfFrame passed a frame from another "
"thread (0x%" PRIx64 " vrs. 0x%" PRIx64 ", returning.",
static_cast<void *>(exe_ctx.GetThreadPtr()),
sb_frame.GetThread().GetThreadID(), thread->GetID());
}
ThreadPlanSP new_plan_sp(thread->QueueThreadPlanForStepOut(
abort_other_plans, NULL, false, stop_other_threads, eVoteYes,
eVoteNoOpinion, frame_sp->GetFrameIndex()));
// This returns an error, we should use it!
ResumeNewPlan(exe_ctx, new_plan_sp.get());
}
}
示例5: ExecutionContextRef
SBExecutionContext::SBExecutionContext (const lldb::SBFrame &frame) :
m_exe_ctx_sp(new ExecutionContextRef())
{
m_exe_ctx_sp->SetFrameSP(frame.GetFrameSP());
}