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

Method GetValueByNameInBlock

IDEHelper/DebugTarget.cpp:2426–2461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2424}
2425
2426bool DebugTarget::GetValueByNameInBlock(DbgSubprogram* dwSubprogram, DbgBlock* dwBlock, String& name, WdStackFrame* stackFrame, intptr* outAddr, DbgType** outType, DbgAddrType* outAddrType)
2427{
2428 addr_target pc = stackFrame->GetSourcePC();
2429 if (dwSubprogram != NULL)
2430 {
2431 auto dbgModule = dwSubprogram->mCompileUnit->mDbgModule;
2432 if (dwBlock->mLowPC == -1)
2433 {
2434 //Debug ranges
2435 addr_target* rangeData = (addr_target*)(dbgModule->mDebugRangesData + dwBlock->mHighPC);
2436 while (true)
2437 {
2438 addr_target lowPC = *(rangeData++);
2439 if (lowPC == 0)
2440 return false;
2441 addr_target highPC = *(rangeData++);
2442 // Matches?
2443 if ((pc >= lowPC) && (pc < highPC))
2444 break;
2445 }
2446 }
2447 else if ((pc < dwBlock->mLowPC) || (pc >= dwBlock->mHighPC))
2448 return false;
2449 }
2450
2451 for (auto subBlock : dwBlock->mSubBlocks)
2452 {
2453 if (GetValueByNameInBlock(dwSubprogram, subBlock, name, stackFrame, outAddr, outType, outAddrType))
2454 return true;
2455 }
2456
2457 if (GetValueByNameInBlock_Helper(dwSubprogram, dwBlock, name, stackFrame, outAddr, outType, outAddrType))
2458 return true;
2459
2460 return false;
2461}
2462
2463const DbgMemoryFlags DebugTarget::ReadOrigImageData(addr_target address, uint8* data, int size)
2464{

Callers

nothing calls this directly

Calls 1

GetSourcePCMethod · 0.80

Tested by

no test coverage detected