| 4545 | } |
| 4546 | |
| 4547 | String CeDebugger::GetStackFrameInfo(int stackFrameIdx, intptr* addr, String* outFile, int32* outHotIdx, int32* outDefLineStart, int32* outDefLineEnd, int32* outLine, int32* outColumn, int32* outLanguage, int32* outStackSize, int8* outFlags) |
| 4548 | { |
| 4549 | AutoCrit autoCrit(mDebugManager->mCritSect); |
| 4550 | |
| 4551 | if (!mCeMachine->mDbgPaused) |
| 4552 | return ""; |
| 4553 | |
| 4554 | UpdateCallStack(); |
| 4555 | |
| 4556 | enum FrameFlags |
| 4557 | { |
| 4558 | FrameFlags_Optimized = 1, |
| 4559 | FrameFlags_HasPendingDebugInfo = 2, |
| 4560 | FrameFlags_CanGetOldSource = 4, |
| 4561 | FrameFlags_WasHotReplaced = 8, |
| 4562 | FrameFlags_HadError = 0x10 |
| 4563 | }; |
| 4564 | |
| 4565 | auto ceContext = mCeMachine->mCurContext; |
| 4566 | |
| 4567 | *addr = 0; |
| 4568 | *outFile = ""; |
| 4569 | *outHotIdx = 0; |
| 4570 | *outDefLineStart = -1; |
| 4571 | *outDefLineEnd = -1; |
| 4572 | *outLine = -1; |
| 4573 | *outColumn = 0; |
| 4574 | *outLanguage = DbgLanguage_Beef; |
| 4575 | *outStackSize = 0; |
| 4576 | *outFlags = 0; |
| 4577 | |
| 4578 | if (ceContext == NULL) |
| 4579 | return ""; |
| 4580 | |
| 4581 | auto& dbgCallstackInfo = mDbgCallStack[stackFrameIdx]; |
| 4582 | |
| 4583 | if (dbgCallstackInfo.mFrameIdx == -1) |
| 4584 | { |
| 4585 | if (ceContext->mCurCallSource != NULL) |
| 4586 | { |
| 4587 | int line = -1; |
| 4588 | int lineChar = -1; |
| 4589 | auto parserData = ceContext->mCurCallSource->mRefNode->GetParserData(); |
| 4590 | if (parserData != NULL) |
| 4591 | { |
| 4592 | parserData->GetLineCharAtIdx(ceContext->mCurCallSource->mRefNode->GetSrcStart(), line, lineChar); |
| 4593 | *outLine = line; |
| 4594 | *outColumn = lineChar; |
| 4595 | *outFile = parserData->mFileName; |
| 4596 | } |
| 4597 | } |
| 4598 | |
| 4599 | // Entry marker |
| 4600 | String result = "const eval"; |
| 4601 | if (ceContext->mCurCallSource->mKind == CeCallSource::Kind_FieldInit) |
| 4602 | { |
| 4603 | return String("field init of : ") + ceContext->mCurModule->TypeToString(ceContext->mCurCallSource->mFieldInstance->mOwner) + "." + |
| 4604 | ceContext->mCurCallSource->mFieldInstance->GetFieldDef()->mName; |
nothing calls this directly
no test coverage detected