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

Method UpdateRegisterUsage

IDEHelper/WinDebugger.cpp:11480–11504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11478}
11479
11480void 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
11507void WinDebugger::UpdateCallStackMethod(int stackFrameIdx)

Callers

nothing calls this directly

Calls 5

DecodeInstructionMethod · 0.80
sizeMethod · 0.45
GetPCMethod · 0.45
MarkRegsUsedMethod · 0.45
GetLengthMethod · 0.45

Tested by

no test coverage detected