about summary refs log tree commit diff stats
path: root/src/include/debug.h
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-05-28 11:55:57 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-05-28 11:55:57 +0200
commit55720342adbf22ba318a66b30ed9ea6ec789b032 (patch)
treea0737fa72a4b05dc179a8fdd4c82b7039cb87257 /src/include/debug.h
parent085239ef4a5d76ae4cb77af5d4bb9d3f743bc6f8 (diff)
downloadbox64-55720342adbf22ba318a66b30ed9ea6ec789b032.tar.gz
box64-55720342adbf22ba318a66b30ed9ea6ec789b032.zip
Splited Elf Dump from LOG handling
Diffstat (limited to 'src/include/debug.h')
-rwxr-xr-xsrc/include/debug.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/debug.h b/src/include/debug.h
index ddf1d8b7..1b6ae3c8 100755
--- a/src/include/debug.h
+++ b/src/include/debug.h
@@ -4,6 +4,7 @@
 
 typedef struct box64context_s box64context_t;
 extern int box64_log;    // log level
+extern int box64_dump;   // dump elf or not
 extern int box64_dynarec_log;
 extern int box64_dynarec;
 extern int box64_pagesize;
@@ -33,12 +34,15 @@ extern int box64_tcmalloc_minimal;  // when using tcmalloc_minimal
 #define LOG_NONE 0
 #define LOG_INFO 1
 #define LOG_DEBUG 2
-#define LOG_DUMP 3
+#define LOG_NEVER 3
+#define LOG_VERBOSE 3
 
 extern FILE* ftrace;
 
 #define printf_log(L, ...) do {if(L<=box64_log) {fprintf(ftrace, __VA_ARGS__); fflush(ftrace);}} while(0)
 
+#define printf_dump(L, ...) do {if(box64_dump || (L<=box64_log)) {fprintf(ftrace, __VA_ARGS__); fflush(ftrace);}} while(0)
+
 #define dynarec_log(L, ...) do {if(L<=box64_dynarec_log) {fprintf(ftrace, __VA_ARGS__); fflush(ftrace);}} while(0)
 
 #define EXPORT __attribute__((visibility("default")))