summaryrefslogtreecommitdiff
path: root/src/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/gotox.c13
-rw-r--r--src/gui/dialogs/gotox.h2
2 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/dialogs/gotox.c b/src/gui/dialogs/gotox.c
index fd05100..5d19fee 100644
--- a/src/gui/dialogs/gotox.c
+++ b/src/gui/dialogs/gotox.c
@@ -269,7 +269,7 @@ GtkWidget *create_gotox_dialog_for_entry_points(GtkWindow *parent, GLoadedBinary
* *
******************************************************************************/
-GtkWidget *create_gotox_dialog_for_cross_references(GtkWindow *parent, GLoadedBinary *binary, const GArchInstruction *instr, bool back)
+GtkWidget *create_gotox_dialog_for_cross_references(GtkWindow *parent, GLoadedBinary *binary, GArchInstruction *instr, bool back)
{
GtkWidget *result; /* Fenêtre à renvoyer */
GtkTreeStore *store; /* Modèle de gestion */
@@ -290,9 +290,15 @@ GtkWidget *create_gotox_dialog_for_cross_references(GtkWindow *parent, GLoadedBi
/* Affichage de toutes les instructions référencées */
if (back)
+ {
+ g_arch_instruction_rlock_src(instr);
count = g_arch_instruction_get_sources(instr, &list, NULL);
+ }
else
+ {
+ g_arch_instruction_rlock_dest(instr);
count = g_arch_instruction_get_destinations(instr, &list, NULL, NULL);
+ }
for (i = 0; i < count; i++)
{
@@ -302,6 +308,11 @@ GtkWidget *create_gotox_dialog_for_cross_references(GtkWindow *parent, GLoadedBi
}
+ if (back)
+ g_arch_instruction_runlock_src(instr);
+ else
+ g_arch_instruction_runlock_dest(instr);
+
g_object_unref(G_OBJECT(store));
gtk_dialog_set_response_sensitive(GTK_DIALOG(result), GTK_RESPONSE_OK, count > 0);
diff --git a/src/gui/dialogs/gotox.h b/src/gui/dialogs/gotox.h
index ab17d42..4284ae8 100644
--- a/src/gui/dialogs/gotox.h
+++ b/src/gui/dialogs/gotox.h
@@ -37,7 +37,7 @@
GtkWidget *create_gotox_dialog_for_entry_points(GtkWindow *, GLoadedBinary *);
/* Construit la fenêtre de sélection des références croisées. */
-GtkWidget *create_gotox_dialog_for_cross_references(GtkWindow *, GLoadedBinary *, const GArchInstruction *, bool);
+GtkWidget *create_gotox_dialog_for_cross_references(GtkWindow *, GLoadedBinary *, GArchInstruction *, bool);
/* Fournit l'adresse obtenue par la saisie de l'utilisateur. */
vmpa2t *get_address_from_gotox_dialog(GtkWidget *);