diff options
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/gotox.c | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/src/gui/dialogs/gotox.c b/src/gui/dialogs/gotox.c index e467f8e..00ad356 100644 --- a/src/gui/dialogs/gotox.c +++ b/src/gui/dialogs/gotox.c @@ -276,9 +276,9 @@ GtkWidget *create_gotox_dialog_for_cross_references(GtkWindow *parent, GLoadedBi { GtkWidget *result; /* Fenêtre à renvoyer */ GtkTreeStore *store; /* Modèle de gestion */ - instr_link_t *list; /* Liste d'instructions */ size_t count; /* Nombre d'éléments présents */ size_t i; /* Boucle de parcours */ + instr_link_t *item; /* Instruction diverse liée */ const vmpa2t *addr; /* Adresse à considérer */ /* Mise en place de la boîte de dialogue */ @@ -294,27 +294,43 @@ GtkWidget *create_gotox_dialog_for_cross_references(GtkWindow *parent, GLoadedBi if (back) { - g_arch_instruction_rlock_src(instr); - count = g_arch_instruction_get_sources(instr, &list); + g_arch_instruction_lock_src(instr); + + count = g_arch_instruction_count_sources(instr); + + for (i = 0; i < count; i++) + { + item = g_arch_instruction_get_source(instr, i); + + addr = get_mrange_addr(g_arch_instruction_get_range(item->linked)); + + add_new_location_to_list(store, binary, addr, NULL); + + } + + g_arch_instruction_unlock_src(instr); + } + else { - g_arch_instruction_rlock_dest(instr); - count = g_arch_instruction_get_destinations(instr, &list); - } + g_arch_instruction_lock_dest(instr); - for (i = 0; i < count; i++) - { - addr = get_mrange_addr(g_arch_instruction_get_range(list[i].linked)); + count = g_arch_instruction_count_destinations(instr); - add_new_location_to_list(store, binary, addr, NULL); + for (i = 0; i < count; i++) + { + item = g_arch_instruction_get_destination(instr, i); - } + addr = get_mrange_addr(g_arch_instruction_get_range(item->linked)); - if (back) - g_arch_instruction_runlock_src(instr); - else - g_arch_instruction_runlock_dest(instr); + add_new_location_to_list(store, binary, addr, NULL); + + } + + g_arch_instruction_unlock_dest(instr); + + } g_object_unref(G_OBJECT(store)); |