diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/target.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/arch/target.c b/src/arch/target.c index 036aad0..97b2192 100644 --- a/src/arch/target.c +++ b/src/arch/target.c @@ -36,6 +36,7 @@ #include "../analysis/routine.h" #include "../common/extstr.h" #include "../format/format.h" +#include "../glibext/gbinarycursor.h" @@ -373,6 +374,7 @@ static char *g_target_operand_build_tooltip(const GTargetOperand *operand, const SymbolType stype; /* Type de symbole identifié */ const mrange_t *srange; /* Emplacement du symbole */ GBufferCache *cache; /* Tampon de désassemblage */ + GLineCursor *cursor; /* Emplacement dans un tampon */ size_t index; /* Indice de ligne à traiter */ GBufferLine *line; /* Ligne présente à l'adresse */ @@ -396,7 +398,12 @@ static char *g_target_operand_build_tooltip(const GTargetOperand *operand, const cache = g_loaded_binary_get_disassembled_cache(binary); - index = g_buffer_cache_find_index_by_addr(cache, get_mrange_addr(srange), true); + cursor = g_binary_cursor_new(); + g_binary_cursor_update(G_BINARY_CURSOR(cursor), get_mrange_addr(srange)); + + index = g_buffer_cache_find_index_by_cursor(cache, cursor, true); + + g_object_unref(G_OBJECT(cursor)); index = g_buffer_cache_look_for_flag(cache, index, BLF_HAS_CODE); |