| 11478 | } |
| 11479 | |
| 11480 | void WinDebugger::UpdateRegisterUsage(int stackFrameIdx) |
| 11481 | { |
| 11482 | WdStackFrame* wdStackFrame = mCallStack[stackFrameIdx]; |
| 11483 | if (wdStackFrame->mRegForms.size() != 0) |
| 11484 | return; |
| 11485 | |
| 11486 | auto dwSubprogram = wdStackFrame->mSubProgram; |
| 11487 | if (dwSubprogram == NULL) |
| 11488 | return; |
| 11489 | |
| 11490 | addr_target addr = dwSubprogram->mBlock.mLowPC; |
| 11491 | |
| 11492 | const uint8* baseOp = nullptr; |
| 11493 | while (addr < dwSubprogram->mBlock.mHighPC) |
| 11494 | { |
| 11495 | CPUInst inst; |
| 11496 | if (!mDebugTarget->DecodeInstruction(addr, &inst)) |
| 11497 | break; |
| 11498 | |
| 11499 | bool overrideForm = inst.mAddress <= (addr_target)wdStackFrame->mRegisters.GetPC(); |
| 11500 | inst.MarkRegsUsed(wdStackFrame->mRegForms, overrideForm); |
| 11501 | |
| 11502 | addr += inst.GetLength(); |
| 11503 | } |
| 11504 | } |
| 11505 | |
| 11506 | // It's safe to pass an invalid idx in here |
| 11507 | void WinDebugger::UpdateCallStackMethod(int stackFrameIdx) |
nothing calls this directly
no test coverage detected