| 2424 | } |
| 2425 | |
| 2426 | bool 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 | |
| 2463 | const DbgMemoryFlags DebugTarget::ReadOrigImageData(addr_target address, uint8* data, int size) |
| 2464 | { |
nothing calls this directly
no test coverage detected