diff --git a/src/CxbxDebugger/Debugger/DebuggerEventInterfaces.cs b/src/CxbxDebugger/Debugger/DebuggerEventInterfaces.cs index 7336d4d2b..d7cddb399 100644 --- a/src/CxbxDebugger/Debugger/DebuggerEventInterfaces.cs +++ b/src/CxbxDebugger/Debugger/DebuggerEventInterfaces.cs @@ -37,7 +37,7 @@ namespace CxbxDebugger public interface IDebuggerExceptionEvents { - bool OnAccessViolation(DebuggerThread Thread, uint Code, IntPtr Address); + bool OnAccessViolation(DebuggerThread Thread, uint Code, uint Address); } public interface IDebuggerFileEvents diff --git a/src/CxbxDebugger/Debugger/DebuggerMessages.cs b/src/CxbxDebugger/Debugger/DebuggerMessages.cs index 3afa3e70a..f32312e6f 100644 --- a/src/CxbxDebugger/Debugger/DebuggerMessages.cs +++ b/src/CxbxDebugger/Debugger/DebuggerMessages.cs @@ -163,7 +163,7 @@ namespace CxbxDebugger public class ExceptionHandledQuery { public IntPtr ReponseAddr { get; set; } - public IntPtr ExceptionAddress { get; set; } + public uint ExceptionAddress { get; set; } public uint ExceptionCode { get; set; } public uint ParameterCount { get; set; } public IntPtr ParameterBase { get; set; } @@ -174,7 +174,7 @@ namespace CxbxDebugger ExceptionHandledQuery Query = new ExceptionHandledQuery(); Query.ReponseAddr = new IntPtr(Data[0]); - Query.ExceptionAddress = new IntPtr(Data[1]); + Query.ExceptionAddress = Data[1]; Query.ExceptionCode = Data[2]; Query.ParameterCount = Data[3]; Query.ParameterBase = new IntPtr(Data[4]); diff --git a/src/CxbxDebugger/Form1.cs b/src/CxbxDebugger/Form1.cs index 260467d09..bf23813cf 100644 --- a/src/CxbxDebugger/Form1.cs +++ b/src/CxbxDebugger/Form1.cs @@ -371,7 +371,7 @@ namespace CxbxDebugger public void OnThreadExit(DebuggerThread Thread, uint ExitCode) { - frm.DebugLog(string.Format("Thread exited {0} ({1})", Thread.ThreadID, PrettyExitCode(ExitCode))); + frm.DebugLog(string.Format("Thread exited {0} ({1})", Thread.ThreadID, NtStatus.PrettyPrint(ExitCode))); frm.DebugThreads.Remove(Thread); } @@ -397,18 +397,18 @@ namespace CxbxDebugger frm.OutputString(Message); } - public bool OnAccessViolation(DebuggerThread Thread, uint Code, IntPtr Address) + public bool OnAccessViolation(DebuggerThread Thread, uint Code, uint Address) { string ProcessName = "??"; - var Module = frm.DebuggerInst.ResolveModule((uint)Address); + var Module = frm.DebuggerInst.ResolveModule(Address); if (Module != null) { ProcessName = Path.GetFileName(Module.Path); } // TODO Include GetLastError string - string ExceptionMessage = string.Format("Access violation thrown at 0x{0:X8} ({1})", (uint)Address, ProcessName); + string ExceptionMessage = string.Format("Access violation thrown at 0x{0:X8} ({1})", Address, ProcessName); ExceptionMessage += string.Format("\n\nException code {0:X8}", Code);