本文整理汇总了C++中StackFrame::GetImage方法的典型用法代码示例。如果您正苦于以下问题:C++ StackFrame::GetImage方法的具体用法?C++ StackFrame::GetImage怎么用?C++ StackFrame::GetImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StackFrame
的用法示例。
在下文中一共展示了StackFrame::GetImage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _DoStepOver
bool
ThreadHandler::_HandleSingleStepStep(CpuState* cpuState)
{
TRACE_CONTROL("ThreadHandler::_HandleSingleStepStep(): ip: %llx\n",
cpuState->InstructionPointer());
switch (fStepMode) {
case STEP_INTO:
{
// We continue stepping as long as we're in the statement.
if (fStepStatement->ContainsAddress(cpuState->InstructionPointer())) {
_SingleStepThread(cpuState->InstructionPointer());
return true;
}
StackTrace* stackTrace = fThread->GetStackTrace();
BReference<StackTrace> stackTraceReference(stackTrace);
if (stackTrace == NULL && cpuState != NULL) {
if (fDebuggerInterface->GetArchitecture()->CreateStackTrace(
fThread->GetTeam(), this, cpuState, stackTrace) == B_OK) {
stackTraceReference.SetTo(stackTrace, true);
}
}
if (stackTrace != NULL) {
StackFrame* frame = stackTrace->FrameAt(0);
Image* image = frame->GetImage();
ImageDebugInfo* info = NULL;
if (GetImageDebugInfo(image, info) != B_OK)
return false;
BReference<ImageDebugInfo>(info, true);
if (info->GetAddressSectionType(
cpuState->InstructionPointer())
== ADDRESS_SECTION_TYPE_PLT) {
_SingleStepThread(cpuState->InstructionPointer());
return true;
}
}
return false;
}
case STEP_OVER:
{
// If we have stepped out of the statement, we're done.
if (!fStepStatement->ContainsAddress(cpuState->InstructionPointer()))
return false;
return _DoStepOver(cpuState);
}
case STEP_OUT:
// We never single-step in this case.
default:
return false;
}
}