paulscode
New member
- Thread Starter
- #121
Debug messages are a bit of a problem, because unfortunately there is no "printf" function in Android (it compiles, but is equivalent to using "nullf"). I thought I had this covered by putting the following at the top of new_dynarec.c (this should also cover any messages generated in assem_arm.c, since that is #include'ed in new_dynarec.c):
This seems to cover most of the debug messages, but apparently not all of them. I'll look at this more closely. Are there any other functions besides printf(), assem_debug(), and inv_debug() being used to print messages? Could any of the missing messages be generated in other files besides new_dynarec.c and assem_arm.c? If so, I'll have to #define printf in a few other places as well, probably.
Code:
#include <android/log.h>
#define printf(...) __android_log_print(ANDROID_LOG_VERBOSE, "new_dynarec", __VA_ARGS__)
#define assem_debug(...) __android_log_print(ANDROID_LOG_DEBUG, "assem_debug", __VA_ARGS__)
#define inv_debug(...) __android_log_print(ANDROID_LOG_DEBUG, "inv_debug", __VA_ARGS__)
This seems to cover most of the debug messages, but apparently not all of them. I'll look at this more closely. Are there any other functions besides printf(), assem_debug(), and inv_debug() being used to print messages? Could any of the missing messages be generated in other files besides new_dynarec.c and assem_arm.c? If so, I'll have to #define printf in a few other places as well, probably.