private DkmIntermediateEvaluationResult(
     DkmInspectionContext inspectionContext,
     DkmStackWalkFrame stackFrame,
     string name,
     string fullName,
     string expression,
     DkmLanguage intermediateLanguage,
     DkmRuntimeInstance targetRuntime,
     DkmDataItem dataItem)
     : base(inspectionContext, stackFrame, name, fullName, DkmEvaluationResultFlags.None, null, dataItem)
 {
     this.Expression = expression;
     this.IntermediateLanguage = intermediateLanguage;
     this.TargetRuntime = targetRuntime;
 }
Esempio n. 2
0
 private DkmIntermediateEvaluationResult(
     DkmInspectionContext inspectionContext,
     DkmStackWalkFrame stackFrame,
     string name,
     string fullName,
     string expression,
     DkmLanguage intermediateLanguage,
     DkmRuntimeInstance targetRuntime,
     DkmDataItem dataItem) :
     base(inspectionContext, stackFrame, name, fullName, DkmEvaluationResultFlags.None, null, dataItem)
 {
     this.Expression           = expression;
     this.IntermediateLanguage = intermediateLanguage;
     this.TargetRuntime        = targetRuntime;
 }
Esempio n. 3
0
 public static DkmInspectionContext Create(
     DkmInspectionSession InspectionSession,
     DkmRuntimeInstance RuntimeInstance,
     DkmThread Thread,
     uint Timeout,
     DkmEvaluationFlags EvaluationFlags,
     DkmFuncEvalFlags FuncEvalFlags,
     uint Radix,
     DkmLanguage Language,
     DkmRawReturnValue ReturnValue,
     DkmCompiledVisualizationData AdditionalVisualizationData,
     DkmCompiledVisualizationDataPriority AdditionalVisualizationDataPriority,
     ReadOnlyCollection <DkmRawReturnValueContainer> ReturnValues)
 {
     return(new DkmInspectionContext(InspectionSession, EvaluationFlags, Radix, RuntimeInstance));
 }
Esempio n. 4
0
 public static DkmInspectionContext Create(
     DkmInspectionSession InspectionSession,
     DkmRuntimeInstance RuntimeInstance,
     DkmThread Thread,
     uint Timeout,
     DkmEvaluationFlags EvaluationFlags,
     DkmFuncEvalFlags FuncEvalFlags,
     uint Radix,
     DkmLanguage Language,
     DkmRawReturnValue ReturnValue,
     DkmCompiledVisualizationData AdditionalVisualizationData,
     DkmCompiledVisualizationDataPriority AdditionalVisualizationDataPriority,
     ReadOnlyCollection<DkmRawReturnValueContainer> ReturnValues)
 {
     return new DkmInspectionContext(InspectionSession, EvaluationFlags, Radix, RuntimeInstance);
 }
Esempio n. 5
0
 public static DkmIntermediateEvaluationResult Create(
     DkmInspectionContext InspectionContext,
     DkmStackWalkFrame StackFrame,
     string Name,
     string FullName,
     string Expression,
     DkmLanguage IntermediateLanguage,
     DkmRuntimeInstance TargetRuntime,
     DkmDataItem DataItem)
 {
     return(new DkmIntermediateEvaluationResult(
                InspectionContext,
                StackFrame,
                Name,
                FullName,
                Expression,
                IntermediateLanguage,
                TargetRuntime,
                DataItem));
 }
 public static DkmIntermediateEvaluationResult Create(
     DkmInspectionContext InspectionContext,
     DkmStackWalkFrame StackFrame,
     string Name,
     string FullName,
     string Expression,
     DkmLanguage IntermediateLanguage,
     DkmRuntimeInstance TargetRuntime,
     DkmDataItem DataItem)
 {
     return new DkmIntermediateEvaluationResult(
         InspectionContext,
         StackFrame,
         Name,
         FullName,
         Expression,
         IntermediateLanguage,
         TargetRuntime,
         DataItem);
 }
        private void TestNativeView(bool enableNativeDebugging)
        {
            var source =
@"class C
{
}";
            using (new EnsureEnglishUICulture())
            {
                var assembly = GetAssembly(source);
                var assemblies = ReflectionUtilities.GetMscorlibAndSystemCore(assembly);
                using (ReflectionUtilities.LoadAssemblies(assemblies))
                {
                    var runtime = new DkmClrRuntimeInstance(assemblies, enableNativeDebugging: enableNativeDebugging);
                    var inspectionContext = CreateDkmInspectionContext(runtimeInstance: runtime);
                    var type = assembly.GetType("C");
                    var value = CreateDkmClrValue(
                        value: type.Instantiate(),
                        type: runtime.GetType((TypeImpl)type),
                        nativeComPointer: 0xfe);
                    var evalResult = FormatResult("o", value, inspectionContext: inspectionContext);
                    Verify(evalResult,
                        EvalResult("o", "{C}", "C", "o", DkmEvaluationResultFlags.Expandable));
                    var children = GetChildren(evalResult, inspectionContext);
                    if (enableNativeDebugging)
                    {
                        string pointerString = $"(IUnknown*){PointerToString(new IntPtr(0xfe))}";
                        DkmLanguage language = new DkmLanguage(new DkmCompilerId(DkmVendorId.Microsoft, DkmLanguageId.Cpp));
                        Verify(children,
                            EvalIntermediateResult("Native View", "{C++}" + pointerString, pointerString, language));
                    }
                    else
                    {
                        Verify(children,
                            EvalFailedResult("Native View", "To inspect the native object, enable native code debugging."));
                    }
                }
            }
        }
        public static DkmIntermediateEvaluationResult Create(DkmInspectionContext InspectionContext, DkmStackWalkFrame StackFrame, string Name, string FullName, string Expression, DkmLanguage IntermediateLanguage, DkmRuntimeInstance TargetRuntime, DkmDataItem DataItem)
        {
            DkmIntermediateEvaluationResult result = new DkmIntermediateEvaluationResult
            {
                InspectionContext = InspectionContext,
                Name                 = Name,
                FullName             = FullName,
                Expression           = Expression,
                IntermediateLanguage = IntermediateLanguage,
                TargetRuntime        = TargetRuntime
            };

            if (DataItem != null)
            {
                result.SetDataItem(DkmDataCreationDisposition.CreateNew, DataItem);
            }

            return(result);
        }