summaryrefslogtreecommitdiff
path: root/src/analysis/routine.c
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/analysis/routine.c
parent736b616092f91fc0863a82851620ec2e095212cb (diff)
Replaced all the remaining concrete locations in internal rendering buffers.
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r--src/analysis/routine.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/analysis/routine.c b/src/analysis/routine.c
index 19782c7..cc1e337 100644
--- a/src/analysis/routine.c
+++ b/src/analysis/routine.c
@@ -38,6 +38,7 @@
#include "../common/extstr.h"
#include "../core/params.h"
#include "../format/symbol-int.h"
+#include "../glibext/gbinarycursor.h"
@@ -1011,6 +1012,7 @@ char *g_binary_routine_build_tooltip(const GBinRoutine *routine, const GLoadedBi
size_t i; /* Boucle de parcours */
instr_link_t *dest; /* Instr. visée par une autre */
const mrange_t *irange; /* Emplacement d'instruction */
+ GLineCursor *cursor; /* Emplacement dans un tampon */
size_t index; /* Indice de ligne à traiter */
GBufferLine *line; /* Ligne présente à l'adresse */
char *info; /* Ligne d'information créée */
@@ -1082,7 +1084,12 @@ char *g_binary_routine_build_tooltip(const GBinRoutine *routine, const GLoadedBi
irange = g_arch_instruction_get_range(instr);
- index = g_buffer_cache_find_index_by_addr(cache, get_mrange_addr(irange), true);
+ cursor = g_binary_cursor_new();
+ g_binary_cursor_update(G_BINARY_CURSOR(cursor), get_mrange_addr(irange));
+
+ 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);
@@ -1133,7 +1140,12 @@ char *g_binary_routine_build_tooltip(const GBinRoutine *routine, const GLoadedBi
irange = g_arch_instruction_get_range(dest->linked);
- index = g_buffer_cache_find_index_by_addr(cache, get_mrange_addr(irange), true);
+ cursor = g_binary_cursor_new();
+ g_binary_cursor_update(G_BINARY_CURSOR(cursor), get_mrange_addr(irange));
+
+ 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);