Пример #1
0
        internal DebugRegisters(DebugClient client, SOSHost soshost)
        {
            VTableBuilder builder = client.AddInterface(typeof(IDebugRegisters).GUID, validate: true);

            AddDebugRegisters(builder, soshost);
            builder.Complete();
        }
Пример #2
0
        /// <summary>
        /// Create an instance of the hosting class
        /// </summary>
        /// <param name="serviceProvider">Service provider</param>
        public SOSHost(IServiceProvider serviceProvider)
        {
            DataTarget dataTarget = serviceProvider.GetService <DataTarget>();

            DataReader       = dataTarget.DataReader;
            _console         = serviceProvider.GetService <IConsoleService>();
            AnalyzeContext   = serviceProvider.GetService <AnalyzeContext>();
            _memoryService   = serviceProvider.GetService <MemoryService>();
            _registerService = serviceProvider.GetService <RegisterService>();
            _versionCache    = new ReadVirtualCache(_memoryService);

            string rid = InstallHelper.GetRid();

            SOSPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), rid);
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                var debugClient = new DebugClient(this);
                _ccw       = debugClient;
                _interface = debugClient.IDebugClient;
            }
            else
            {
                var lldbServices = new LLDBServices(this);
                _ccw       = lldbServices;
                _interface = lldbServices.ILLDBServices;
            }
        }
Пример #3
0
        internal DebugAdvanced(DebugClient client, SOSHost soshost)
        {
            VTableBuilder builder = client.AddInterface(typeof(IDebugAdvanced).GUID, validate: true);

            builder.AddMethod(new GetThreadContextDelegate(soshost.GetThreadContext));
            builder.AddMethod(new SetThreadContextDelegate(soshost.SetThreadContext));
            builder.Complete();
        }
Пример #4
0
        /// <summary>
        /// Create an instance of the hosting class
        /// </summary>
        public SOSHost(IDataReader dataReader, ISOSHostContext context)
        {
            DataReader     = dataReader;
            SOSHostContext = context;
            string rid = InstallHelper.GetRid();

            SOSPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), rid);
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                var debugClient = new DebugClient(this);
                _ccw       = debugClient;
                _interface = debugClient.IDebugClient;
            }
            else
            {
                var lldbServices = new LLDBServices(this);
                _ccw       = lldbServices;
                _interface = lldbServices.ILLDBServices;
            }
        }