LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
debug.h
Go to the documentation of this file.
1#ifndef __include_debug_h
2#define __include_debug_h
3
4#ifdef __cplusplus
5 extern "C" {
6#endif /* __cplusplus */
7
8#include <stdio.h>
10
11#define d_xstr(s) d_str(s)
12#define d_str(s) #s
13
14#define BP {printf("[Breakpoint] in function %s, line %d, file %s\n",__FUNCTION__,__LINE__,__FILE__);getch();}
15#define TR {printf("[Trace] in function %s, line %d\n",__FUNCTION__,__LINE__);}
16
17#define TRI(x) {printf("[Trace int] %s = %d(%p) at %s(%d)\n",d_xstr(x),x,x,__FUNCTION__,__LINE__);}
18#define TRF(x) {printf("[Trace flt] %s = %f at %s(%d)\n",d_xstr(x),x,__FUNCTION__,__LINE__);}
19#define TRS(x) {printf("[Trace str] %s = %s at %s(%d)\n",d_xstr(x),x,__FUNCTION__,__LINE__);}
20
21void buffer_dump(void * buf, int size);
22void stack_trace(int max_depth);
23void data_breakpoint(void * address, int on_read, int on_write); // checks 8 bytes at address, throws Exception vector 0x300 on breakpoint
24
25#ifdef __cplusplus
26 }
27#endif /* __cplusplus */
28
29#endif
uint32_t address
Definition: ata.h:0
void data_breakpoint(void *address, int on_read, int on_write)
Definition: debug.c:56
void stack_trace(int max_depth)
Definition: debug.c:30
void buffer_dump(void *buf, int size)
Definition: debug.c:6
u32 size
Definition: iso9660.c:537