MCPcopy Create free account
hub / github.com/beefytech/Beef / GetCallStackDbgModule

Method GetCallStackDbgModule

IDEHelper/WinDebugger.cpp:9413–9431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9411}
9412
9413DbgModule* WinDebugger::GetCallStackDbgModule(int callStackIdx)
9414{
9415 if ((mRunState == RunState_NotStarted) || (!IsPaused()))
9416 return mEmptyDebugTarget->GetMainDbgModule();
9417 if (callStackIdx == -1)
9418 return mDebugTarget->GetMainDbgModule();
9419 FixCallStackIdx(callStackIdx);
9420 if (callStackIdx >= mCallStack.size())
9421 return mDebugTarget->GetMainDbgModule();
9422 UpdateCallStackMethod(callStackIdx);
9423 auto subProgram = mCallStack[callStackIdx]->mSubProgram;
9424 if (subProgram != NULL)
9425 return subProgram->mCompileUnit->mDbgModule;
9426
9427 auto dbgModule = mDebugTarget->FindDbgModuleForAddress(mCallStack[callStackIdx]->mRegisters.GetPC());
9428 if (dbgModule != NULL)
9429 return dbgModule;
9430 return mDebugTarget->GetMainDbgModule();
9431}
9432
9433DbgSubprogram* WinDebugger::GetCallStackSubprogram(int callStackIdx)
9434{

Callers

nothing calls this directly

Calls 4

GetMainDbgModuleMethod · 0.80
sizeMethod · 0.45
GetPCMethod · 0.45

Tested by

no test coverage detected