Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

sys/libcommon/debug.c File Reference

Debug helper functions for kernel-mode drivers. More...

#include <wdm.h>
#include "cbm_driver.h"
#include "../../arch/windows/debug.c"

Go to the source code of this file.

Defines

#define min(_x, _y)   ( ((_x) < (_y)) ? (_x) : (_y) )
#define REPORT_BUG(_no, _a, _b, _c, _d, _str)
#define DEFINE_STATUSCODE(_x)   { #_x, _x }
#define _MARKLASTENTRY   ((NTSTATUS) -1)
#define _LASTENTRY   { "", _MARKLASTENTRY }

Typedefs

typedef NTSTATUS_DEBUGCODE NTSTATUS_DEBUGCODE

Functions

const UCHAR * DebugNtStatus (NTSTATUS Value)
 Return the description of an NTSTATUS code.

Variables

const NTSTATUS_DEBUGCODE text []


Detailed Description

Debug helper functions for kernel-mode drivers.

**************************************************************

Author:
Spiro Trikaliotis
Version:
Id
debug.c,v 1.30 2006/03/09 11:24:26 trikalio Exp


Definition in file sys/libcommon/debug.c.


Define Documentation

#define _LASTENTRY   { "", _MARKLASTENTRY }
 

this marks the last entry of the array

Definition at line 66 of file sys/libcommon/debug.c.

#define _MARKLASTENTRY   ((NTSTATUS) -1)
 

This mark is used as value for the last entry of the array

Definition at line 63 of file sys/libcommon/debug.c.

Referenced by DebugNtStatus().

#define DEFINE_STATUSCODE _x   )     { #_x, _x }
 

Define one NTSTATUS entry

Definition at line 60 of file sys/libcommon/debug.c.

#define min _x,
_y   )     ( ((_x) < (_y)) ? (_x) : (_y) )
 

find the minimum of both parameters

Definition at line 32 of file sys/libcommon/debug.c.

#define REPORT_BUG _no,
_a,
_b,
_c,
_d,
_str   ) 
 

Value:

DbgPrint("--- REPORT_BUG: %04x (%08x, %08x, %08x, %08x). '%s' " \
        "in %s, %s(), line %u\n", \
        _no, _a, _b, _c, _d, _str, \
        __FILE__, __FUNCTION__, __LINE__);

Definition at line 38 of file sys/libcommon/debug.c.


Typedef Documentation

typedef struct NTSTATUS_DEBUGCODE NTSTATUS_DEBUGCODE
 

one descriptional entry for the NTSTATUS codes


Function Documentation

const UCHAR* DebugNtStatus NTSTATUS  Value  ) 
 

Return the description of an NTSTATUS code.

Searches in the NTSTATUS array for the supplied value, and returns a description for it if it finds some.

Parameters:
Value The NTSTATUS value to be searched for
Returns:
If the value is found, its alphanumerical description is used; if not, "*UNKNOWN*" is returned.

Definition at line 1012 of file sys/libcommon/debug.c.

References _MARKLASTENTRY, and NTSTATUS_DEBUGCODE::Name.

Referenced by AddDevice(), cbmiec_i_raw_write(), ParPortSetModeWdm(), and ParPortUnsetModeWdm().


Variable Documentation

const NTSTATUS_DEBUGCODE text[]
 

The array of NTSTATUS codes

Definition at line 70 of file sys/libcommon/debug.c.


Generated on Sun Apr 30 18:46:06 2006 for opencbm by  doxygen 1.4.2