| 4417 | } |
| 4418 | |
| 4419 | void CeDebugger::UpdateCallStack(bool slowEarlyOut) |
| 4420 | { |
| 4421 | AutoCrit autoCrit(mCeMachine->mCritSect); |
| 4422 | |
| 4423 | if (!mDbgCallStack.IsEmpty()) |
| 4424 | return; |
| 4425 | |
| 4426 | auto ceContext = mCeMachine->mCurContext; |
| 4427 | for (int frameIdx = ceContext->mCallStack.mSize - 1; frameIdx >= 0; frameIdx--) |
| 4428 | { |
| 4429 | auto ceFrame = &ceContext->mCallStack[frameIdx]; |
| 4430 | |
| 4431 | auto instIdx = ceFrame->GetInstIdx(); |
| 4432 | auto emitEntry = ceFrame->mFunction->FindEmitEntry(instIdx); |
| 4433 | if (emitEntry == NULL) |
| 4434 | continue; |
| 4435 | |
| 4436 | int scopeIdx = emitEntry->mScope; |
| 4437 | int prevInlineIdx = -1; |
| 4438 | while (scopeIdx != -1) |
| 4439 | { |
| 4440 | CeDbgStackInfo ceDbgStackInfo; |
| 4441 | ceDbgStackInfo.mFrameIdx = frameIdx; |
| 4442 | ceDbgStackInfo.mScopeIdx = scopeIdx; |
| 4443 | ceDbgStackInfo.mInlinedFrom = prevInlineIdx; |
| 4444 | mDbgCallStack.Add(ceDbgStackInfo); |
| 4445 | |
| 4446 | auto ceScope = &ceFrame->mFunction->mDbgScopes[scopeIdx]; |
| 4447 | if (ceScope->mInlinedAt == -1) |
| 4448 | break; |
| 4449 | auto inlineInfo = &ceFrame->mFunction->mDbgInlineTable[ceScope->mInlinedAt]; |
| 4450 | scopeIdx = inlineInfo->mScope; |
| 4451 | prevInlineIdx = ceScope->mInlinedAt; |
| 4452 | } |
| 4453 | } |
| 4454 | |
| 4455 | CeDbgStackInfo ceDbgStackInfo; |
| 4456 | ceDbgStackInfo.mFrameIdx = -1; |
| 4457 | ceDbgStackInfo.mScopeIdx = -1; |
| 4458 | ceDbgStackInfo.mInlinedFrom = -1; |
| 4459 | mDbgCallStack.Add(ceDbgStackInfo); |
| 4460 | } |
| 4461 | |
| 4462 | int CeDebugger::GetCallStackCount() |
| 4463 | { |
nothing calls this directly
no test coverage detected