summaryrefslogtreecommitdiff
path: root/src/gui/dialogs
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/gui/dialogs
parent736b616092f91fc0863a82851620ec2e095212cb (diff)
Replaced all the remaining concrete locations in internal rendering buffers.
Diffstat (limited to 'src/gui/dialogs')
-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);