RetroArch
ctr_debug.h
Go to the documentation of this file.
1 #ifndef _CTR_DEBUG_H__
2 #define _CTR_DEBUG_H__
3 
4 #include <stdio.h>
5 #include <3ds/types.h>
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 void wait_for_input(void);
12 #ifdef __cplusplus
13 }
14 #endif
15 
16 #define DEBUG_HOLD() do{printf("%s@%s:%d.\n",__FUNCTION__, __FILE__, __LINE__);fflush(stdout);wait_for_input();}while(0)
17 #define DEBUG_LINE() do{printf("%s:%d.\n",__FUNCTION__, __LINE__);fflush(stdout);}while(0)
18 #define DEBUG_STR(X) printf( "%s: %s\n", #X, (char*)(X))
19 #define DEBUG_VAR(X) printf( "%-20s: 0x%08X\n", #X, (u32)(X))
20 #define DEBUG_INT(X) printf( "%-20s: %10i\n", #X, (s32)(X))
21 #define DEBUG_VAR64(X) printf( #X"\r\t\t\t\t : 0x%016llX\n", (u64)(X))
22 #define DEBUG_ERROR(X) do{if(X)dump_result_value(X);}while(0)
23 #define PRINTFPOS(X,Y) "\x1b["#X";"#Y"H"
24 #define PRINTFPOS_STR(X,Y) "\x1b["X";"Y"H"
25 #define PRINTF_LINE(X) "\x1b["X";0H"
26 
27 #endif //_CTR_DEBUG_H__
GLuint GLfloat * val
Definition: glext.h:7847
result_t Result
Definition: switch_audio_compat.h:53
void dump_result_value(Result val)
Definition: ctr_system.c:262
void wait_for_input(void)
Definition: ctr_system.c:275