RetroArch
Macros | Functions
ctr_debug.h File Reference
#include <stdio.h>
#include <3ds/types.h>
Include dependency graph for ctr_debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEBUG_HOLD()   do{printf("%s@%s:%d.\n",__FUNCTION__, __FILE__, __LINE__);fflush(stdout);wait_for_input();}while(0)
 
#define DEBUG_LINE()   do{printf("%s:%d.\n",__FUNCTION__, __LINE__);fflush(stdout);}while(0)
 
#define DEBUG_STR(X)   printf( "%s: %s\n", #X, (char*)(X))
 
#define DEBUG_VAR(X)   printf( "%-20s: 0x%08X\n", #X, (u32)(X))
 
#define DEBUG_INT(X)   printf( "%-20s: %10i\n", #X, (s32)(X))
 
#define DEBUG_VAR64(X)   printf( #X"\r\t\t\t\t : 0x%016llX\n", (u64)(X))
 
#define DEBUG_ERROR(X)   do{if(X)dump_result_value(X);}while(0)
 
#define PRINTFPOS(X, Y)   "\x1b["#X";"#Y"H"
 
#define PRINTFPOS_STR(X, Y)   "\x1b["X";"Y"H"
 
#define PRINTF_LINE(X)   "\x1b["X";0H"
 

Functions

void wait_for_input (void)
 
void dump_result_value (Result val)
 

Macro Definition Documentation

◆ DEBUG_ERROR

#define DEBUG_ERROR (   X)    do{if(X)dump_result_value(X);}while(0)

◆ DEBUG_HOLD

#define DEBUG_HOLD ( )    do{printf("%s@%s:%d.\n",__FUNCTION__, __FILE__, __LINE__);fflush(stdout);wait_for_input();}while(0)

◆ DEBUG_INT

#define DEBUG_INT (   X)    printf( "%-20s: %10i\n", #X, (s32)(X))

◆ DEBUG_LINE

#define DEBUG_LINE ( )    do{printf("%s:%d.\n",__FUNCTION__, __LINE__);fflush(stdout);}while(0)

◆ DEBUG_STR

#define DEBUG_STR (   X)    printf( "%s: %s\n", #X, (char*)(X))

◆ DEBUG_VAR

#define DEBUG_VAR (   X)    printf( "%-20s: 0x%08X\n", #X, (u32)(X))

◆ DEBUG_VAR64

#define DEBUG_VAR64 (   X)    printf( #X"\r\t\t\t\t : 0x%016llX\n", (u64)(X))

◆ PRINTF_LINE

#define PRINTF_LINE (   X)    "\x1b["X";0H"

◆ PRINTFPOS

#define PRINTFPOS (   X,
  Y 
)    "\x1b["#X";"#Y"H"

◆ PRINTFPOS_STR

#define PRINTFPOS_STR (   X,
  Y 
)    "\x1b["X";"Y"H"

Function Documentation

◆ dump_result_value()

void dump_result_value ( Result  val)

◆ wait_for_input()

void wait_for_input ( void  )
Here is the caller graph for this function: