diff options
Diffstat (limited to 'src/format/symbol.h')
-rw-r--r-- | src/format/symbol.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/format/symbol.h b/src/format/symbol.h index 67696f4..4a48cf8 100644 --- a/src/format/symbol.h +++ b/src/format/symbol.h @@ -144,8 +144,8 @@ GDbComment *g_binary_symbol_get_comment(const GBinSymbol *); while (0) #define ADD_RAW_AS_SYM(_fmt, _sym, _ins, _cmt, _txt) \ - do \ - { \ + ({ \ + bool __result; \ const vmpa2t *__addr; \ __addr = get_mrange_addr(g_arch_instruction_get_range(_ins)); \ _cmt = g_db_comment_new_inlined(__addr, BLF_HAS_CODE, _txt, false); \ @@ -153,18 +153,18 @@ GDbComment *g_binary_symbol_get_comment(const GBinSymbol *); _sym = g_binary_symbol_new(STP_DATA); \ g_binary_symbol_attach_instruction(_sym, _ins); \ g_binary_symbol_set_comment(_sym, _cmt); \ - g_binary_format_add_symbol(G_BIN_FORMAT(_fmt), _sym); \ - } \ - while (0) - -#define ADD_STR_AS_SYM(_fmt, _sym, _ins) \ - do \ - { \ - _sym = g_binary_symbol_new(STP_RO_STRING); \ - g_binary_symbol_attach_instruction(_sym, _ins); \ - g_binary_format_add_symbol(G_BIN_FORMAT(_fmt), _sym); \ - } \ - while (0) + __result = g_binary_format_add_symbol(G_BIN_FORMAT(_fmt), _sym); \ + __result; \ + }) + +#define ADD_STR_AS_SYM(_fmt, _sym, _ins) \ + ({ \ + bool __result; \ + _sym = g_binary_symbol_new(STP_RO_STRING); \ + g_binary_symbol_attach_instruction(_sym, _ins); \ + __result = g_binary_format_add_symbol(G_BIN_FORMAT(_fmt), _sym); \ + __result; \ + }) |