Example #1
0
        public DataTargetWrapper(IServiceProvider services, IRuntime runtime)
        {
            Debug.Assert(services != null);
            Debug.Assert(runtime != null);
            _services              = services;
            _runtimeBaseAddress    = runtime.RuntimeModule.ImageBase;
            _symbolService         = services.GetService <ISymbolService>();
            _memoryService         = services.GetService <IMemoryService>();
            _threadService         = services.GetService <IThreadService>();
            _threadUnwindService   = services.GetService <IThreadUnwindService>();
            _moduleService         = services.GetService <IModuleService>();
            _remoteMemoryService   = services.GetService <IRemoteMemoryService>();
            _ignoreAddressBitsMask = _memoryService.SignExtensionMask();

            VTableBuilder builder = AddInterface(IID_ICLRDataTarget, false);

            AddDataTarget(builder);
            IDataTarget = builder.Complete();

            builder = AddInterface(IID_ICLRDataTarget2, false);
            AddDataTarget2(builder);
            builder.Complete();

            builder = AddInterface(IID_ICLRDataTarget4, validate: false);
            builder.AddMethod(new VirtualUnwindDelegate(VirtualUnwind));
            builder.Complete();

            builder = AddInterface(IID_ICLRMetadataLocator, false);
            builder.AddMethod(new GetMetadataDelegate(GetMetadata));
            builder.Complete();

            builder = AddInterface(IID_ICLRRuntimeLocator, false);
            builder.AddMethod(new GetRuntimeBaseDelegate(GetRuntimeBase));
            builder.Complete();
        }
        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();
        }
Example #3
0
        private HostServices()
        {
            _serviceProvider  = new ServiceProvider();
            _symbolService    = new SymbolService(this);
            _commandProcessor = new CommandProcessor(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ">!ext" : null);
            _commandProcessor.AddCommands(new Assembly[] { typeof(HostServices).Assembly });
            _commandProcessor.AddCommands(new Assembly[] { typeof(ClrMDHelper).Assembly });

            _serviceProvider.AddService <IHost>(this);
            _serviceProvider.AddService <ICommandService>(_commandProcessor);
            _serviceProvider.AddService <ISymbolService>(_symbolService);

            _hostWrapper = new HostWrapper(this);
            _hostWrapper.AddServiceWrapper(IID_IHostServices, this);
            _hostWrapper.AddServiceWrapper(SymbolServiceWrapper.IID_ISymbolService, () => new SymbolServiceWrapper(this));

            VTableBuilder builder = AddInterface(IID_IHostServices, validate: false);

            builder.AddMethod(new GetHostDelegate(GetHost));
            builder.AddMethod(new RegisterDebuggerServicesDelegate(RegisterDebuggerServices));
            builder.AddMethod(new CreateTargetDelegate(CreateTarget));
            builder.AddMethod(new UpdateTargetDelegate(UpdateTarget));
            builder.AddMethod(new FlushTargetDelegate(FlushTarget));
            builder.AddMethod(new DestroyTargetDelegate(DestroyTarget));
            builder.AddMethod(new DispatchCommandDelegate(DispatchCommand));
            builder.AddMethod(new DispatchCommandDelegate(DisplayHelp));
            builder.AddMethod(new UninitializeDelegate(Uninitialize));
            IHostServices = builder.Complete();

            AddRef();
        }
Example #4
0
        public HostWrapper(IHost host)
        {
            _host = host;

            VTableBuilder builder = AddInterface(IID_IHost, validate: false);

            builder.AddMethod(new GetHostTypeDelegate(GetHostType));
            builder.AddMethod(new GetServiceDelegate(GetService));
            builder.AddMethod(new GetCurrentTargetDelegate(GetCurrentTarget));
            IHost = builder.Complete();

            AddRef();
        }
Example #5
0
        internal CorDebugDataTargetWrapper(IServiceProvider services)
        {
            Debug.Assert(services != null);
            _target                = services.GetService <ITarget>();
            _symbolService         = services.GetService <ISymbolService>();
            _memoryService         = services.GetService <IMemoryService>();
            _threadService         = services.GetService <IThreadService>();
            _threadUnwindService   = services.GetService <IThreadUnwindService>();
            _ignoreAddressBitsMask = _memoryService.SignExtensionMask();

            VTableBuilder builder = AddInterface(IID_ICorDebugDataTarget, validate: false);

            builder.AddMethod(new GetPlatformDelegate(GetPlatform));
            builder.AddMethod(new ReadVirtualDelegate(ReadVirtual));
            builder.AddMethod(new GetThreadContextDelegate(GetThreadContext));
            ICorDebugDataTarget = builder.Complete();

            builder = AddInterface(IID_ICorDebugDataTarget4, validate: false);
            builder.AddMethod(new VirtualUnwindDelegate(VirtualUnwind));
            builder.Complete();

            builder = AddInterface(IID_ICorDebugMutableDataTarget, validate: false);
            builder.AddMethod(new WriteVirtualDelegate(WriteVirtual));
            builder.AddMethod(new SetThreadContextDelegate((self, threadId, contextSize, context) => HResult.E_NOTIMPL));
            builder.AddMethod(new ContinueStatusChangeDelegate((self, continueStatus) => HResult.E_NOTIMPL));
            builder.Complete();

            builder = AddInterface(IID_ICorDebugMetaDataLocator, validate: false);
            builder.AddMethod(new GetMetaDataDelegate(GetMetaData));
            builder.Complete();

            AddRef();
        }
        public TargetWrapper(IServiceProvider services)
        {
            _services = services;
            _target   = services.GetService <ITarget>() ?? throw new DiagnosticsException("No target");

            VTableBuilder builder = AddInterface(IID_ITarget, validate: false);

            builder.AddMethod(new GetOperatingSystemDelegate(GetOperatingSystem));
            builder.AddMethod(new GetTempDirectoryDelegate(GetTempDirectory));
            builder.AddMethod(new GetRuntimeDelegate(GetRuntime));
            builder.AddMethod(new FlushDelegate(Flush));

            ITarget = builder.Complete();

            AddRef();
        }
 private static void AddDebugControl2(VTableBuilder builder, SOSHost soshost)
 {
     AddDebugControl(builder, soshost);
     builder.AddMethod(new GetCurrentTimeDateDelegate((self, timeDate) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentSystemUpTimeDelegate((self, uptime) => DebugClient.NotImplemented));
     builder.AddMethod(new GetDumpFormatFlagsDelegate(soshost.GetDumpFormatFlags));
     builder.AddMethod(new GetNumberTextReplacementsDelegate((self, numRepl) => DebugClient.NotImplemented));
     builder.AddMethod(new GetTextReplacementDelegate((self, srcText, index, srcBuffer, srcBufferSize, srcSize, dstBuffer, dstBufferSize, dstSize) => DebugClient.NotImplemented));
     builder.AddMethod(new SetTextReplacementDelegate((self, srcText, dstText) => DebugClient.NotImplemented));
     builder.AddMethod(new RemoveTextReplacementsDelegate((self) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputTextReplacementsDelegate((self, outputControl, flags) => DebugClient.NotImplemented));
 }
Example #8
0
        public LibraryProviderWrapper(OSPlatform targetOS, ImmutableArray <byte> runtimeModuleBuildId, string dbiModulePath, string dacModulePath)
        {
            _targetOS             = targetOS;
            _runtimeModuleBuildId = runtimeModuleBuildId;
            _dbiModulePath        = dbiModulePath;
            _dacModulePath        = dacModulePath;

            VTableBuilder builder = AddInterface(IID_ICLRDebuggingLibraryProvider, validate: false);

            builder.AddMethod(new ProvideLibraryDelegate(ProvideLibrary));
            ILibraryProvider = builder.Complete();

            builder = AddInterface(IID_ICLRDebuggingLibraryProvider2, validate: false);
            builder.AddMethod(new ProvideLibrary2Delegate(ProvideLibrary2));
            builder.Complete();

            builder = AddInterface(IID_ICLRDebuggingLibraryProvider3, validate: false);
            builder.AddMethod(new ProvideWindowsLibraryDelegate(ProvideWindowsLibrary));
            builder.AddMethod(new ProvideUnixLibraryDelegate(ProvideUnixLibrary));
            builder.Complete();

            AddRef();
        }
Example #9
0
 private static void AddDebugDataSpaces2(VTableBuilder builder, SOSHost soshost)
 {
     AddDebugDataSpaces(builder, soshost);
     builder.AddMethod(new VirtualToPhysicalDelegate((self, virtualAddress, physicalAddress) => DebugClient.NotImplemented));
     builder.AddMethod(new GetVirtualTranslationPhysicalOffsetsDelegate((self, virtualAddress, offsets, offsetsSize, levels) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadHandleDataDelegate((self, handle, dataType, buffer, bufferSize, dataSize) => DebugClient.NotImplemented));
     builder.AddMethod(new FillVirtualDelegate((self, start, size, buffer, patternSize, filled) => DebugClient.NotImplemented));
     builder.AddMethod(new FillPhysicalDelegate((self, start, size, buffer, patternSize, filled) => DebugClient.NotImplemented));
     builder.AddMethod(new QueryVirtualDelegate((self, offset, info) => DebugClient.NotImplemented));
 }
Example #10
0
        public SymbolServiceWrapper(ISymbolService symbolService, IMemoryService memoryService)
        {
            Debug.Assert(symbolService != null);
            Debug.Assert(memoryService != null);
            _symbolService         = symbolService;
            _memoryService         = memoryService;
            _ignoreAddressBitsMask = memoryService.SignExtensionMask();
            Debug.Assert(_symbolService != null);

            VTableBuilder builder = AddInterface(IID_ISymbolService, validate: false);

            builder.AddMethod(new ParseSymbolPathDelegate(ParseSymbolPath));
            builder.AddMethod(new LoadSymbolsForModuleDelegate(LoadSymbolsForModule));
            builder.AddMethod(new DisposeDelegate(Dispose));
            builder.AddMethod(new ResolveSequencePointDelegate(ResolveSequencePoint));
            builder.AddMethod(new GetLocalVariableNameDelegate(GetLocalVariableName));
            builder.AddMethod(new GetLineByILOffsetDelegate(GetLineByILOffset));
            builder.AddMethod(new GetExpressionValueDelegate(GetExpressionValue));
            builder.AddMethod(new GetMetadataLocatorDelegate(GetMetadataLocator));
            builder.AddMethod(new GetICorDebugMetadataLocatorDelegate(GetICorDebugMetadataLocator));
            builder.Complete();

            AddRef();
        }
Example #11
0
        public TargetWrapper(ITarget target)
        {
            Debug.Assert(target != null);
            _target = target;

            VTableBuilder builder = AddInterface(IID_ITarget, validate: false);

            builder.AddMethod(new GetOperatingSystemDelegate(GetOperatingSystem));
            builder.AddMethod(new GetTempDirectoryDelegate(GetTempDirectory));
            builder.AddMethod(new GetRuntimeDirectoryDelegate(GetRuntimeDirectory));
            builder.AddMethod(new GetRuntimeDelegate(GetRuntime));
            builder.AddMethod(new FlushDelegate(Flush));
            builder.AddMethod(new CloseDelegate(Close));

            ITarget = builder.Complete();

            AddRef();
        }
Example #12
0
 private static void AddDebugClient(VTableBuilder builder, SOSHost soshost)
 {
     builder.AddMethod(new AttachKernelDelegate((self, flags, connectOptions) => NotImplemented));
     builder.AddMethod(new GetKernelConnectionOptionsDelegate((self, buffer, bufferSize, optionsSize) => NotImplemented));
     builder.AddMethod(new SetKernelConnectionOptionsDelegate((self, options) => NotImplemented));
     builder.AddMethod(new StartProcessServerDelegate((self, flags, options, reserved) => NotImplemented));
     builder.AddMethod(new ConnectProcessServerDelegate((self, remoteOptions, server) => NotImplemented));
     builder.AddMethod(new DisconnectProcessServerDelegate((self, server) => NotImplemented));
     builder.AddMethod(new GetRunningProcessSystemIdsDelegate((self, server, ids, count, actualCount) => NotImplemented));
     builder.AddMethod(new GetRunningProcessSystemIdByExecutableNameDelegate((self, server, exeName, flags, id) => NotImplemented));
     builder.AddMethod(new GetRunningProcessDescriptionDelegate((self, server, systemId, flags, exeName, exeNameSize, actualExeNameSize, description, descriptionSize, actualDescriptionSize) => NotImplemented));
     builder.AddMethod(new AttachProcessDelegate((self, server, processId, attachFlags) => NotImplemented));
     builder.AddMethod(new CreateProcessDelegate((self, server, commandLine, flags) => NotImplemented));
     builder.AddMethod(new CreateProcessAndAttachDelegate((self, server, commandLine, flags, processId, attachFlags) => NotImplemented));
     builder.AddMethod(new GetProcessOptionsDelegate((self, options) => NotImplemented));
     builder.AddMethod(new AddProcessOptionsDelegate((self, options) => NotImplemented));
     builder.AddMethod(new RemoveProcessOptionsDelegate((self, options) => NotImplemented));
     builder.AddMethod(new SetProcessOptionsDelegate((self, options) => NotImplemented));
     builder.AddMethod(new OpenDumpFileDelegate((self, dumpFile) => NotImplemented));
     builder.AddMethod(new WriteDumpFileDelegate((self, dumpFile, qualifier) => NotImplemented));
     builder.AddMethod(new ConnectSessionDelegate((self, flags, historyLimit) => NotImplemented));
     builder.AddMethod(new StartServerDelegate((self, options) => NotImplemented));
     builder.AddMethod(new OutputServerDelegate((self, outputControl, machine, flags) => NotImplemented));
     builder.AddMethod(new TerminateProcessesDelegate((self) => NotImplemented));
     builder.AddMethod(new DetachProcessesDelegate((self) => NotImplemented));
     builder.AddMethod(new EndSessionDelegate((self, flags) => NotImplemented));
     builder.AddMethod(new GetExitCodeDelegate((self, code) => NotImplemented));
     builder.AddMethod(new DispatchCallbacksDelegate((self, timeout) => NotImplemented));
     builder.AddMethod(new ExitDispatchDelegate((self, client) => NotImplemented));
     builder.AddMethod(new CreateClientDelegate((self, client) => NotImplemented));
     builder.AddMethod(new GetInputCallbacksDelegate((self, callbacks) => NotImplemented));
     builder.AddMethod(new SetInputCallbacksDelegate((self, callbacks) => NotImplemented));
     builder.AddMethod(new GetOutputCallbacksDelegate((self, callbacks) => NotImplemented));
     builder.AddMethod(new SetOutputCallbacksDelegate((self, callbacks) => NotImplemented));
     builder.AddMethod(new GetOutputMaskDelegate((self, mask) => NotImplemented));
     builder.AddMethod(new SetOutputMaskDelegate((self, mask) => NotImplemented));
     builder.AddMethod(new GetOtherOutputMaskDelegate((self, client, mask) => NotImplemented));
     builder.AddMethod(new SetOtherOutputMaskDelegate((self, client, mask) => NotImplemented));
     builder.AddMethod(new GetOutputWidthDelegate((self, columns) => NotImplemented));
     builder.AddMethod(new SetOutputWidthDelegate((self, columns) => NotImplemented));
     builder.AddMethod(new GetOutputLinePrefixDelegate((self, buffer, bufferSize, prefixSize) => NotImplemented));
     builder.AddMethod(new SetOutputLinePrefixDelegate((self, prefix) => NotImplemented));
     builder.AddMethod(new GetIdentityDelegate((self, buffer, bufferSize, identitySize) => NotImplemented));
     builder.AddMethod(new OutputIdentityDelegate((self, outputControl, flags, format) => NotImplemented));
     builder.AddMethod(new GetEventCallbacksDelegate((self, callbacks) => NotImplemented));
     builder.AddMethod(new SetEventCallbacksDelegate((self, callbacks) => NotImplemented));
     builder.AddMethod(new FlushCallbacksDelegate((self) => NotImplemented));
 }
Example #13
0
        /// <summary>
        /// Create an instance of the service wrapper SOS uses.
        /// </summary>
        /// <param name="dataReader">clrmd data reader instance</param>
        /// <param name="context">sos hosting context</param>
        public LLDBServicesWrapper(SOSHost host, IDataReader dataReader, ISOSHostContext context)
        {
            _sosHost    = host;
            _dataReader = dataReader;
            _context    = context;

            VTableBuilder builder = AddInterface(IID_ILLDBServices, validate: false);

            builder.AddMethod(new GetCoreClrDirectoryDelegate(GetCoreClrDirectory));
            builder.AddMethod(new GetExpressionDelegate(GetExpression));
            builder.AddMethod(new VirtualUnwindDelegate(VirtualUnwind));
            builder.AddMethod(new SetExceptionCallbackDelegate(SetExceptionCallback));
            builder.AddMethod(new ClearExceptionCallbackDelegate(ClearExceptionCallback));

            builder.AddMethod(new GetInterruptDelegate(GetInterrupt));
            builder.AddMethod(new OutputVaListDelegate(OutputVaList));
            builder.AddMethod(new GetDebuggerTypeDelegate(GetDebuggerType));
            builder.AddMethod(new GetPageSizeDelegate(GetPageSize));
            builder.AddMethod(new GetExecutingProcessorTypeDelegate(GetExecutingProcessorType));
            builder.AddMethod(new ExecuteDelegate(Execute));
            builder.AddMethod(new GetLastEventInformationDelegate(GetLastEventInformation));
            builder.AddMethod(new DisassembleDelegate(Disassemble));

            builder.AddMethod(new GetContextStackTraceDelegate(GetContextStackTrace));
            builder.AddMethod(new ReadVirtualDelegate(ReadVirtual));
            builder.AddMethod(new WriteVirtualDelegate(WriteVirtual));

            builder.AddMethod(new GetSymbolOptionsDelegate(GetSymbolOptions));
            builder.AddMethod(new GetNameByOffsetDelegate(GetNameByOffset));
            builder.AddMethod(new GetNumberModulesDelegate(GetNumberModules));
            builder.AddMethod(new GetModuleByIndexDelegate(GetModuleByIndex));
            builder.AddMethod(new GetModuleByModuleNameDelegate(GetModuleByModuleName));
            builder.AddMethod(new GetModuleByOffsetDelegate(GetModuleByOffset));
            builder.AddMethod(new GetModuleNamesDelegate(GetModuleNames));
            builder.AddMethod(new GetLineByOffsetDelegate(GetLineByOffset));
            builder.AddMethod(new GetSourceFileLineOffsetsDelegate(GetSourceFileLineOffsets));
            builder.AddMethod(new FindSourceFileDelegate(FindSourceFile));

            builder.AddMethod(new GetCurrentProcessIdDelegate(GetCurrentProcessId));
            builder.AddMethod(new GetCurrentThreadIdDelegate(GetCurrentThreadId));
            builder.AddMethod(new SetCurrentThreadIdDelegate(SetCurrentThreadId));
            builder.AddMethod(new GetCurrentThreadSystemIdDelegate(GetCurrentThreadSystemId));
            builder.AddMethod(new GetThreadIdBySystemIdDelegate(GetThreadIdBySystemId));
            builder.AddMethod(new GetThreadContextByIdDelegate(GetThreadContextById));

            builder.AddMethod(new GetValueByNameDelegate(GetValueByName));
            builder.AddMethod(new GetInstructionOffsetDelegate(GetInstructionOffset));
            builder.AddMethod(new GetStackOffsetDelegate(GetStackOffset));
            builder.AddMethod(new GetFrameOffsetDelegate(GetFrameOffset));

            ILLDBServices = builder.Complete();

            builder = AddInterface(IID_ILLDBServices2, validate: false);
            builder.AddMethod(new LoadNativeSymbolsDelegate2(LoadNativeSymbols2));
            builder.AddMethod(new AddModuleSymbolDelegate(AddModuleSymbol));
            builder.Complete();

            AddRef();
        }
Example #14
0
 private static void AddDebugDataSpaces(VTableBuilder builder, SOSHost soshost)
 {
     builder.AddMethod(new ReadVirtualDelegate(soshost.ReadVirtual));
     builder.AddMethod(new WriteVirtualDelegate(soshost.WriteVirtual));
     builder.AddMethod(new SearchVirtualDelegate((self, offset, length, pattern, patternSize, patternGranularity, matchOffset) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadVirtualUncachedDelegate((self, offset, buffer, bufferSize, bytesRead) => DebugClient.NotImplemented));
     builder.AddMethod(new WriteVirtualUncachedDelegate((self, offset, buffer, bufferSize, bytesWritten) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadPointersVirtualDelegate((self, count, offset, ptrs) => DebugClient.NotImplemented));
     builder.AddMethod(new WritePointersVirtualDelegate((self, count, offset, ptrs) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadPhysicalDelegate((self, offset, buffer, bufferSize, bytesRead) => DebugClient.NotImplemented));
     builder.AddMethod(new WritePhysicalDelegate((self, offset, buffer, bufferSize, bytesWritten) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadControlDelegate((self, processor, offset, buffer, bufferSize, bytesRead) => DebugClient.NotImplemented));
     builder.AddMethod(new WriteControlDelegate((self, processor, offset, buffer, bufferSize, bytesWritten) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadIoDelegate((self, interfaceType, busNumber, addressSpace, offset, buffer, bufferSize, bytesRead) => DebugClient.NotImplemented));
     builder.AddMethod(new WriteIoDelegate((self, interfaceType, busNumber, addressSpace, offset, buffer, bufferSize, bytesWritten) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadMsrDelegate((self, msr, msrValue) => DebugClient.NotImplemented));
     builder.AddMethod(new WriteMsrDelegate((self, msr, msrValue) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadBusDataDelegate((self, busDataType, busNumber, slotNumber, offset, buffer, bufferSize, bytesRead) => DebugClient.NotImplemented));
     builder.AddMethod(new WriteBusDataDelegate((self, busDataType, busNumber, slotNumber, offset, buffer, bufferSize, bytesWritten) => DebugClient.NotImplemented));
     builder.AddMethod(new CheckLowMemoryDelegate((self) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadDebuggerDataDelegate((self, index, buffer, bufferSize, dataSize) => DebugClient.E_NOTIMPL));
     builder.AddMethod(new ReadProcessorSystemDataDelegate((self, processor, index, buffer, bufferSize, dataSize) => DebugClient.NotImplemented));
 }
Example #15
0
        /// <summary>
        /// Create an instance of the service wrapper SOS uses.
        /// </summary>
        /// <param name="soshost">SOS host instance</param>
        internal LLDBServices(SOSHost soshost)
        {
            _soshost = soshost;

            VTableBuilder builder = AddInterface(IID_ILLDBServices, validate: false);

            builder.AddMethod(new GetCoreClrDirectoryDelegate(GetCoreClrDirectory));
            builder.AddMethod(new GetExpressionDelegate((self, expression) => SOSHost.GetExpression(expression)));
            builder.AddMethod(new VirtualUnwindDelegate(VirtualUnwind));
            builder.AddMethod(new SetExceptionCallbackDelegate(SetExceptionCallback));
            builder.AddMethod(new ClearExceptionCallbackDelegate(ClearExceptionCallback));

            builder.AddMethod(new GetInterruptDelegate(soshost.GetInterrupt));
            builder.AddMethod(new OutputVaListDelegate(soshost.OutputVaList));
            builder.AddMethod(new GetDebuggeeTypeDelegate(soshost.GetDebuggeeType));
            builder.AddMethod(new GetPageSizeDelegate(soshost.GetPageSize));
            builder.AddMethod(new GetExecutingProcessorTypeDelegate(soshost.GetExecutingProcessorType));
            builder.AddMethod(new ExecuteDelegate(soshost.Execute));
            builder.AddMethod(new GetLastEventInformationDelegate(soshost.GetLastEventInformation));
            builder.AddMethod(new DisassembleDelegate(soshost.Disassemble));

            builder.AddMethod(new GetContextStackTraceDelegate(GetContextStackTrace));
            builder.AddMethod(new ReadVirtualDelegate(soshost.ReadVirtual));
            builder.AddMethod(new WriteVirtualDelegate(soshost.WriteVirtual));

            builder.AddMethod(new GetSymbolOptionsDelegate(soshost.GetSymbolOptions));
            builder.AddMethod(new GetNameByOffsetDelegate(soshost.GetNameByOffset));
            builder.AddMethod(new GetNumberModulesDelegate(soshost.GetNumberModules));
            builder.AddMethod(new GetModuleByIndexDelegate(soshost.GetModuleByIndex));
            builder.AddMethod(new GetModuleByModuleNameDelegate(soshost.GetModuleByModuleName));
            builder.AddMethod(new GetModuleByOffsetDelegate(soshost.GetModuleByOffset));
            builder.AddMethod(new GetModuleNamesDelegate(soshost.GetModuleNames));
            builder.AddMethod(new GetLineByOffsetDelegate(soshost.GetLineByOffset));
            builder.AddMethod(new GetSourceFileLineOffsetsDelegate(soshost.GetSourceFileLineOffsets));
            builder.AddMethod(new FindSourceFileDelegate(soshost.FindSourceFile));

            builder.AddMethod(new GetCurrentProcessSystemIdDelegate(soshost.GetCurrentProcessSystemId));
            builder.AddMethod(new GetCurrentThreadIdDelegate(soshost.GetCurrentThreadId));
            builder.AddMethod(new SetCurrentThreadIdDelegate(soshost.SetCurrentThreadId));
            builder.AddMethod(new GetCurrentThreadSystemIdDelegate(soshost.GetCurrentThreadSystemId));
            builder.AddMethod(new GetThreadIdBySystemIdDelegate(soshost.GetThreadIdBySystemId));
            builder.AddMethod(new GetThreadContextBySystemIdDelegate(soshost.GetThreadContextBySystemId));

            builder.AddMethod(new GetValueByNameDelegate(GetValueByName));
            builder.AddMethod(new GetInstructionOffsetDelegate(soshost.GetInstructionOffset));
            builder.AddMethod(new GetStackOffsetDelegate(soshost.GetStackOffset));
            builder.AddMethod(new GetFrameOffsetDelegate(soshost.GetFrameOffset));

            ILLDBServices = builder.Complete();

            builder = AddInterface(IID_ILLDBServices2, validate: false);
            builder.AddMethod(new LoadNativeSymbolsDelegate2(LoadNativeSymbols2));
            builder.AddMethod(new AddModuleSymbolDelegate(AddModuleSymbol));
            builder.AddMethod(new GetModuleInfoDelegate(GetModuleInfo));
            builder.AddMethod(new GetModuleVersionInformationDelegate(soshost.GetModuleVersionInformation));
            builder.Complete();

            AddRef();
        }
Example #16
0
 void AddDataTarget2(VTableBuilder builder)
 {
     AddDataTarget(builder);
     builder.AddMethod(new AllocVirtualDelegate(AllocVirtual));
     builder.AddMethod(new FreeVirtualDelegate(FreeVirtual));
 }
Example #17
0
 void AddDataTarget(VTableBuilder builder)
 {
     builder.AddMethod(new GetMachineTypeDelegate(GetMachineType));
     builder.AddMethod(new GetPointerSizeDelegate(GetPointerSize));
     builder.AddMethod(new GetImageBaseDelegate(GetImageBase));
     builder.AddMethod(new ReadVirtualDelegate(ReadVirtual));
     builder.AddMethod(new WriteVirtualDelegate(WriteVirtual));
     builder.AddMethod(new GetTLSValueDelegate(GetTLSValue));
     builder.AddMethod(new SetTLSValueDelegate(SetTLSValue));
     builder.AddMethod(new GetCurrentThreadIDDelegate(GetCurrentThreadID));
     builder.AddMethod(new GetThreadContextDelegate(GetThreadContext));
     builder.AddMethod(new SetThreadContextDelegate(SetThreadContext));
     builder.AddMethod(new RequestDelegate(Request));
 }
        public SymbolServiceWrapper(IHost host)
        {
            Debug.Assert(host != null);
            _host          = host;
            _symbolService = host.Services.GetService <ISymbolService>();

            VTableBuilder builder = AddInterface(IID_ISymbolService, validate: false);

            builder.AddMethod(new IsSymbolStoreEnabledDelegate((IntPtr self) => _symbolService.IsSymbolStoreEnabled));
            builder.AddMethod(new InitializeSymbolStoreDelegate(InitializeSymbolStore));
            builder.AddMethod(new ParseSymbolPathDelegate(ParseSymbolPath));
            builder.AddMethod(new DisplaySymbolStoreDelegate(DisplaySymbolStore));
            builder.AddMethod(new DisableSymbolStoreDelegate((IntPtr self) => _symbolService.DisableSymbolStore()));
            builder.AddMethod(new LoadNativeSymbolsDelegate(LoadNativeSymbols));
            builder.AddMethod(new LoadNativeSymbolsFromIndexDelegate(LoadNativeSymbolsFromIndex));
            builder.AddMethod(new LoadSymbolsForModuleDelegate(LoadSymbolsForModule));
            builder.AddMethod(new DisposeDelegate(Dispose));
            builder.AddMethod(new ResolveSequencePointDelegate(ResolveSequencePoint));
            builder.AddMethod(new GetLocalVariableNameDelegate(GetLocalVariableName));
            builder.AddMethod(new GetLineByILOffsetDelegate(GetLineByILOffset));
            builder.AddMethod(new GetExpressionValueDelegate(GetExpressionValue));
            builder.AddMethod(new GetMetadataLocatorDelegate(GetMetadataLocator));
            builder.AddMethod(new GetICorDebugMetadataLocatorDelegate(GetICorDebugMetadataLocator));
            builder.Complete();
        }
Example #19
0
 private static void AddDebugSystemObjects(VTableBuilder builder, SOSHost soshost)
 {
     builder.AddMethod(new GetEventThreadDelegate((self, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetEventProcessDelegate((self, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentThreadIdDelegate(soshost.GetCurrentThreadId));
     builder.AddMethod(new SetCurrentThreadIdDelegate(soshost.SetCurrentThreadId));
     builder.AddMethod(new GetCurrentProcessIdDelegate(soshost.GetCurrentProcessId));
     builder.AddMethod(new SetCurrentProcessIdDelegate((self, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetNumberThreadsDelegate(soshost.GetNumberThreads));
     builder.AddMethod(new GetTotalNumberThreadsDelegate(soshost.GetTotalNumberThreads));
     builder.AddMethod(new GetThreadIdsByIndexDelegate(soshost.GetThreadIdsByIndex));
     builder.AddMethod(new GetThreadIdByProcessorDelegate((self, processor, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentThreadDataOffsetDelegate((self, offset) => DebugClient.NotImplemented));
     builder.AddMethod(new GetThreadIdByDataOffsetDelegate((self, offset, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentThreadTebDelegate(soshost.GetCurrentThreadTeb));
     builder.AddMethod(new GetThreadIdByTebDelegate((self, offset, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentThreadSystemIdDelegate(soshost.GetCurrentThreadSystemId));
     builder.AddMethod(new GetThreadIdBySystemIdDelegate(soshost.GetThreadIdBySystemId));
     builder.AddMethod(new GetCurrentThreadHandleDelegate((self, handle) => DebugClient.NotImplemented));
     builder.AddMethod(new GetThreadIdByHandleDelegate((self, handle, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetNumberProcessesDelegate((self, number) => DebugClient.NotImplemented));
     builder.AddMethod(new GetProcessIdsByIndexDelegate((self, start, count, ids, sysIds) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentProcessDataOffsetDelegate((self, offset) => DebugClient.NotImplemented));
     builder.AddMethod(new GetProcessIdByDataOffsetDelegate((self, offset, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentProcessPebDelegate((self, offset) => DebugClient.NotImplemented));
     builder.AddMethod(new GetProcessIdByPebDelegate((self, offset, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentProcessSystemIdDelegate((self, sysId) => DebugClient.NotImplemented));
     builder.AddMethod(new GetProcessIdBySystemIdDelegate((self, sysId, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentProcessHandleDelegate((self, handle) => DebugClient.NotImplemented));
     builder.AddMethod(new GetProcessIdByHandleDelegate((self, handle, id) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCurrentProcessExecutableNameDelegate((self, buffer, bufferSize, exeSize) => DebugClient.NotImplemented));
 }
 private static void AddDebugControl(VTableBuilder builder, SOSHost soshost)
 {
     builder.AddMethod(new GetInterruptDelegate(soshost.GetInterrupt));
     builder.AddMethod(new SetInterruptDelegate((self, flags) => HResult.S_OK));
     builder.AddMethod(new GetInterruptTimeoutDelegate((self, seconds) => DebugClient.NotImplemented));
     builder.AddMethod(new SetInterruptTimeoutDelegate((self, seconds) => DebugClient.NotImplemented));
     builder.AddMethod(new GetLogFileDelegate((self, buffer, bufferSize, fileSize, append) => DebugClient.NotImplemented));
     builder.AddMethod(new OpenLogFileDelegate((self, file, append) => DebugClient.NotImplemented));
     builder.AddMethod(new CloseLogFileDelegate((self) => DebugClient.NotImplemented));
     builder.AddMethod(new GetLogMaskDelegate((self, mask) => DebugClient.NotImplemented));
     builder.AddMethod(new SetLogMaskDelegate((self, mask) => DebugClient.NotImplemented));
     builder.AddMethod(new InputDelegate((self, buffer, bufferSize, inputSize) => DebugClient.NotImplemented));
     builder.AddMethod(new ReturnInputDelegate((self, buffer) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputDelegate((self, mask, format) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputVaListDelegate(soshost.OutputVaList));
     builder.AddMethod(new ControlledOutputDelegate((self, outputControl, mask, format) => DebugClient.NotImplemented));
     builder.AddMethod(new ControlledOutputVaListDelegate((self, outputControl, mask, format, valist) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputPromptDelegate((self, outputControl, format) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputPromptVaListDelegate((self, outputControl, format, valist) => DebugClient.NotImplemented));
     builder.AddMethod(new GetPromptTextDelegate((self, buffer, bufferSize, textSize) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputCurrentStateDelegate((self, outputControl, flags) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputVersionInformationDelegate((self, outputControl) => DebugClient.NotImplemented));
     builder.AddMethod(new GetNotifyEventHandleDelegate((self, handle) => DebugClient.NotImplemented));
     builder.AddMethod(new SetNotifyEventHandleDelegate((self, handle) => DebugClient.NotImplemented));
     builder.AddMethod(new AssembleDelegate((self, offset, instr, endoffset) => DebugClient.NotImplemented));
     builder.AddMethod(new DisassembleDelegate(soshost.Disassemble));
     builder.AddMethod(new GetDisassembleEffectiveOffsetDelegate((self, offset) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputDisassemblyDelegate((self, outputControl, offset, flags, endOffset) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputDisassemblyLinesDelegate((self, outputControl, previousLines, totalLines, offset, flags, offsetLine, startOffset, EndOffset, lineOffsets) => DebugClient.NotImplemented));
     builder.AddMethod(new GetNearInstructionDelegate((self, offset, delta, nearOffset) => DebugClient.NotImplemented));
     builder.AddMethod(new GetStackTraceDelegate((self, frameOffset, stackOffset, instructionOffset, frames, frameSize, framesFilled) => DebugClient.NotImplemented));
     builder.AddMethod(new GetReturnOffsetDelegate((self, offset) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputStackTraceDelegate((self, outputControl, frames, frameSize, flags) => DebugClient.NotImplemented));
     builder.AddMethod(new GetDebuggeeTypeDelegate(soshost.GetDebuggeeType));
     builder.AddMethod(new GetActualProcessorTypeDelegate((self, type) => DebugClient.NotImplemented));
     builder.AddMethod(new GetExecutingProcessorTypeDelegate(soshost.GetExecutingProcessorType));
     builder.AddMethod(new GetNumberPossibleExecutingProcessorTypesDelegate((self, number) => DebugClient.NotImplemented));
     builder.AddMethod(new GetPossibleExecutingProcessorTypesDelegate((self, start, count, types) => DebugClient.NotImplemented));
     builder.AddMethod(new GetNumberProcessorsDelegate((self, number) => DebugClient.NotImplemented));
     builder.AddMethod(new GetSystemVersionDelegate((self, platformId, major, minor, servicePack, servicePackSize, servicePackUsed, servicePackNumber, buildString, buildStringSize, buildStringUse) => DebugClient.NotImplemented));
     builder.AddMethod(new GetPageSizeDelegate(soshost.GetPageSize));
     builder.AddMethod(new IsPointer64BitDelegate((self) => DebugClient.NotImplemented));
     builder.AddMethod(new ReadBugCheckDataDelegate((self, code, arg1, arg2, arg3, arg4) => DebugClient.NotImplemented));
     builder.AddMethod(new GetNumberSupportedProcessorTypesDelegate((self, number) => DebugClient.NotImplemented));
     builder.AddMethod(new GetSupportedProcessorTypesDelegate((self, start, count, types) => DebugClient.NotImplemented));
     builder.AddMethod(new GetProcessorTypeNamesDelegate((self, type, fullNameBuffer, fullNameBufferSize, fullNameSize, abbrevNameBuffer, abbrevNameBufferSize, abbrevNameSize) => DebugClient.NotImplemented));
     builder.AddMethod(new GetEffectiveProcessorTypeDelegate((self, type) => DebugClient.NotImplemented));
     builder.AddMethod(new SetEffectiveProcessorTypeDelegate((self, type) => DebugClient.NotImplemented));
     builder.AddMethod(new GetExecutionStatusDelegate((self, status) => DebugClient.NotImplemented));
     builder.AddMethod(new SetExecutionStatusDelegate((self, status) => DebugClient.NotImplemented));
     builder.AddMethod(new GetCodeLevelDelegate((self, level) => DebugClient.NotImplemented));
     builder.AddMethod(new SetCodeLevelDelegate((self, level) => DebugClient.NotImplemented));
     builder.AddMethod(new GetEngineOptionsDelegate((self, options) => HResult.E_NOTIMPL));
     builder.AddMethod(new AddEngineOptionsDelegate((self, options) => HResult.E_NOTIMPL));
     builder.AddMethod(new RemoveEngineOptionsDelegate((self, options) => DebugClient.NotImplemented));
     builder.AddMethod(new SetEngineOptionsDelegate((self, options) => DebugClient.NotImplemented));
     builder.AddMethod(new GetSystemErrorControlDelegate((self, outputLevel, breakLevel) => DebugClient.NotImplemented));
     builder.AddMethod(new SetSystemErrorControlDelegate((self, outputLevel, breakLevel) => DebugClient.NotImplemented));
     builder.AddMethod(new GetTextMacroDelegate((self, slot, buffer, bufferSize, macroSize) => DebugClient.NotImplemented));
     builder.AddMethod(new SetTextMacroDelegate((self, slot, macro) => DebugClient.NotImplemented));
     builder.AddMethod(new GetRadixDelegate((self, radix) => DebugClient.NotImplemented));
     builder.AddMethod(new SetRadixDelegate((self, radix) => DebugClient.NotImplemented));
     builder.AddMethod(new EvaluateDelegate((self, expression, desiredType, value, remainderIndex) => DebugClient.NotImplemented));
     builder.AddMethod(new CoerceValueDelegate((self, inValue, outType, outValue) => DebugClient.NotImplemented));
     builder.AddMethod(new CoerceValuesDelegate((self, count, inValues, outTypes, outValues) => DebugClient.NotImplemented));
     builder.AddMethod(new ExecuteDelegate(soshost.Execute));
     builder.AddMethod(new ExecuteCommandFileDelegate((self, outputControl, commandFile, flags) => DebugClient.NotImplemented));
     builder.AddMethod(new GetNumberBreakpointsDelegate((self, number) => DebugClient.NotImplemented));
     builder.AddMethod(new GetBreakpointByIndexDelegate((self, index, bp) => DebugClient.NotImplemented));
     builder.AddMethod(new GetBreakpointByIdDelegate((self, id, bp) => DebugClient.NotImplemented));
     builder.AddMethod(new GetBreakpointParametersDelegate((self, count, ids, start, bpParams) => DebugClient.NotImplemented));
     builder.AddMethod(new AddBreakpointDelegate((self, type, desiredid, bp) => DebugClient.NotImplemented));
     builder.AddMethod(new RemoveBreakpointDelegate((self, bp) => DebugClient.NotImplemented));
     builder.AddMethod(new AddExtensionDelegate((self, path, flags, handle) => DebugClient.NotImplemented));
     builder.AddMethod(new RemoveExtensionDelegate((self, handle) => DebugClient.NotImplemented));
     builder.AddMethod(new GetExtensionByPathDelegate((self, path, handle) => DebugClient.NotImplemented));
     builder.AddMethod(new CallExtensionDelegate((self, handle, function, arguments) => DebugClient.NotImplemented));
     builder.AddMethod(new GetExtensionFunctionDelegate((self, handle, functionName, function) => DebugClient.NotImplemented));
     builder.AddMethod(new GetWindbgExtensionApis32Delegate((self, api) => DebugClient.NotImplemented));
     builder.AddMethod(new GetWindbgExtensionApis64Delegate((self, api) => DebugClient.NotImplemented));
     builder.AddMethod(new GetNumberEventFiltersDelegate((self, specificEvents, specificExceptions, arbitraryExceptions) => DebugClient.NotImplemented));
     builder.AddMethod(new GetEventFilterTextDelegate((self, index, buffer, bufferSize, textSize) => DebugClient.NotImplemented));
     builder.AddMethod(new GetEventFilterCommandDelegate((self, index, buffer, bufferSize, commandSize) => DebugClient.NotImplemented));
     builder.AddMethod(new SetEventFilterCommandDelegate((self, index, command) => DebugClient.NotImplemented));
     builder.AddMethod(new GetSpecificFilterParametersDelegate((self, start, count, filterParams) => DebugClient.NotImplemented));
     builder.AddMethod(new SetSpecificFilterParametersDelegate((self, start, count, filterParams) => DebugClient.NotImplemented));
     builder.AddMethod(new GetSpecificEventFilterArgumentDelegate((self, index, buffer, bufferSize, argumentSize) => DebugClient.NotImplemented));
     builder.AddMethod(new SetSpecificEventFilterArgumentDelegate((self, index, argument) => DebugClient.NotImplemented));
     builder.AddMethod(new GetExceptionFilterParametersDelegate((self, count, codes, start, filterParams) => DebugClient.NotImplemented));
     builder.AddMethod(new SetExceptionFilterParametersDelegate((self, count, filterParams) => DebugClient.NotImplemented));
     builder.AddMethod(new GetExceptionFilterSecondCommandDelegate((self, index, buffer, bufferSize, commandSize) => DebugClient.NotImplemented));
     builder.AddMethod(new SetExceptionFilterSecondCommandDelegate((self, index, command) => DebugClient.NotImplemented));
     builder.AddMethod(new WaitForEventDelegate((self, flags, timeout) => DebugClient.NotImplemented));
     builder.AddMethod(new GetLastEventInformationDelegate(soshost.GetLastEventInformation));
 }
Example #21
0
 private static void AddDebugRegisters(VTableBuilder builder, SOSHost soshost)
 {
     builder.AddMethod(new GetNumberRegistersDelegate((self, number) => DebugClient.NotImplemented));
     builder.AddMethod(new GetDescriptionDelegate((self, register, nameBuffer, nameBufferSize, nameSize, desc) => DebugClient.NotImplemented));
     builder.AddMethod(new GetIndexByNameDelegate(soshost.GetIndexByName));
     builder.AddMethod(new GetValueDelegate(soshost.GetValue));
     builder.AddMethod(new SetValueDelegate((self, register, value) => DebugClient.NotImplemented));
     builder.AddMethod(new GetValuesDelegate((self, count, indices, start, values) => DebugClient.NotImplemented));
     builder.AddMethod(new SetValuesDelegate((self, count, indices, start, values) => DebugClient.NotImplemented));
     builder.AddMethod(new OutputRegistersDelegate((self, outputControl, flags) => DebugClient.NotImplemented));
     builder.AddMethod(new GetInstructionOffsetDelegate(soshost.GetInstructionOffset));
     builder.AddMethod(new GetStackOffsetDelegate(soshost.GetStackOffset));
     builder.AddMethod(new GetFrameOffsetDelegate(soshost.GetFrameOffset));
 }
Example #22
0
        public ManagedCallbackWrapper(DebuggeeInfo startInfo)
        {
            _startInfo = startInfo;

            VTableBuilder builder = AddInterface(IID_ICorDebugManagedCallback, validate: false);

            builder.AddMethod(new BreakpointDelegate((self, pAppDomain, pThread, pBreakpoint) => HResult.E_NOTIMPL));
            builder.AddMethod(new StepCompleteDelegate((self, pAppDomain, pThread, pStepper, reason) => HResult.E_NOTIMPL));
            builder.AddMethod(new BreakDelegate((self, pAppDomain, pThread) => WriteLine("Break")));
            builder.AddMethod(new ExceptionDelegate((self, pAppDomain, pThread, unhandled) => WriteLine("Exception")));
            builder.AddMethod(new EvalCompleteDelegate((self, pAppDomain, pThread, pEval) => HResult.E_NOTIMPL));
            builder.AddMethod(new EvalExceptionDelegate((self, pAppDomain, pThread, pEval) => HResult.E_NOTIMPL));
            builder.AddMethod(new CreateProcessDelegate((self, pProcess) => CreateProcess(pProcess)));
            builder.AddMethod(new ExitProcessDelegate((self, pProcess) => WriteLine("ExitProcess")));
            builder.AddMethod(new CreateThreadDelegate((self, pAppDomain, pThread) => HResult.E_NOTIMPL));
            builder.AddMethod(new ExitThreadDelegate((self, pAppDomain, pThread) => HResult.E_NOTIMPL));
            builder.AddMethod(new LoadModuleDelegate((self, pAppDomain, pModule) => HResult.E_NOTIMPL));
            builder.AddMethod(new UnloadModuleDelegate((self, pAppDomain, pModule) => HResult.E_NOTIMPL));
            builder.AddMethod(new LoadClassDelegate((self, pAppDomain, c) => HResult.E_NOTIMPL));
            builder.AddMethod(new UnloadClassDelegate((self, pAppDomain, c) => HResult.E_NOTIMPL));
            builder.AddMethod(new DebuggerErrorDelegate((self, pProcess, errorHR, errorCode) => WriteLine($"DebuggerError {errorHR} {errorCode:X8}")));
            builder.AddMethod(new LogMessageDelegate((self, pAppDomain, pThread, lLevel, pLogSwitchName, pMessage) => HResult.E_NOTIMPL));
            builder.AddMethod(new LogSwitchDelegate((self, pAppDomain, pThread, lLevel, ulReason, pLogSwitchName, pParentName) => HResult.E_NOTIMPL));
            builder.AddMethod(new CreateAppDomainDelegate((self, pProcess, pAppDomain) => HResult.E_NOTIMPL));
            builder.AddMethod(new ExitAppDomainDelegate((self, pProcess, pAppDomain) => HResult.E_NOTIMPL));
            builder.AddMethod(new LoadAssemblyDelegate((self, pAppDomain, pAssembly) => HResult.E_NOTIMPL));
            builder.AddMethod(new UnloadAssemblyDelegate((self, pAppDomain, pAssembly) => HResult.E_NOTIMPL));
            builder.AddMethod(new ControlCTrapDelegate((self, pProcess) => HResult.E_NOTIMPL));
            builder.AddMethod(new NameChangeDelegate((self, pAppDomain, pThread) => HResult.E_NOTIMPL));
            builder.AddMethod(new UpdateModuleSymbolsDelegate((self, pAppDomain, pModule, pSymbolStream) => HResult.E_NOTIMPL));
            builder.AddMethod(new EditAndContinueRemapDelegate((self, pAppDomain, pThread, pFunction, fAccurate) => HResult.E_NOTIMPL));
            builder.AddMethod(new BreakpointSetErrorDelegate((self, pAppDomain, pThread, pBreakpoint, dwError) => HResult.E_NOTIMPL));
            ICorDebugManagedCallback = builder.Complete();

            builder = AddInterface(IID_ICorDebugManagedCallback2, validate: false);
            builder.AddMethod(new FunctionRemapOpportunityDelegate((self, pAppDomain, pThread, pOldFunction, pNewFunction, oldILOffset) => HResult.E_NOTIMPL));
            builder.AddMethod(new CreateConnectionDelegate((IntPtr self, IntPtr pProcess, uint dwConnectionId, ref ushort pConnName) => HResult.E_NOTIMPL));
            builder.AddMethod(new ChangeConnectionDelegate((self, pProcess, dwConnectionId) => HResult.E_NOTIMPL));
            builder.AddMethod(new DestroyConnectionDelegate((self, pProcess, dwConnectionId) => HResult.E_NOTIMPL));
            builder.AddMethod(new ExceptionDelegate2((self, pAppDomain, pThread, pFrame, nOffset, dwEventType, dwFlags) => HResult.E_NOTIMPL));
            builder.AddMethod(new ExceptionUnwindDelegate((self, pAppDomain, pThread, dwEventType, dwFlags) => HResult.E_NOTIMPL));
            builder.AddMethod(new FunctionRemapCompleteDelegate((self, pAppDomain, pThread, pFunction) => HResult.E_NOTIMPL));
            builder.AddMethod(new MDANotificationDelegate((self, pController, pThread, pMDA) => HResult.E_NOTIMPL));
            builder.Complete();

            AddRef();
        }