wavelength 1.0.0
Loading...
Searching...
No Matches
Debug.h File Reference
#include "utl/FileStream.h"
#include "utl/PrnStream.h"
Include dependency graph for Debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Debug
 Stream for diagnostic text, written to standard output or to a log file. More...

Macros

#define ASSERT(cond)
 Report a failure when a condition is false.
#define ASSERT_RANGE(x, low, high)
 Report a failure when a value is outside a half-open range.

Typedefs

typedef void(* ModalCallbackFunc) (int &type, const char *message)
 Handler that replaces the message box of Debug::Modal().

Functions

void DebugPrint (const char *fmt,...)
 Format a diagnostic message that this build discards.

Variables

Debug TheDebug
 The diagnostic stream.

Macro Definition Documentation

◆ ASSERT

#define ASSERT ( cond)
Value:
do { \
if (!(cond)) { \
TheDebug.Fail("File: %s Line: %d Error: %s\n", __FILE__, __LINE__, #cond); \
} \
} while (false)
Debug TheDebug
The diagnostic stream.

Report a failure when a condition is false.

Parameters
condThe condition.

◆ ASSERT_RANGE

#define ASSERT_RANGE ( x,
low,
high )
Value:
ASSERT((low) <= (x) && (x) < (high))
#define ASSERT(cond)
Report a failure when a condition is false.
Definition Debug.h:129

Report a failure when a value is outside a half-open range.

Parameters
xThe value.
lowThe lowest valid value.
highOne past the highest valid value.

Typedef Documentation

◆ ModalCallbackFunc

typedef void(* ModalCallbackFunc) (int &type, const char *message)

Handler that replaces the message box of Debug::Modal().

The handler may change the kind of message. The program exits when the kind is Debug::kModalFail after the handler returns.

Parameters
typeThe kind of message.
messageThe text.

Function Documentation

◆ DebugPrint()

void DebugPrint ( const char * fmt,
... )

Format a diagnostic message that this build discards.

The body is empty. The linker shares it with every other empty routine of the program.

Parameters
fmtThe printf format.
Ghidra address:
0x1000fb60

Variable Documentation

◆ TheDebug

Debug TheDebug
extern

The diagnostic stream.

Ghidra address:
0x1003e918