summaryrefslogtreecommitdiff
path: root/src/gui/dialogs/gotox.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/gotox.c')
-rw-r--r--src/gui/dialogs/gotox.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/dialogs/gotox.c b/src/gui/dialogs/gotox.c
index 72c2f8c..4d28e59 100644
--- a/src/gui/dialogs/gotox.c
+++ b/src/gui/dialogs/gotox.c
@@ -34,6 +34,7 @@
#include "../../core/paths.h"
#include "../../format/format.h"
#include "../../format/symiter.h"
+#include "../../glibext/gbinarycursor.h"
#include "../../gtkext/easygtk.h"
@@ -369,6 +370,7 @@ GtkWidget *create_gotox_dialog_for_cross_references(GtkWindow *parent, GLoadedBi
static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary, const vmpa2t *addr, GBinSymbol *hint)
{
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 */
char *virtual; /* Transcription d'adresse */
@@ -386,7 +388,12 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
cache = g_loaded_binary_get_disassembled_cache(binary);
- index = g_buffer_cache_find_index_by_addr(cache, addr, true);
+ cursor = g_binary_cursor_new();
+ g_binary_cursor_update(G_BINARY_CURSOR(cursor), addr);
+
+ 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);