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.c13
1 files changed, 12 insertions, 1 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);