3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-25 05:19:29 +01:00

pbot-vm: update de-optimization for gdb() function

This commit is contained in:
Pragmatic Software 2024-04-16 23:41:37 -07:00
parent e4cb6ceff6
commit ddeeb5da0f
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 14 additions and 13 deletions

View File

@ -87,7 +87,8 @@ __attribute__ (( constructor )) static void printf_binary_register(void)
register_printf_specifier('b', printf_binary_handler, printf_binary_arginfo); register_printf_specifier('b', printf_binary_handler, printf_binary_arginfo);
} }
void gdb(char *cmd) { __asm__(""); } __attribute__((optnone))
void gdb(char *cmd) { asm volatile ("" : "+r" (cmd)); }
#define dump(...) gdb("print " #__VA_ARGS__) #define dump(...) gdb("print " #__VA_ARGS__)
#define print(...) gdb("print " #__VA_ARGS__) #define print(...) gdb("print " #__VA_ARGS__)
#define ptype(...) gdb("ptype " #__VA_ARGS__) #define ptype(...) gdb("ptype " #__VA_ARGS__)

View File

@ -25,8 +25,8 @@ use PBot::Imports;
# These are set by the /misc/update_version script # These are set by the /misc/update_version script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 4749, BUILD_REVISION => 4750,
BUILD_DATE => "2024-04-12", BUILD_DATE => "2024-04-16",
}; };
sub initialize {} sub initialize {}