diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-12-15 13:40:28 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-12-15 13:40:28 (GMT) |
commit | 124c8410dbfcad59d66b850c50c96ec73a607ab7 (patch) | |
tree | b7127c66abfccd11b9126741e2809a893ee44143 /src/gui/panels | |
parent | db1a6171007a6641a4659392c9bcc05670396643 (diff) |
Defined proper accesses to instructions loaded by a processor.
Diffstat (limited to 'src/gui/panels')
-rw-r--r-- | src/gui/panels/strings.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c index 4f919b1..b8631b6 100644 --- a/src/gui/panels/strings.c +++ b/src/gui/panels/strings.c @@ -1030,7 +1030,6 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa const mrange_t *range; /* Couverture en mémoire */ GLoadedBinary *binary; /* Représentation binaire */ GArchProcessor *proc; /* Processeur de l'architecture*/ - GArchInstruction *list; /* Ensemble des instructions */ GArchInstruction *instr; /* Point de croisements */ GObject *ref; /* Espace de référencements */ GtkWidget *dialog; /* Boîte de dialogue à montrer */ @@ -1044,13 +1043,12 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa binary = g_editor_item_get_current_binary(G_EDITOR_ITEM(panel)); proc = g_loaded_binary_get_processor(binary); - list = g_arch_processor_get_disassembled_instructions(proc); /** * Se rapporter aux commentaires de mcb_edition_list_xrefs() pour les questions * concernant l'usage d'une adresse d'instruction au lieu de son emplacement. */ - instr = g_arch_instruction_find_by_address(list, get_mrange_addr(range), true); + instr = g_arch_processor_find_instr_by_address(proc, get_mrange_addr(range)); ref = g_editor_item_get_global_ref(G_EDITOR_ITEM(panel)); @@ -1069,6 +1067,9 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa gtk_widget_destroy(dialog); + if (instr != NULL) + g_object_unref(G_OBJECT(instr)); + g_object_unref(G_OBJECT(proc)); g_object_unref(G_OBJECT(symbol)); |