示例#1
0
        public DebuggerRuntimeImpl(DbgObjectIdService dbgObjectIdService, IDbgDotNetRuntime runtime, int pointerSize, DotNetClassHookFactory[] dotNetClassHookFactories)
        {
            if (dotNetClassHookFactories is null)
            {
                throw new ArgumentNullException(nameof(dotNetClassHookFactories));
            }
            argumentsProvider         = null !;
            evalInfo                  = null !;
            this.dbgObjectIdService   = dbgObjectIdService ?? throw new ArgumentNullException(nameof(dbgObjectIdService));
            this.runtime              = runtime ?? throw new ArgumentNullException(nameof(runtime));
            valuesToDispose           = new List <DbgDotNetValue>();
            interpreterLocalsProvider = new InterpreterLocalsProvider(this);
            PointerSize               = pointerSize;

            var anyClassHooksList = new List <DotNetClassHook>();

            classHooks = new Dictionary <DmdTypeName, DotNetClassHook>(DmdTypeNameEqualityComparer.Instance);
            foreach (var factory in dotNetClassHookFactories)
            {
                foreach (var info in factory.Create(this))
                {
                    Debug2.Assert(info.Hook is not null);
                    if (info.WellKnownType is null && info.TypeName is null)
                    {
                        anyClassHooksList.Add(info.Hook);
                    }
示例#2
0
 public override DbgEngineStepper Create(IDbgDotNetRuntime runtime, DbgDotNetEngineStepper stepper, DbgThread thread)
 {
     if (runtime is null)
     {
         throw new ArgumentNullException(nameof(runtime));
     }
     if (stepper is null)
     {
         throw new ArgumentNullException(nameof(stepper));
     }
     if (thread is null)
     {
         throw new ArgumentNullException(nameof(thread));
     }
     return(new DbgEngineStepperImpl(dbgLanguageService, dbgDotNetDebugInfoService, debuggerSettings, runtime, stepper, thread));
 }
示例#3
0
        public DebuggerRuntimeImpl(DbgObjectIdService dbgObjectIdService, IDbgDotNetRuntime runtime, int pointerSize, DotNetClassHookFactory[] dotNetClassHookFactories)
        {
            if (dotNetClassHookFactories == null)
            {
                throw new ArgumentNullException(nameof(dotNetClassHookFactories));
            }
            this.dbgObjectIdService   = dbgObjectIdService ?? throw new ArgumentNullException(nameof(dbgObjectIdService));
            this.runtime              = runtime ?? throw new ArgumentNullException(nameof(runtime));
            valuesToDispose           = new List <DbgDotNetValue>();
            interpreterLocalsProvider = new InterpreterLocalsProvider(this);
            PointerSize = pointerSize;

            var anyClassHooksList = new List <DotNetClassHook>();

            classHooks = new Dictionary <DmdTypeName, DotNetClassHook>(DmdTypeNameEqualityComparer.Instance);
            foreach (var factory in dotNetClassHookFactories)
            {
                foreach (var info in factory.Create(this))
                {
                    Debug.Assert(info.Hook != null);
                    if (info.WellKnownType == null && info.TypeName == null)
                    {
                        anyClassHooksList.Add(info.Hook);
                    }
                    else
                    {
                        DmdTypeName typeName;
                        if (info.WellKnownType != null)
                        {
                            typeName = DmdWellKnownTypeUtils.GetTypeName(info.WellKnownType.Value);
                        }
                        else
                        {
                            Debug.Assert(info.TypeName != null);
                            typeName = info.TypeName.Value;
                        }
                        Debug.Assert(!classHooks.ContainsKey(typeName));
                        classHooks[typeName] = info.Hook;
                    }
                }
            }
            anyClassHooks = anyClassHooksList.ToArray();
        }
示例#4
0
 public DebuggerRuntimeImpl(IDbgDotNetRuntime runtime, int pointerSize)
 {
     this.runtime    = runtime ?? throw new ArgumentNullException(nameof(runtime));
     valuesToDispose = new List <DbgDotNetValue>();
     PointerSize     = pointerSize;
 }
示例#5
0
 /// <summary>
 /// Creates a .NET stepper
 /// </summary>
 /// <param name="runtime">Runtime</param>
 /// <param name="stepper">Stepper</param>
 /// <param name="thread">Thread</param>
 /// <returns></returns>
 public abstract DbgEngineStepper Create(IDbgDotNetRuntime runtime, DbgDotNetEngineStepper stepper, DbgThread thread);
示例#6
0
 public DefaultLocalsProviderImpl(IDbgDotNetRuntime runtime) => this.runtime = runtime;
 public DefaultArgumentsProviderImpl(IDbgDotNetRuntime runtime)
 {
     evalInfo     = null !;
     this.runtime = runtime;
 }
示例#8
0
 public DbgEngineObjectIdImpl(IDbgDotNetRuntime runtime, DbgDotNetObjectId dnObjectId)
 {
     this.runtime    = runtime ?? throw new ArgumentNullException(nameof(runtime));
     this.dnObjectId = dnObjectId ?? throw new ArgumentNullException(nameof(dnObjectId));
 }
 public DotNetSymbolResolver(IDbgDotNetRuntime runtime) => this.runtime = runtime;
示例#10
0
 public DefaultArgumentsProviderImpl(IDbgDotNetRuntime runtime) => this.runtime = runtime;