diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-01-23 17:48:50 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-01-23 17:48:50 (GMT) |
commit | adb98feb93f09d8de343c504a0c8c72815d62dab (patch) | |
tree | c345bf863252c2384b946b8ebfa315cda88b8ba9 /src/format | |
parent | 18be9204f2f6b054f254d1fa045039952ddfad41 (diff) |
Created storable items for user comments.
Diffstat (limited to 'src/format')
-rw-r--r-- | src/format/symbol.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/format/symbol.h b/src/format/symbol.h index 94003bb..6f2078c 100644 --- a/src/format/symbol.h +++ b/src/format/symbol.h @@ -29,6 +29,7 @@ #include "../analysis/routine.h" +#include "../analysis/db/item.h" #include "../analysis/db/items/comment.h" #include "../arch/instruction.h" @@ -129,15 +130,16 @@ GDbComment *g_binary_symbol_get_comment(const GBinSymbol *); } \ while (0) -#define ADD_RAW_AS_SYM(_fmt, _sym, _pos, _ins, _cmt, _txt) \ - do \ - { \ - _cmt = g_db_comment_new(_pos, _txt, true); \ - _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); \ - } \ +#define ADD_RAW_AS_SYM(_fmt, _sym, _pos, _ins, _cmt, _txt) \ + do \ + { \ + _cmt = g_db_comment_new_inlined(_pos, BLF_HAS_CODE, _txt, false); \ + g_db_item_set_volatile(G_DB_ITEM(_cmt), true); \ + _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) \ |