Exemplo n.º 1
0
 void IDkmLanguageFrameDecoder.GetFrameReturnType(
     DkmInspectionContext inspectionContext,
     DkmWorkList workList,
     DkmStackWalkFrame frame,
     DkmCompletionRoutine <DkmGetFrameReturnTypeAsyncResult> completionRoutine
     )
 {
     try
     {
         GetNameWithGenericTypeArguments(
             workList,
             frame,
             onSuccess: method =>
             completionRoutine(
                 new DkmGetFrameReturnTypeAsyncResult(
                     _instructionDecoder.GetReturnTypeName(method)
                     )
                 ),
             onFailure: e =>
             completionRoutine(DkmGetFrameReturnTypeAsyncResult.CreateErrorResult(e))
             );
     }
     catch (NotImplementedMetadataException)
     {
         inspectionContext.GetFrameReturnType(workList, frame, completionRoutine);
     }
     catch (Exception e) when(ExpressionEvaluatorFatalError.CrashIfFailFastEnabled(e))
     {
         throw ExceptionUtilities.Unreachable;
     }
 }
Exemplo n.º 2
0
 void IDkmLanguageFrameDecoder.GetFrameReturnType(DkmInspectionContext inspectionContext, DkmWorkList workList, DkmStackWalkFrame frame, DkmCompletionRoutine <DkmGetFrameReturnTypeAsyncResult> completionRoutine)
 {
     try
     {
         var returnType = _instructionDecoder.GetReturnType((DkmClrInstructionAddress)frame.InstructionAddress);
         var result     = new DkmGetFrameReturnTypeAsyncResult(returnType);
         completionRoutine(result);
     }
     catch (Exception e) when(ExpressionEvaluatorFatalError.CrashIfFailFastEnabled(e))
     {
         throw ExceptionUtilities.Unreachable;
     }
 }