Fixing broken error check and adding some manual breakpoints.

This commit is contained in:
Ben Vanik 2013-10-23 23:48:18 -07:00
parent 655a486db3
commit 3b7fcced0e
4 changed files with 18 additions and 2 deletions

View File

@ -231,6 +231,17 @@ SHIM_CALL DbgPrint_shim(
}
void xeDbgBreakPoint() {
DebugBreak();
}
SHIM_CALL DbgBreakPoint_shim(
xe_ppc_state_t* ppc_state, KernelState* state) {
XELOGD("DbgBreakPoint()");
}
} // namespace xboxkrnl
} // namespace kernel
} // namespace xe
@ -239,4 +250,5 @@ SHIM_CALL DbgPrint_shim(
void xe::kernel::xboxkrnl::RegisterDebugExports(
ExportResolver* export_resolver, KernelState* state) {
SHIM_SET_MAPPING("xboxkrnl.exe", DbgPrint, state);
SHIM_SET_MAPPING("xboxkrnl.exe", DbgBreakPoint, state);
}

View File

@ -21,6 +21,9 @@ namespace kernel {
namespace xboxkrnl {
void xeDbgBreakPoint();
} // namespace xboxkrnl
} // namespace kernel
} // namespace xe

View File

@ -27,6 +27,7 @@ namespace xboxkrnl {
void xeKeBugCheckEx(uint32_t code, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4) {
XELOGD("*** STOP: 0x%.8X (0x%.8X, 0x%.8X, 0x%.8X, 0x%.8X)", code, param1, param2, param3, param4);
DebugBreak();
XEASSERTALWAYS();
}

View File

@ -25,8 +25,8 @@ typedef uint32_t X_HANDLE;
// http://msdn.microsoft.com/en-us/library/cc704588.aspx
// Adding as needed.
typedef uint32_t X_STATUS;
#define XFAILED(s) ((s) < 0)
#define XSUCCEEDED(s) ((s) >= 0)
#define XSUCCEEDED(s) ((s & 0xC0000000) == 0)
#define XFAILED(s) (!XSUCCEEDED(s))
#define X_STATUS_SUCCESS ((uint32_t)0x00000000L)
#define X_STATUS_ABANDONED_WAIT_0 ((uint32_t)0x00000080L)
#define X_STATUS_USER_APC ((uint32_t)0x000000C0L)