Exemple #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;
     }
 }
Exemple #2
0
 /// <summary>
 /// This method is called by the debug engine to get the text representation of the return
 /// value of a stack frame.
 /// </summary>
 /// <param name="inspectionContext">Context of the evaluation.  This contains options/flags
 /// to be used during compilation. It also contains the InspectionSession.  The inspection
 /// session is the object that provides lifetime management for our objects.  When the user
 /// steps or continues the process, the debug engine will dispose of the inspection session</param>
 /// <param name="workList">The current work list.  This is used to batch asynchronous
 /// work items.  If any asynchronous calls are needed later, this is the work list to pass
 /// to the asynchronous call.  It's not needed in our case.</param>
 /// <param name="frame">The frame to get the text representation of the return value for</param>
 /// <param name="completionRoutine">Completion routine to call when work is completed</param>
 void IDkmLanguageFrameDecoder.GetFrameReturnType(
     DkmInspectionContext inspectionContext,
     DkmWorkList workList,
     DkmStackWalkFrame frame,
     DkmCompletionRoutine <DkmGetFrameReturnTypeAsyncResult> completionRoutine)
 {
     try
     {
         string name = TryGetFrameReturnTypeHelper(inspectionContext, frame) ?? "<Unknown>";
         completionRoutine(new DkmGetFrameReturnTypeAsyncResult(name));
     }
     catch (Exception)
     {
         inspectionContext.GetFrameReturnType(workList, frame, completionRoutine);
     }
 }