//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public override void RefreshErrorBreakpoints() { // // Refresh the status of any previously failed breakpoints. Ignore any DebuggeeBreakpointError base class objects. // LoggingUtils.PrintFunction(); foreach (IDebugErrorBreakpoint2 errorBreakpoint in m_errorBreakpoints.ToArray()) { if (errorBreakpoint is CLangDebuggeeBreakpointError) { RefreshBreakpoint(errorBreakpoint); } } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public void CreateChildVariables(MiVariable parentVariable, int depth) { LoggingUtils.PrintFunction(); if ((depth > 0) && (parentVariable.HasChildren)) { MiVariable [] evaluatedChildren = GetChildVariables(parentVariable, depth); foreach (MiVariable child in evaluatedChildren) { CreateChildVariables(child, depth - 1); parentVariable.AddChild(child); } } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public LaunchProps [] GetLaunchPropsFromProjectProperties(IDictionary <string, string> projectProperties) { LoggingUtils.PrintFunction(); bool debuggerPropCheckJni = EvaluateProjectProperty(projectProperties, "AndroidPlusPlusDebugger", "DebuggerPropCheckJni").Equals("true"); bool debuggerPropEglCallstack = EvaluateProjectProperty(projectProperties, "AndroidPlusPlusDebugger", "DebuggerPropEglCallstack").Equals("true"); List <LaunchProps> launchProps = new List <LaunchProps> (); launchProps.Add(new LaunchProps("debug.checkjni", (debuggerPropCheckJni) ? "1" : "0")); launchProps.Add(new LaunchProps("debug.egl.callstack", (debuggerPropEglCallstack) ? "1" : "0")); return(launchProps.ToArray()); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int ParseText(string pszCode, enum_PARSEFLAGS dwFlags, uint nRadix, out IDebugExpression2 ppExpr, out string pbstrError, out uint pichError) { // // Parses an expression in text form for later evaluation. // LoggingUtils.PrintFunction(); ppExpr = new DebuggeeExpression(m_debugEngine, this, pszCode, nRadix); pbstrError = string.Empty; pichError = (uint)pbstrError.Length; return(Constants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int Next(int celt, T [] rgelt, IntPtr celtFetched) { // // Retrieves a specified number of ports in an enumeration sequence. // LoggingUtils.PrintFunction(); uint fetched; int hr = Move((uint)celt, rgelt, out fetched); celtFetched = (IntPtr)fetched; return(hr); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #region IDebuggerConnectionService Members //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int LaunchDialogShow() { LoggingUtils.PrintFunction(); try { if (m_debuggerConnectionWindow == null) { m_debuggerConnectionWindow = new DebuggerConnectionWindow(); m_debuggerConnectionWindow.Closed += LaunchWindowClosed; } if (m_debuggerConnectionWindow == null) { throw new InvalidOperationException("Failed to create connection window"); } lock (m_debuggerConnectionWindow) { m_debuggerConnectionWindow.Dispatcher.Invoke((Action)(() => { m_debuggerConnectionWindow.textBox1.BeginChange(); m_debuggerConnectionWindow.textBox1.Text = m_textBuffer.ToString(); m_debuggerConnectionWindow.textBox1.EndChange(); m_debuggerConnectionWindow.textBox1.ScrollToEnd(); m_debuggerConnectionWindow.progressBar1.IsIndeterminate = true; m_debuggerConnectionWindow.Show(); m_debuggerConnectionWindow.Activate(); })); } return(VSConstants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); return(VSConstants.E_FAIL); } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public void Unadvise(int dwCookie) { // // Terminates an advisory connection previously established through the System.Runtime.InteropServices.ComTypes.IConnectionPoint.Advise(System.Object,System.Int32@) method. // LoggingUtils.PrintFunction(); try { m_eventConnectionPoints.Remove(dwCookie); } catch (Exception e) { LoggingUtils.HandleException(e); } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int OnTerminateClient(JavaLangDebugger debugger) { LoggingUtils.PrintFunction(); try { debugger.JdbClient.Terminate(); return(Constants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); throw; } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int GetThread(out IDebugThread2 thread) { // // Gets the thread associated with a stack frame. // LoggingUtils.PrintFunction(); thread = m_thread; if (thread == null) { return(Constants.S_FALSE); } return(Constants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public virtual int Enable(int fEnable) { // // Enables or disables the breakpoint. // LoggingUtils.PrintFunction(); m_breakpointEnabled = (fEnable != 0); if (m_breakpointDeleted) { return(Constants.E_BP_DELETED); } return(Constants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public virtual int GetBreakpointResolution(out IDebugBreakpointResolution2 ppBPResolution) { // // Gets the breakpoint resolution that describes this breakpoint. // LoggingUtils.PrintFunction(); ppBPResolution = m_breakpointResolution; if (m_breakpointDeleted) { return(Constants.E_BP_DELETED); } return(Constants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public virtual int GetHitCount(out uint pdwHitCount) { // // Gets the current hit count for this bound breakpoint. // LoggingUtils.PrintFunction(); pdwHitCount = m_hitCount; if (m_breakpointDeleted) { return(Constants.E_BP_DELETED); } return(Constants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public virtual int GetPendingBreakpoint(out IDebugPendingBreakpoint2 ppPendingBreakpoint) { // // Gets the pending breakpoint from which the specified bound breakpoint was created. // LoggingUtils.PrintFunction(); ppPendingBreakpoint = m_pendingBreakpoint; if (m_breakpointDeleted) { return(Constants.E_BP_DELETED); } return(Constants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public virtual int SetHitCount(uint dwHitCount) { // // Sets the hit count for this bound breakpoint. // LoggingUtils.PrintFunction(); m_hitCount = dwHitCount; if (m_breakpointDeleted) { return(Constants.E_BP_DELETED); } return(Constants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int OnContinueClient(CLangDebugger debugger) { LoggingUtils.PrintFunction(); try { debugger.GdbClient.Continue(); return(Constants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); throw; } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int OnTerminateServer(CLangDebugger debugger) { LoggingUtils.PrintFunction(); try { debugger.GdbServer.Kill(); return(Constants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); throw; } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #region IDebugProgramProvider2 Members //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int GetProviderProcessData(enum_PROVIDER_FLAGS Flags, IDebugDefaultPort2 port, AD_PROCESS_ID ProcessId, CONST_GUID_ARRAY EngineFilter, PROVIDER_PROCESS_DATA [] processArray) { // // Retrieves a list of running programs from a specified process. // LoggingUtils.PrintFunction(); try { processArray [0] = new PROVIDER_PROCESS_DATA(); if ((Flags & enum_PROVIDER_FLAGS.PFLAG_GET_PROGRAM_NODES) != 0) { // The debugger is asking the engine to return the program nodes it can debug. The // sample engine claims that it can debug all processes, and returns exactly one // program node for each process. A full-featured debugger may wish to examine the // target process and determine if it understands how to debug it. IDebugProgramNode2 node = (IDebugProgramNode2)(new DebuggeeProgram(null)); IntPtr [] programNodes = { Marshal.GetComInterfaceForObject(node, typeof(IDebugProgramNode2)) }; IntPtr destinationArray = Marshal.AllocCoTaskMem(IntPtr.Size * programNodes.Length); Marshal.Copy(programNodes, 0, destinationArray, programNodes.Length); processArray [0].Fields = enum_PROVIDER_FIELDS.PFIELD_PROGRAM_NODES; processArray [0].ProgramNodes.Members = destinationArray; processArray [0].ProgramNodes.dwCount = (uint)programNodes.Length; return(Constants.S_OK); } return(Constants.S_FALSE); } catch (Exception e) { LoggingUtils.HandleException(e); return(Constants.E_FAIL); } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public void Refresh(ref MiResultValue threadData) { LoggingUtils.PrintFunction(); if (threadData.HasField("name")) { m_threadDisplayName = threadData ["name"] [0].GetString(); // user-specified name } else if (threadData.HasField("target-id")) { uint threadPid; m_threadDisplayName = threadData ["target-id"] [0].GetString(); // usually the raw name, i.e. 'Thread 18771' if (m_threadDisplayName.StartsWith("Thread ") && uint.TryParse(m_threadDisplayName.Substring("Thread ".Length), out threadPid)) { AndroidDevice hostDevice = NativeProgram.DebugProgram.DebugProcess.NativeProcess.HostDevice; AndroidProcess threadProcess = hostDevice.GetProcessFromPid(threadPid); if (threadProcess != null) { m_threadDisplayName = threadProcess.Name; } } } if (threadData.HasField("frame")) { MiResultValueTuple frameTuple = threadData ["frame"] [0] as MiResultValueTuple; uint stackLevel = frameTuple ["level"] [0].GetUnsignedInt(); string stackFrameId = m_threadName + "#" + stackLevel; CLangDebuggeeStackFrame stackFrame = new CLangDebuggeeStackFrame(m_debugger, this, frameTuple, stackFrameId); lock (m_threadStackFrames) { m_threadStackFrames.Add(stackFrame); } } RequiresRefresh = false; }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public static CLangDebuggeeCodeContext GetCodeContextForDocumentContext(CLangDebugger debugger, DebuggeeDocumentContext documentContext) { LoggingUtils.PrintFunction(); string fileName; TEXT_POSITION [] startOffset = new TEXT_POSITION [1]; TEXT_POSITION [] endOffset = new TEXT_POSITION [1]; LoggingUtils.RequireOk(documentContext.GetName(enum_GETNAME_TYPE.GN_FILENAME, out fileName)); LoggingUtils.RequireOk(documentContext.GetStatementRange(startOffset, endOffset)); string location = string.Format("\"{0}:{1}\"", fileName, startOffset [0].dwLine + 1); return(GetCodeContextForLocation(debugger, location)); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public CLangDebuggeeModule GetModule (string moduleName) { LoggingUtils.PrintFunction (); if (string.IsNullOrWhiteSpace (moduleName)) { throw new ArgumentNullException ("moduleName"); } DebuggeeModule module = null; lock (m_debugModules) { m_debugModules.TryGetValue (moduleName, out module); } return (CLangDebuggeeModule) module; }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int EnumCodeContexts (IDebugDocumentPosition2 pDocPos, out IEnumDebugCodeContexts2 ppEnum) { // // Enumerates the code contexts for a given position in a source file. // LoggingUtils.PrintFunction (); try { string fileName; TEXT_POSITION [] startPos = new TEXT_POSITION [1]; TEXT_POSITION [] endPos = new TEXT_POSITION [1]; LoggingUtils.RequireOk (pDocPos.GetFileName (out fileName)); LoggingUtils.RequireOk (pDocPos.GetRange (startPos, endPos)); DebuggeeDocumentContext documentContext = new DebuggeeDocumentContext (m_debugger.Engine, fileName, startPos [0], endPos [0]); CLangDebuggeeCodeContext codeContext = CLangDebuggeeCodeContext.GetCodeContextForDocumentContext (m_debugger, documentContext); if (codeContext == null) { throw new InvalidOperationException ("Failed evaluating code-context for location."); } CLangDebuggeeCodeContext [] codeContexts = new CLangDebuggeeCodeContext [] { codeContext }; ppEnum = new DebuggeeCodeContext.Enumerator (codeContexts); return Constants.S_OK; } catch (Exception e) { LoggingUtils.HandleException (e); ppEnum = null; return Constants.E_FAIL; } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int OnDebuggerConnectionEvent(IDebugEngine2 pEngine, IDebugProcess2 pProcess, IDebugProgram2 pProgram, IDebugThread2 pThread, IDebugEvent2 pEvent, ref Guid riidEvent, uint dwAttrib) { LoggingUtils.PrintFunction(); try { DebugEngineEvent.DebuggerConnectionEvent debuggerConnectionEvent = pEvent as DebugEngineEvent.DebuggerConnectionEvent; switch (debuggerConnectionEvent.Type) { case DebugEngineEvent.DebuggerConnectionEvent.EventType.ShowDialog: { LoggingUtils.RequireOk(m_debuggerConnectionService.LaunchDialogShow()); break; } case DebugEngineEvent.DebuggerConnectionEvent.EventType.CloseDialog: { LoggingUtils.RequireOk(m_debuggerConnectionService.LaunchDialogClose()); break; } case DebugEngineEvent.DebuggerConnectionEvent.EventType.LogStatus: case DebugEngineEvent.DebuggerConnectionEvent.EventType.LogError: { bool isError = (debuggerConnectionEvent.Type == DebugEngineEvent.DebuggerConnectionEvent.EventType.LogError); LoggingUtils.RequireOk(m_debuggerConnectionService.LaunchDialogUpdate(debuggerConnectionEvent.Message, isError)); break; } } return(VSConstants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); return(VSConstants.E_FAIL); } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int EnumCodeContexts(IDebugDocumentPosition2 pDocPos, out IEnumDebugCodeContexts2 ppEnum) { // // Enumerates the code contexts for a given position in a source file. // LoggingUtils.PrintFunction(); try { string fileName; TEXT_POSITION [] startPos = new TEXT_POSITION [1]; TEXT_POSITION [] endPos = new TEXT_POSITION [1]; LoggingUtils.RequireOk(pDocPos.GetFileName(out fileName)); LoggingUtils.RequireOk(pDocPos.GetRange(startPos, endPos)); string location = string.Format("\"{0}:{1}\"", fileName, startPos [0].dwLine + 1); DebuggeeCodeContext codeContext = m_debugger.GetCodeContextForLocation(location); if (codeContext == null) { throw new InvalidOperationException("Failed evaluating code-context for location."); } DebuggeeCodeContext [] codeContexts = new DebuggeeCodeContext [] { codeContext }; ppEnum = new DebuggeeCodeContext.Enumerator(codeContexts); return(Constants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); ppEnum = null; return(Constants.E_FAIL); } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #endregion //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #region IDebugPortSupplier3 Members //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int CanPersistPorts() { // // This method determines whether the port supplier can persist ports (by writing them to disk) between invocations of the debugger. // LoggingUtils.PrintFunction(); // // Return values from this function seem to do the opposite of what I'd expect: // // Constants.S_OK = Use EnumPorts to seed device data. // Constants.S_FALSE = UseEnumPersistedPorts to seed device data. // // I think it potentially refers to whether the DE manually persists the ports, and so doesn't rely on a 'PortNames' being provided by VS? // return(Constants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int GetMemoryBytes (out IDebugMemoryBytes2 ppMemoryBytes) { // // Gets the memory bytes for this program. // LoggingUtils.PrintFunction (); if (m_debugger.NativeMemoryBytes != null) { ppMemoryBytes = m_debugger.NativeMemoryBytes; return Constants.S_OK; } ppMemoryBytes = null; return Constants.S_GETMEMORYBYTES_NO_MEMORY_BYTES; }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int WriteDump (enum_DUMPTYPE DUMPTYPE, string pszDumpUrl) { // // Writes a dump to a file. // LoggingUtils.PrintFunction (); try { throw new NotImplementedException (); } catch (NotImplementedException e) { LoggingUtils.HandleException (e); return Constants.E_NOTIMPL; } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public override async Task <bool> CanLaunchAsync(DebugLaunchOptions launchOptions) { LoggingUtils.PrintFunction(); IDebugLauncher debugLauncher = null; try { debugLauncher = GetDebugLauncher(ServiceProvider); return(await debugLauncher.CanLaunch((int)launchOptions)); } catch (Exception e) { HandleExceptionDialog(e, debugLauncher); } return(false); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public async Task <Dictionary <string, string> > ProjectPropertiesToDictionary() { LoggingUtils.PrintFunction(); Dictionary <string, string> evaluatedProperties = new Dictionary <string, string> (); var catalogs = await GetNamedCatalogsAsync(); foreach (var catalog in catalogs) { IReadOnlyCollection <string> catalogPropertySchemas = catalog.Value.GetPropertyPagesSchemas(); foreach (string schema in catalogPropertySchemas) { IRule schemaRules = catalog.Value.BindToContext(schema, File, ItemType, ItemName); foreach (IProperty property in schemaRules.Properties) { try { if (property.DataSource.Persistence.Equals("ProjectInstance")) { // Exceptions are thrown when trying to query the values of properties with 'ProjectInstance' persistence. continue; } IEvaluatedProperty evaluatedProperty = (IEvaluatedProperty)property; string schemaGroupedKey = schema + "." + property.Name; evaluatedProperties [schemaGroupedKey] = await evaluatedProperty.GetEvaluatedValueAsync(); } catch (Exception e) { LoggingUtils.HandleException(e); } } } } return(evaluatedProperties); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int OnTerminateClient(CLangDebugger debugger) { LoggingUtils.PrintFunction(); try { debugger.GdbClient.Stop(); debugger.GdbClient.Terminate(); return(Constants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); return(Constants.E_FAIL); } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int OnAttachClient(CLangDebugger debugger) { LoggingUtils.PrintFunction(); try { GdbServer gdbServer = debugger.GdbServer; debugger.GdbClient.Attach(gdbServer); return(Constants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); throw; } }