3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-20 02:49:49 +01:00

Prevent gcc from optimizing away gdb() call

This commit is contained in:
Pragmatic Software 2012-08-16 01:17:28 +00:00
parent 6b35dc210c
commit da3e05bc72
2 changed files with 3 additions and 3 deletions

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script # These are set automatically by the build/commit script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 376, BUILD_REVISION => 377,
BUILD_DATE => "2012-08-12", BUILD_DATE => "2012-08-15",
}; };
1; 1;

View File

@ -92,7 +92,7 @@ __attribute__ (( constructor )) static void printf_binary_register(void)
#define STR(s) #s #define STR(s) #s
#define REVEAL(s) STR(s) #define REVEAL(s) STR(s)
void gdb() {} void gdb() { asm(""); }
#define dump(expression) gdb("print " #expression) #define dump(expression) gdb("print " #expression)
#define print(expression) gdb("print " #expression) #define print(expression) gdb("print " #expression)
#define ptype(expression) gdb("ptype " #expression) #define ptype(expression) gdb("ptype " #expression)