internal DebugRegisters(DebugClient client, SOSHost soshost) { VTableBuilder builder = client.AddInterface(typeof(IDebugRegisters).GUID, validate: true); AddDebugRegisters(builder, soshost); builder.Complete(); }
/// <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; } }
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(); }
/// <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; } }