diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/binary.c | 8 | ||||
-rw-r--r-- | src/format/elf/helper_x86.c | 4 | ||||
-rw-r--r-- | src/gtkext/gtkdockitem.c | 19 | ||||
-rw-r--r-- | src/gtkext/gtkdockitem.h | 4 | ||||
-rw-r--r-- | src/gtkext/gtkdockpanel.c | 1 | ||||
-rw-r--r-- | src/project.c | 6 |
6 files changed, 31 insertions, 11 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 38d3d19..c21b554 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -640,6 +640,14 @@ void ack_completed_disassembly(GDelayedManager *manager, GOpenidaBinary *binary, } + /* On réintègre le flot premier */ + + gdk_threads_enter(); + g_signal_emit_by_name(binary, "disassembly-done"); + gdk_flush (); + + gdk_threads_leave(); + } diff --git a/src/format/elf/helper_x86.c b/src/format/elf/helper_x86.c index 82be74c..c31882c 100644 --- a/src/format/elf/helper_x86.c +++ b/src/format/elf/helper_x86.c @@ -257,8 +257,6 @@ void translate_elf_relocations(GElfFormat *format, GArchInstruction **instructio { operand = g_arch_instruction_get_operand(instructions[i], 0); - g_imm_operand_to_vmpa_t(G_IMM_OPERAND(operand), &address); - if (g_imm_operand_to_vmpa_t(G_IMM_OPERAND(operand), &address)) { symbols = g_binary_format_get_symbols(G_BIN_FORMAT(format), &symbols_count); @@ -286,6 +284,8 @@ void translate_elf_relocations(GElfFormat *format, GArchInstruction **instructio symbol = g_binary_symbol_new(STP_FUNCTION, new_name, address); g_binary_format_add_symbol(G_BIN_FORMAT(format), symbol); + break; + } } diff --git a/src/gtkext/gtkdockitem.c b/src/gtkext/gtkdockitem.c index c031c7f..fcef31d 100644 --- a/src/gtkext/gtkdockitem.c +++ b/src/gtkext/gtkdockitem.c @@ -143,7 +143,7 @@ const gchar *gtk_dock_item_get_name(GtkDockItem *ditem) /****************************************************************************** * * * Paramètres : ditem = composant GTK à modifier. * -* name = nouveau nom à prendre en compte. * +* desc = nouvelle description à prendre en compte. * * * * Description : Change la description du panneau dockable pour son titre. * * * @@ -153,12 +153,12 @@ const gchar *gtk_dock_item_get_name(GtkDockItem *ditem) * * ******************************************************************************/ -void gtk_dock_item_set_desc(GtkDockItem *ditem, const gchar *name) +void gtk_dock_item_set_desc(GtkDockItem *ditem, const gchar *desc) { - if (ditem->name != NULL) - g_free(ditem->name); + if (ditem->desc != NULL) + g_free(ditem->desc); - ditem->name = g_strdup(name); + ditem->desc = g_strdup(desc); } @@ -177,7 +177,14 @@ void gtk_dock_item_set_desc(GtkDockItem *ditem, const gchar *name) const gchar *gtk_dock_item_get_desc(GtkDockItem *ditem) { - return ditem->name; + const char *result; /* CHaîne à renvoyer */ + + result = ditem->desc; + + if (result == NULL) + result = gtk_dock_item_get_name(ditem); + + return result; } diff --git a/src/gtkext/gtkdockitem.h b/src/gtkext/gtkdockitem.h index 21ca360..906973c 100644 --- a/src/gtkext/gtkdockitem.h +++ b/src/gtkext/gtkdockitem.h @@ -47,7 +47,9 @@ struct _GtkDockItem { GtkObject object; /* Présence obligatoire en 1er */ - gchar *name; /* Nom court pour onglet */ + gchar *name; /* Nom court pour titre */ + gchar *desc; /* Nom long pour onglet */ + GtkWidget *panel; /* Pnneau construit associé */ }; diff --git a/src/gtkext/gtkdockpanel.c b/src/gtkext/gtkdockpanel.c index 41b71aa..536d21b 100644 --- a/src/gtkext/gtkdockpanel.c +++ b/src/gtkext/gtkdockpanel.c @@ -674,7 +674,6 @@ static gboolean gtk_dock_panel_update_title(GtkNotebook *notebook, GtkNotebookPa ditem = GTK_DOCK_ITEM(g_list_nth_data(GTK_DOCK_PANEL(data)->ditems, index)); desc = gtk_dock_item_get_desc(ditem); - if (desc == NULL) desc = gtk_dock_item_get_name(ditem); str = calloc(strlen("<b>") + strlen(desc) + strlen("</b>") + 1, sizeof(char)); diff --git a/src/project.c b/src/project.c index 6824444..fd9d7ea 100644 --- a/src/project.c +++ b/src/project.c @@ -691,6 +691,7 @@ void display_new_binary_of_openida_project(GOpenidaBinary *binary, openida_proje size_t index; /* Indice du nouveau binaire */ GtkDockPanel *dpanel; /* Support de panneaux */ GtkWidget *view; /* Affichage du code binaire */ + char *title; /* Titre associé au binaire */ GtkDockItem *ditem; /* Panneau avec ses infos. */ GtkBinView *binview; /* Affichage à faire défiler */ @@ -704,7 +705,10 @@ void display_new_binary_of_openida_project(GOpenidaBinary *binary, openida_proje view = get_loaded_binary_view(project->binaries[index], BVW_BLOCK); - ditem = gtk_dock_item_new(g_openida_binary_to_string(binary), view); + title = g_openida_binary_to_string(binary); + + ditem = gtk_dock_item_new(strrchr(title, '/') + 1, view); + gtk_dock_item_set_desc(ditem, title); gtk_dock_panel_add_item(dpanel, ditem); |