예제 #1
0
        public void AttachKernel(string connectionString)
        {
            if (_disposed)
            {
                throw new ApplicationException("Object already disposed");
            }

            logger.Debug("AttachKernel: " + connectionString);

            count++;

            //System.Diagnostics.Debugger.Break();

            dbgClient.AttachKernel((uint)Const.DEBUG_ATTACH_KERNEL_CONNECTION, connectionString);
            dbgControl.WaitForEvent((uint)Const.DEBUG_WAIT_DEFAULT, 0xFFFFFFFF);

            try
            {
                while (!exitDebugger.WaitOne(0, false) && !handledException.WaitOne(0, false))
                {
                    dbgControl.WaitForEvent(0, 100);
                }
            }
            catch (Exception ex)
            {
                logger.Debug(ex.ToString());
                //Debugger.Break();
            }

            logger.Debug("EndSession");
            dbgClient.EndSession((uint)Const.DEBUG_END_ACTIVE_TERMINATE);
        }
예제 #2
0
        public void AttachKernel(string connectionString)
        {
            if (_disposed)
            {
                throw new ApplicationException("Object already disposed");
            }

            count++;

            dbgClient.AttachKernel((uint)Const.DEBUG_ATTACH_KERNEL_CONNECTION, ref connectionString);

            try
            {
                while (!exitDebugger.WaitOne(0, false) && !handledException.WaitOne(0, false))
                {
                    dbgControl.WaitForEvent(0, 100);
                }
            }
            catch
            {
                //Debugger.Break();
            }

            dbgClient.EndSession((uint)Const.DEBUG_END_ACTIVE_TERMINATE);
        }
예제 #3
0
 public void AttachToLocalKernel()
 {
     RunAsync(() => {
         int hr = Client.AttachKernel(DEBUG_ATTACH.LOCAL_KERNEL, null);
         if (FAILED(hr))
         {
             OnError(new ErrorEventArgs(DebuggerError.LocalKernelAttachFailed, hr));
         }
         else
         {
             WaitForEvent();
         }
     });
 }