summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-07-14 12:41:30 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-07-14 12:41:30 (GMT)
commit078b2ffd38da040ab87a9686bcc2e796841cccb7 (patch)
tree2e5c94065cb5b4d38fac700e10104a0da7ae970d /src/arch
parent736b616092f91fc0863a82851620ec2e095212cb (diff)
Replaced all the remaining concrete locations in internal rendering buffers.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/target.c9
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);