| 113 | } |
| 114 | |
| 115 | void DbgHotScanner::PopulateHotCallstacks() |
| 116 | { |
| 117 | auto prevActiveThread = mDebugger->mActiveThread; |
| 118 | for (auto threadInfo : mDebugger->mThreadList) |
| 119 | { |
| 120 | mDebugger->mActiveThread = threadInfo; |
| 121 | mDebugger->ClearCallStack(); |
| 122 | mDebugger->UpdateCallStack(false); |
| 123 | |
| 124 | for (int stackFrameIdx = 0; stackFrameIdx < (int)mDebugger->mCallStack.size(); stackFrameIdx++) |
| 125 | mDebugger->UpdateCallStackMethod(stackFrameIdx); |
| 126 | |
| 127 | for (int stackFrameIdx = 0; stackFrameIdx < (int)mDebugger->mCallStack.size(); stackFrameIdx++) |
| 128 | { |
| 129 | auto stackFrame = mDebugger->mCallStack[stackFrameIdx]; |
| 130 | if ((stackFrame->mSubProgram != NULL) && (stackFrame->mSubProgram->GetLanguage() == DbgLanguage_Beef)) |
| 131 | { |
| 132 | auto subProgram = stackFrame->mSubProgram; |
| 133 | |
| 134 | if (subProgram->mHotReplaceKind == DbgSubprogram::HotReplaceKind_Replaced) |
| 135 | subProgram = mDebugger->TryFollowHotJump(subProgram, stackFrame->mRegisters.GetPC()); |
| 136 | |
| 137 | AddSubProgram(subProgram, false, ""); |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | mDebugger->mActiveThread = prevActiveThread; |
| 143 | mDebugger->ClearCallStack(); |
| 144 | } |
| 145 | |
| 146 | void DbgHotScanner::ScanSpan(TCFake::Span* span, int expectedStartPage, int memKind) |
| 147 | { |
nothing calls this directly
no test coverage detected