LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
Macros | Functions
debug.h File Reference
#include <stdio.h>
#include <xenon_uart/xenon_uart.h>
Include dependency graph for debug.h:

Go to the source code of this file.

Macros

#define d_xstr(s)   d_str(s)
 
#define d_str(s)   #s
 
#define BP   {printf("[Breakpoint] in function %s, line %d, file %s\n",__FUNCTION__,__LINE__,__FILE__);getch();}
 
#define TR   {printf("[Trace] in function %s, line %d\n",__FUNCTION__,__LINE__);}
 
#define TRI(x)   {printf("[Trace int] %s = %d(%p) at %s(%d)\n",d_xstr(x),x,x,__FUNCTION__,__LINE__);}
 
#define TRF(x)   {printf("[Trace flt] %s = %f at %s(%d)\n",d_xstr(x),x,__FUNCTION__,__LINE__);}
 
#define TRS(x)   {printf("[Trace str] %s = %s at %s(%d)\n",d_xstr(x),x,__FUNCTION__,__LINE__);}
 

Functions

void buffer_dump (void *buf, int size)
 
void stack_trace (int max_depth)
 
void data_breakpoint (void *address, int on_read, int on_write)
 

Macro Definition Documentation

◆ BP

#define BP   {printf("[Breakpoint] in function %s, line %d, file %s\n",__FUNCTION__,__LINE__,__FILE__);getch();}

Definition at line 14 of file debug.h.

◆ d_str

#define d_str (   s)    #s

Definition at line 12 of file debug.h.

◆ d_xstr

#define d_xstr (   s)    d_str(s)

Definition at line 11 of file debug.h.

◆ TR

#define TR   {printf("[Trace] in function %s, line %d\n",__FUNCTION__,__LINE__);}

Definition at line 15 of file debug.h.

◆ TRF

#define TRF (   x)    {printf("[Trace flt] %s = %f at %s(%d)\n",d_xstr(x),x,__FUNCTION__,__LINE__);}

Definition at line 18 of file debug.h.

◆ TRI

#define TRI (   x)    {printf("[Trace int] %s = %d(%p) at %s(%d)\n",d_xstr(x),x,x,__FUNCTION__,__LINE__);}

Definition at line 17 of file debug.h.

◆ TRS

#define TRS (   x)    {printf("[Trace str] %s = %s at %s(%d)\n",d_xstr(x),x,__FUNCTION__,__LINE__);}

Definition at line 19 of file debug.h.

Function Documentation

◆ buffer_dump()

void buffer_dump ( void *  buf,
int  size 
)

Definition at line 6 of file debug.c.

◆ data_breakpoint()

void data_breakpoint ( void *  address,
int  on_read,
int  on_write 
)

Definition at line 56 of file debug.c.

◆ stack_trace()

void stack_trace ( int  max_depth)

Definition at line 30 of file debug.c.