summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/editem-int.h2
-rw-r--r--src/gui/editem.c4
-rw-r--r--src/gui/editem.h4
-rw-r--r--src/gui/menus/binary.c2
-rw-r--r--src/gui/menus/debug.c4
-rw-r--r--src/gui/menus/project.c15
-rw-r--r--src/gui/menus/view.c2
-rw-r--r--src/gui/panels/symbols.c10
-rw-r--r--src/gui/tb/source.c14
9 files changed, 29 insertions, 28 deletions
diff --git a/src/gui/editem-int.h b/src/gui/editem-int.h
index 0f25147..8ab0c43 100644
--- a/src/gui/editem-int.h
+++ b/src/gui/editem-int.h
@@ -37,7 +37,7 @@
/* Réagit à un changement du binaire courant. */
-typedef void (* update_item_binary_fc) (GEditorItem *, GOpenidaBinary *);
+typedef void (* update_item_binary_fc) (GEditorItem *, GLoadedBinary *);
/* Réagit à un changement d'affichage principal de contenu. */
typedef void (* update_item_view_fc) (GEditorItem *, GtkViewPanel *);
diff --git a/src/gui/editem.c b/src/gui/editem.c
index 18102f4..1d542a3 100644
--- a/src/gui/editem.c
+++ b/src/gui/editem.c
@@ -125,7 +125,7 @@ GtkWidget *g_editor_item_get_widget(const GEditorItem *item)
* *
******************************************************************************/
-GOpenidaBinary *g_editor_item_get_current_binary(const GEditorItem *item)
+GLoadedBinary *g_editor_item_get_current_binary(const GEditorItem *item)
{
return g_object_get_data(item->ref, "current_binary");
@@ -189,7 +189,7 @@ void register_editor_item(GEditorItem *item)
* *
******************************************************************************/
-void change_editor_items_current_binary(GObject *ref, GOpenidaBinary *binary)
+void change_editor_items_current_binary(GObject *ref, GLoadedBinary *binary)
{
GEditorItem *iter; /* Boucle de parcours */
diff --git a/src/gui/editem.h b/src/gui/editem.h
index 0b9989e..4bb1cd3 100644
--- a/src/gui/editem.h
+++ b/src/gui/editem.h
@@ -60,7 +60,7 @@ GType g_editor_item_get_type(void);
GtkWidget *g_editor_item_get_widget(const GEditorItem *);
/* Fournit le gestionnaire du binaire courant. */
-GOpenidaBinary *g_editor_item_get_current_binary(const GEditorItem *);
+GLoadedBinary *g_editor_item_get_current_binary(const GEditorItem *);
/* Fournit l'affichage de binaire courant. */
GtkViewPanel *g_editor_item_get_current_view(const GEditorItem *);
@@ -74,7 +74,7 @@ GtkViewPanel *g_editor_item_get_current_view(const GEditorItem *);
void register_editor_item(GEditorItem *);
/* Lance une actualisation du fait d'un changement de binaire. */
-void change_editor_items_current_binary(GObject *, GOpenidaBinary *);
+void change_editor_items_current_binary(GObject *, GLoadedBinary *);
/* Lance une actualisation du fait d'un changement de vue. */
void change_editor_items_current_view(GObject *, GtkViewPanel *);
diff --git a/src/gui/menus/binary.c b/src/gui/menus/binary.c
index ac59444..8699c02 100644
--- a/src/gui/menus/binary.c
+++ b/src/gui/menus/binary.c
@@ -89,7 +89,7 @@ GtkWidget *build_menu_binary(GObject *ref, GtkAccelGroup *accgroup, GMenuBar *ba
static void mcb_binary_export(GtkMenuItem *menuitem, GMenuBar *bar)
{
- GOpenidaBinary *binary; /* Edition courante */
+ GLoadedBinary *binary; /* Edition courante */
binary = g_editor_item_get_current_binary(G_EDITOR_ITEM(bar));
diff --git a/src/gui/menus/debug.c b/src/gui/menus/debug.c
index 963c095..666a605 100644
--- a/src/gui/menus/debug.c
+++ b/src/gui/menus/debug.c
@@ -93,10 +93,10 @@ GtkWidget *build_menu_debug(GObject *ref, GtkAccelGroup *accgroup)
static void mcb_debug_start_stop(GtkMenuItem *menuitem, GObject *ref)
{
- GOpenidaBinary *binary; /* Edition courante */
+ GLoadedBinary *binary; /* Edition courante */
GBinaryDebugger *debugger; /* Module prêt à emploi */
- binary = (GOpenidaBinary *)g_object_get_data(ref, "current_binary");
+ binary = (GLoadedBinary *)g_object_get_data(ref, "current_binary");
debugger = NULL;//get_main_debugger_for_binary(get_current_openida_project(), binary);
if (debugger == NULL)
diff --git a/src/gui/menus/project.c b/src/gui/menus/project.c
index 96b411b..dbf61bc 100644
--- a/src/gui/menus/project.c
+++ b/src/gui/menus/project.c
@@ -32,6 +32,7 @@
#include "../editem-int.h"
+#include "../../analysis/binaries/file.h"
#include "../../gtkext/easygtk.h"
@@ -115,7 +116,7 @@ void update_menu_project_for_project(GtkWidget *widget, GStudyProject *project,
GList *list; /* Liste des éléments en place */
GList *iter; /* Boucle de parcours #1 */
size_t count; /* Nombre de binaires attachés */
- GOpenidaBinary **binaries; /* Liste de ces binaires */
+ GLoadedBinary **binaries; /* Liste de ces binaires */
size_t i; /* Boucle de parcours #2 */
const char *desc; /* Description à afficher */
GtkWidget *submenuitem; /* Sous-menu à ajouter */
@@ -138,7 +139,7 @@ void update_menu_project_for_project(GtkWidget *widget, GStudyProject *project,
for (i = 0; i < count; i++)
{
- desc = g_openida_binary_to_string(binaries[i]);
+ desc = g_loaded_binary_get_filename(binaries[i], true);
submenuitem = qck_create_menu_item(NULL, NULL, desc,
G_CALLBACK(mcb_project_remove_binary), project);
@@ -175,7 +176,7 @@ static void mcb_project_add_binary_file(GtkMenuItem *menuitem, GMenuBar *bar)
GtkWidget *dialog; /* Boîte à afficher */
char *dir; /* Répertoire courant */
gchar *filename; /* Nom du fichier à intégrer */
- GOpenidaBinary *binary; /* Représentation chargée */
+ GLoadedBinary *binary; /* Représentation chargée */
dialog = gtk_file_chooser_dialog_new(_("Open a binary file"),
GTK_WINDOW(G_EDITOR_ITEM(bar)->ref),
@@ -204,13 +205,13 @@ static void mcb_project_add_binary_file(GtkMenuItem *menuitem, GMenuBar *bar)
{
filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
- binary = g_openida_binary_new_from_file(filename);
+ binary = g_file_binary_new_from_file(filename);
if (binary != NULL)
{
g_signal_connect(binary, "disassembly-done",
G_CALLBACK(g_study_project_add_loaded_binary), get_current_project());
- g_openida_binary_analyse(binary);
+ g_loaded_binary_analyse(binary);
}
g_free(filename);
@@ -237,9 +238,9 @@ static void mcb_project_add_binary_file(GtkMenuItem *menuitem, GMenuBar *bar)
static void mcb_project_remove_binary(GtkMenuItem *menuitem, GStudyProject *project)
{
- GOpenidaBinary *binary; /* Binaire à retirer */
+ GLoadedBinary *binary; /* Binaire à retirer */
- binary = G_OPENIDA_BINARY(g_object_get_data(G_OBJECT(menuitem), "binary"));
+ binary = G_LOADED_BINARY(g_object_get_data(G_OBJECT(menuitem), "binary"));
g_study_project_detach_binary(project, binary);
g_object_unref(G_OBJECT(binary));
diff --git a/src/gui/menus/view.c b/src/gui/menus/view.c
index e0e7cc4..748df9f 100644
--- a/src/gui/menus/view.c
+++ b/src/gui/menus/view.c
@@ -178,7 +178,7 @@ static void mcb_view_change_support(GtkRadioMenuItem *menuitem, GMenuBar *bar)
BinaryView view; /* Nouvelle vue à présenter */
GtkViewPanel *vpanel; /* Afficheur effectif de code */
GtkWidget *station; /* Base du remplacement */
- GOpenidaBinary *binary; /* Edition courante */
+ GLoadedBinary *binary; /* Edition courante */
GtkWidget *scroll; /* Nouveau support à utiliser */
/* On ne traite qu'une seule fois ! */
diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c
index aea90fe..6cc391f 100644
--- a/src/gui/panels/symbols.c
+++ b/src/gui/panels/symbols.c
@@ -46,7 +46,7 @@ struct _GSymbolsPanel
GtkTreeView *treeview; /* Composant d'affichage */
GtkTreeStore *store; /* Modèle de gestion */
- GOpenidaBinary *binary; /* Binaire à prendre en compte */
+ GLoadedBinary *binary; /* Binaire à prendre en compte */
};
@@ -84,7 +84,7 @@ static void g_symbols_panel_init(GSymbolsPanel *);
static void on_symbols_selection_change(GtkTreeSelection *, GSymbolsPanel *);
/* Réagit à un changement d'affichage principal de contenu. */
-void change_symbols_panel_current_binary(GSymbolsPanel *, GOpenidaBinary *);
+void change_symbols_panel_current_binary(GSymbolsPanel *, GLoadedBinary *);
@@ -383,7 +383,7 @@ static void on_symbols_selection_change(GtkTreeSelection *selection, GSymbolsPan
* *
******************************************************************************/
-void change_symbols_panel_current_binary(GSymbolsPanel *panel, GOpenidaBinary *binary)
+void change_symbols_panel_current_binary(GSymbolsPanel *panel, GLoadedBinary *binary)
{
GtkToggleToolButton *button; /* Mode de représentation */
@@ -437,7 +437,7 @@ static void reload_symbols_for_new_list_view(GSymbolsPanel *panel)
char tmp[VMPA_MAX_SIZE]; /* Version humainement lisible */
GtkTreeIter iter; /* Point d'insertion */
- format = g_openida_binary_get_format(panel->binary);
+ format = g_loaded_binary_get_format(panel->binary);
routines = g_binary_format_get_routines(G_BIN_FORMAT(format), &routines_count);
qsort(routines, routines_count, sizeof(GBinRoutine *), (__compar_fn_t)g_binary_routine_rcompare);
@@ -590,7 +590,7 @@ static void reload_symbols_for_new_tree_view(GSymbolsPanel *panel)
GtkTreeIter iter; /* Point d'insertion */
GdkPixbuf *pixbuf; /* Icone pour l'élément inséré */
- format = g_openida_binary_get_format(panel->binary);
+ format = g_loaded_binary_get_format(panel->binary);
routines = g_binary_format_get_routines(G_BIN_FORMAT(format), &routines_count);
qsort(routines, routines_count, sizeof(GBinRoutine *), (__compar_fn_t)g_binary_routine_rcompare);
diff --git a/src/gui/tb/source.c b/src/gui/tb/source.c
index 2a1a532..109cbfa 100644
--- a/src/gui/tb/source.c
+++ b/src/gui/tb/source.c
@@ -41,7 +41,7 @@
static GtkWidget *build_source_tb_widget(GObject *);
/* Réagit à un changement du binaire courant. */
-static void update_source_item_binary(GEditorItem *, GOpenidaBinary *);
+static void update_source_item_binary(GEditorItem *, GLoadedBinary *);
/* Réagit à un changement de panneau d'affichage courant. */
static void update_source_item_view(GEditorItem *, GtkViewPanel *);
@@ -136,7 +136,7 @@ GEditorItem *create_source_tb_item(GObject *ref)
* *
******************************************************************************/
-static void update_source_item_binary(GEditorItem *item, GOpenidaBinary *binary)
+static void update_source_item_binary(GEditorItem *item, GLoadedBinary *binary)
{
GtkComboBox *combo; /* Liste de sélection */
GtkTreeModel *model; /* Gestionnaire d'éléments */
@@ -160,7 +160,7 @@ static void update_source_item_binary(GEditorItem *item, GOpenidaBinary *binary)
/* Inscriptions */
- format = g_openida_binary_get_format(binary);
+ format = g_loaded_binary_get_format(binary);
files = g_binary_format_get_source_files(G_BIN_FORMAT(format), &count, &defsrc);
for (i = 0; i < count; i++)
@@ -211,18 +211,18 @@ static void update_source_item_view(GEditorItem *item, GtkViewPanel *view)
static void change_selected_source(GtkComboBox *widget, GObject *ref)
{
gint index; /* Nouvelle source ciblée */
- GOpenidaBinary *binary; /* Binaire chargé courant */
+ GLoadedBinary *binary; /* Binaire chargé courant */
GCodeBuffer *buffer; /* Nouveau tampon à présenter */
GtkBufferView *view; /* Afficheur de tampons */
index = gtk_combo_box_get_active(widget);
- binary = G_OPENIDA_BINARY(g_object_get_data(ref, "current_binary"));
- buffer = g_openida_binary_get_decompiled_buffer(binary, index);
+ binary = G_LOADED_BINARY(g_object_get_data(ref, "current_binary"));
+ buffer = g_loaded_binary_get_decompiled_buffer(binary, index);
view = GTK_BUFFER_VIEW(g_object_get_data(ref, "current_view"));
if (GTK_IS_BUFFER_VIEW(view))
gtk_buffer_view_attach_buffer(view, buffer,
- g_openida_binary_display_decomp_lines(binary), NULL);
+ g_loaded_binary_display_decomp_lines(binary), NULL);
}