Esempio n. 1
0
        public string GetAdditionalInformation(DkmExceptionInformation exception) {
            var customException = exception as DkmCustomExceptionInformation;
            if (customException == null || customException.AdditionalInformation == null) {
                return null;
            }

            return Encoding.Unicode.GetString(customException.AdditionalInformation.ToArray());
        }
Esempio n. 2
0
        public string GetAdditionalInformation(DkmExceptionInformation exception)
        {
            var customException = exception as DkmCustomExceptionInformation;

            if (customException == null || customException.AdditionalInformation == null)
            {
                return(null);
            }

            return(Encoding.Unicode.GetString(customException.AdditionalInformation.ToArray()));
        }
        string IDkmExceptionFormatter.GetAdditionalInformation(DkmExceptionInformation exception)
        {
            var customExceptionInformation = exception as DkmCustomExceptionInformation;

            if (customExceptionInformation?.AdditionalInformation == null)
            {
                return(null);
            }

            string message = Encoding.UTF8.GetString(customExceptionInformation.AdditionalInformation.ToArray());

            return(message);
        }
Esempio n. 4
0
            void IDkmDebugMonitorExceptionNotification.OnDebugMonitorException(DkmExceptionInformation exception, DkmWorkList workList, DkmEventDescriptorS eventDescriptor)
            {
                var processData = DebugHelpers.GetOrCreateDataItem <NullcRemoteProcessDataItem>(exception.Process);

                if (exception.InstructionAddress == null)
                {
                    return;
                }

                ulong address = exception.InstructionAddress.CPUInstructionPart.InstructionPointer;

                // Breakpoint
                if (exception.Code == 0x80000003)
                {
                    // Internal stepper breakpoints are silenced but te debugger is notified to break the process
                    if (processData.stepBreakpoint != null && processData.stepBreakpoint.InstructionAddress.CPUInstructionPart.InstructionPointer == address)
                    {
                        eventDescriptor.Suppress();

                        exception.Thread.OnEmbeddedBreakpointHit(exception.InstructionAddress, false);
                    }

                    if (processData.secondaryStepBreakpoint != null && processData.secondaryStepBreakpoint.InstructionAddress.CPUInstructionPart.InstructionPointer == address)
                    {
                        eventDescriptor.Suppress();

                        exception.Thread.OnEmbeddedBreakpointHit(exception.InstructionAddress, false);
                    }

                    // Second stage of breakpoint handling - supress exception, notify debugger to break the process and remember what breakpoint has to be resotred later
                    if (processData.activeBreakpointLocations.Contains(address))
                    {
                        eventDescriptor.Suppress();

                        exception.Thread.OnEmbeddedBreakpointHit(exception.InstructionAddress, false);

                        // Schedule restore of this breakpoint when process continues
                        processData.lastHitBreakpointLocation = address;

                        processData.singleStepThread = exception.Thread;
                    }
                }
            }
 string IDkmExceptionFormatter.GetDescription(DkmExceptionInformation exception)
 {
     return(exception.Name);
 }
Esempio n. 6
0
        string IDkmExceptionFormatter.GetDescription(DkmExceptionInformation exception)
        {
            var em = exception.Process.GetOrCreateDataItem(() => new ExceptionManager(exception.Process));

            return(em.GetDescription(exception));
        }
Esempio n. 7
0
 void IDkmExceptionController.SquashProcessing(DkmExceptionInformation exception)
 {
     throw new NotImplementedException();
 }
Esempio n. 8
0
 bool IDkmExceptionController.CanModifyProcessing(DkmExceptionInformation exception)
 {
     return(false);
 }
Esempio n. 9
0
 public string GetDescription(DkmExceptionInformation exception)
 {
     return(exception.Name);
 }
Esempio n. 10
0
 public string GetDescription(DkmExceptionInformation exception) {
     return exception.Name;
 }