diff --git a/bdshemu/bdshemu.c b/bdshemu/bdshemu.c index a26852f..346ff9a 100644 --- a/bdshemu/bdshemu.c +++ b/bdshemu/bdshemu.c @@ -12,11 +12,11 @@ // -// shemu_printf - simple version +// shemu_internal_printf - simple version // #ifndef BDDISASM_NO_FORMAT void -shemu_printf( +shemu_internal_printf( SHEMU_CONTEXT *Context, char *formatstring, ... @@ -41,7 +41,7 @@ shemu_printf( } #else void -shemu_printf( +shemu_internal_printf( SHEMU_CONTEXT *Context, char *formatstring, ... diff --git a/bdshemu/include/bdshemu_common.h b/bdshemu/include/bdshemu_common.h index 15564bd..ad48a57 100644 --- a/bdshemu/include/bdshemu_common.h +++ b/bdshemu/include/bdshemu_common.h @@ -12,6 +12,12 @@ #endif +#ifndef BDDISASM_NO_FORMAT +#define shemu_printf(Context, formatstring, ...) shemu_internal_printf(Context, formatstring, __VA_ARGS__) +#else +#define shemu_printf(Context, formatstring, ...) do { (void)formatstring; shemu_internal_printf(Context, ND_NULL, __VA_ARGS__); } while (0) +#endif + // The SHELLBMP and STACKBMP are two bitmaps which hold the state of each shellcode byte and each stack byte. // Inside SHELLBMP, we store whether a shellcode byte has been fetched for execution or not, and whether it was // modified or not. @@ -65,7 +71,7 @@ void -shemu_printf( +shemu_internal_printf( SHEMU_CONTEXT *Context, char *formatstring, ...