| 9463 | } |
| 9464 | |
| 9465 | String WinDebugger::EvaluateContinue(DbgPendingExpr* pendingExpr, BfPassInstance& bfPassInstance) |
| 9466 | { |
| 9467 | DbgModule* dbgModule = NULL; |
| 9468 | DbgCompileUnit* dbgCompileUnit = NULL; |
| 9469 | |
| 9470 | if (pendingExpr->mThreadId == -1) |
| 9471 | { |
| 9472 | if ((pendingExpr->mFormatInfo.mLanguage == DbgLanguage_Beef) && (mDebugTarget != NULL) && (mDebugTarget->mTargetBinary != NULL)) |
| 9473 | dbgModule = mDebugTarget->mTargetBinary; |
| 9474 | else |
| 9475 | dbgModule = mEmptyDebugTarget->GetMainDbgModule(); |
| 9476 | } |
| 9477 | else |
| 9478 | { |
| 9479 | dbgModule = GetCallStackDbgModule(pendingExpr->mCallStackIdx); |
| 9480 | if ((dbgModule != NULL) &&(!dbgModule->mDebugTarget->mIsEmpty)) |
| 9481 | dbgCompileUnit = GetCallStackCompileUnit(pendingExpr->mCallStackIdx); |
| 9482 | } |
| 9483 | |
| 9484 | if (dbgModule == NULL) |
| 9485 | dbgModule = mEmptyDebugTarget->GetMainDbgModule(); |
| 9486 | |
| 9487 | if (!pendingExpr->mException.empty()) |
| 9488 | { |
| 9489 | RestoreAllRegisters(); |
| 9490 | return "!" + pendingExpr->mException; |
| 9491 | } |
| 9492 | |
| 9493 | DwAutoComplete autoComplete; |
| 9494 | |
| 9495 | if (bfPassInstance.HasFailed()) |
| 9496 | { |
| 9497 | // Don't allow pending calls if we've already failed in the calling Evaluate() |
| 9498 | pendingExpr->mExpressionFlags = (DwEvalExpressionFlags)(pendingExpr->mExpressionFlags & ~DwEvalExpressionFlag_AllowCalls); |
| 9499 | } |
| 9500 | |
| 9501 | DbgExprEvaluator dbgExprEvaluator(this, dbgModule, &bfPassInstance, pendingExpr->mCallStackIdx, pendingExpr->mCursorPos); |
| 9502 | if (!pendingExpr->mFormatInfo.mStackSearchStr.IsEmpty()) |
| 9503 | { |
| 9504 | dbgExprEvaluator.mStackSearch = new DbgStackSearch(); |
| 9505 | dbgExprEvaluator.mStackSearch->mSearchStr = pendingExpr->mFormatInfo.mStackSearchStr; |
| 9506 | } |
| 9507 | dbgExprEvaluator.mLanguage = pendingExpr->mFormatInfo.mLanguage; |
| 9508 | dbgExprEvaluator.mReferenceId = &pendingExpr->mReferenceId; |
| 9509 | dbgExprEvaluator.mExpressionFlags = pendingExpr->mExpressionFlags; |
| 9510 | dbgExprEvaluator.mExplicitThis = pendingExpr->mFormatInfo.mExplicitThis; |
| 9511 | dbgExprEvaluator.mSubjectExpr = pendingExpr->mFormatInfo.mSubjectExpr; |
| 9512 | dbgExprEvaluator.mNamespaceSearchStr = pendingExpr->mFormatInfo.mNamespaceSearch; |
| 9513 | dbgExprEvaluator.mExpectingTypeName = pendingExpr->mFormatInfo.mExpectedType; |
| 9514 | dbgExprEvaluator.mCallResults = &pendingExpr->mCallResults; |
| 9515 | if ((pendingExpr->mExpressionFlags & DwEvalExpressionFlag_ValidateOnly) != 0) |
| 9516 | { |
| 9517 | dbgExprEvaluator.mValidateOnly = true; |
| 9518 | } |
| 9519 | |
| 9520 | if (pendingExpr->mCursorPos != -1) |
| 9521 | { |
| 9522 | dbgExprEvaluator.mAutoComplete = &autoComplete; |
no test coverage detected