sys: add NtStatusSym()

This commit is contained in:
Bill Zissimopoulos
2015-11-17 16:07:46 -08:00
parent ca86b7d6c5
commit ffe75d5242
5 changed files with 2333 additions and 1 deletions

22
src/sys/debug.c Normal file
View File

@ -0,0 +1,22 @@
/**
* @file sys/debug.c
*
* @copyright 2015 Bill Zissimopoulos
*/
#include <sys/driver.h>
#if DBG
const char *NtStatusSym(NTSTATUS Status)
{
switch (Status)
{
#define SYM(x) case x: return #x;
/* cygwin: sed -n '/_WAIT_0/!s/^#define[ \t]*\(STATUS_[^ \t]*\).*NTSTATUS.*$/SYM(\1)/p' ntstatus.h >ntstatus.i */
#include "ntstatus.i"
#undef SYM
default:
return "UNKNOWN";
}
}
#endif