diff options
Diffstat (limited to 'src/gtkext')
-rw-r--r-- | src/gtkext/Makefile.am | 6 | ||||
-rw-r--r-- | src/gtkext/graph/Makefile.am | 11 | ||||
-rw-r--r-- | src/gtkext/gtkblockdisplay.c | 1 | ||||
-rw-r--r-- | src/gtkext/gtkblockdisplay.h | 16 | ||||
-rw-r--r-- | src/gtkext/gtkstatusstack.c | 60 | ||||
-rw-r--r-- | src/gtkext/gtkstatusstack.h | 4 | ||||
-rw-r--r-- | src/gtkext/hexdisplay.c | 1 | ||||
-rw-r--r-- | src/gtkext/hexdisplay.h | 13 | ||||
-rw-r--r-- | src/gtkext/rendering.c | 1 | ||||
-rw-r--r-- | src/gtkext/rendering.h | 2 |
10 files changed, 17 insertions, 98 deletions
diff --git a/src/gtkext/Makefile.am b/src/gtkext/Makefile.am index 8c46615..5bfc55f 100644 --- a/src/gtkext/Makefile.am +++ b/src/gtkext/Makefile.am @@ -32,7 +32,7 @@ libgtkext_la_SOURCES = \ libgtkext_la_LIBADD = \ graph/libgtkextgraph.la -libgtkext_la_LDFLAGS = +libgtkext_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) @@ -40,10 +40,6 @@ devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libgtkext_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = graph diff --git a/src/gtkext/graph/Makefile.am b/src/gtkext/graph/Makefile.am index c7f1d4b..ba7318e 100644 --- a/src/gtkext/graph/Makefile.am +++ b/src/gtkext/graph/Makefile.am @@ -11,18 +11,9 @@ libgtkextgraph_la_SOURCES = \ rank.h rank.c \ vspace.h vspace.c -libgtkextgraph_la_LIBADD = - -libgtkextgraph_la_LDFLAGS = +libgtkextgraph_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/gtkext/gtkblockdisplay.c b/src/gtkext/gtkblockdisplay.c index 1810fc9..00da4cc 100644 --- a/src/gtkext/gtkblockdisplay.c +++ b/src/gtkext/gtkblockdisplay.c @@ -28,6 +28,7 @@ #include "../arch/instruction.h" #include "../arch/operand.h" #include "../analysis/loaded.h" +#include "../core/columns.h" #include "../glibext/gbinarycursor.h" diff --git a/src/gtkext/gtkblockdisplay.h b/src/gtkext/gtkblockdisplay.h index 196fe2e..6c0879c 100644 --- a/src/gtkext/gtkblockdisplay.h +++ b/src/gtkext/gtkblockdisplay.h @@ -48,22 +48,6 @@ typedef struct _GtkBlockDisplay GtkBlockDisplay; typedef struct _GtkBlockDisplayClass GtkBlockDisplayClass; -/* Désignation des colonnes d'une ligne */ -typedef enum _DisassLineColumn -{ - DLC_PHYSICAL, /* Position physique */ - DLC_VIRTUAL, /* Adresse virtuelle */ - DLC_BINARY, /* Contenu sous forme binaire */ - DLC_ASSEMBLY_LABEL, /* Etiquette dans les données */ - DLC_ASSEMBLY_HEAD, /* Instruction pour assembleur */ - DLC_ASSEMBLY, /* Code pour assembleur */ - DLC_COMMENTS, /* Commentaires éventuels */ - - DLC_COUNT, - -} DisassLineColumn; - - /* Détermine le type du composant d'affichage de bloc en langage d'assemblage. */ GType gtk_block_display_get_type(void); diff --git a/src/gtkext/gtkstatusstack.c b/src/gtkext/gtkstatusstack.c index 0b35e1b..fe4e4d5 100644 --- a/src/gtkext/gtkstatusstack.c +++ b/src/gtkext/gtkstatusstack.c @@ -34,7 +34,6 @@ #include "easygtk.h" -#include "../common/extstr.h" #include "../gui/agroup.h" #include "../format/format.h" @@ -503,8 +502,9 @@ static void on_zoom_icon_press(GtkEntry *entry, GtkEntryIconPosition icon_pos, G /****************************************************************************** * * * Paramètres : stack = barre de statut à actualiser. * -* binary = binaire chargé rassemblant l'ensemble des infos. * * range = emplacement à mettre en valeur. * +* segment = zone de binaire d'appartenance. * +* symbol = éventuelle position par rapport à un symbole. * * encoding = encodage d'une éventuelle instruction ou NULL. * * * * Description : Actualise les informations liées une position d'assemblage. * @@ -515,25 +515,14 @@ static void on_zoom_icon_press(GtkEntry *entry, GtkEntryIconPosition icon_pos, G * * ******************************************************************************/ -void gtk_status_stack_update_current_location(GtkStatusStack *stack, const GLoadedBinary *binary, const mrange_t *range, const char *encoding) +void gtk_status_stack_update_current_location(GtkStatusStack *stack, const mrange_t *range, const char *segment, const char *symbol, const char *encoding) { assembly_info *info; /* Informations à constituer */ - GExeFormat *format; /* Format de binaire à traiter */ const vmpa2t *addr; /* Localisation de départ */ phys_t size; /* Taille de l'emplacement */ - GBinPortion *portions; /* Couche première de portions */ - GBinPortion *portion; /* Zone mémoire d'appartenance */ - const char *text; /* Texte au contenu à copier */ - GBinSymbol *symbol; /* Symbole présent à l'adresse */ - phys_t diff; /* Décalage de l'adresse */ - char *label; /* Description d'un symbole */ - vmpa2t tmp; /* Zone de construction temp. */ - VMPA_BUFFER(offset); /* Décalage physique */ info = stack->asm_info; - format = g_loaded_binary_get_format(binary); - /* Bascule vers une zone courante nouvelle ? */ addr = get_mrange_addr(range); @@ -542,7 +531,7 @@ void gtk_status_stack_update_current_location(GtkStatusStack *stack, const GLoad if (cmp_mrange(&info->current, range) == 0 && info->size == size && info->encoding == encoding) - goto gssuci_useless; + goto useless; /* Réinitialisation */ @@ -552,20 +541,7 @@ void gtk_status_stack_update_current_location(GtkStatusStack *stack, const GLoad /* Zone d'appartenance */ - portions = g_exe_format_get_portions(format); - - portion = g_binary_portion_find_at_addr(portions, addr, (GdkRectangle []) { { 0 } }); - - text = g_binary_portion_get_desc(portion); - - if (text != NULL) - info->segment = strdup(text); - else - info->segment = strdup(_("Binary")); - - g_object_unref(G_OBJECT(portion)); - - g_object_unref(G_OBJECT(portions)); + info->segment = strdup(segment); /* Adresses de base */ @@ -578,26 +554,8 @@ void gtk_status_stack_update_current_location(GtkStatusStack *stack, const GLoad /* Symbole concerné */ - if (g_binary_format_resolve_symbol(G_BIN_FORMAT(format), addr, false, &symbol, &diff)) - { - label = g_binary_symbol_get_label(symbol); - - if (label != NULL) - { - info->symbol = label; - - info->symbol = stradd(info->symbol, "+"); - - init_vmpa(&tmp, diff, VMPA_NO_VIRTUAL); - vmpa2_phys_to_string(&tmp, MDS_UNDEFINED, offset, NULL); - - info->symbol = stradd(info->symbol, offset); - - } - - g_object_unref(G_OBJECT(symbol)); - - } + if (symbol != NULL) + info->symbol = strdup(symbol); /* Nettoyage et conclusion */ @@ -605,9 +563,9 @@ void gtk_status_stack_update_current_location(GtkStatusStack *stack, const GLoad gtk_status_stack_show_current_location(stack); - gssuci_useless: + useless: - g_object_unref(G_OBJECT(format)); + ; } diff --git a/src/gtkext/gtkstatusstack.h b/src/gtkext/gtkstatusstack.h index 91182a1..f419014 100644 --- a/src/gtkext/gtkstatusstack.h +++ b/src/gtkext/gtkstatusstack.h @@ -28,7 +28,7 @@ #include <gtk/gtk.h> -#include "../analysis/binary.h" +#include "../arch/vmpa.h" @@ -62,7 +62,7 @@ GtkStatusStack *gtk_status_stack_new(void); /* Actualise les informations liées une position d'assemblage. */ -void gtk_status_stack_update_current_location(GtkStatusStack *, const GLoadedBinary *, const mrange_t *, const char *); +void gtk_status_stack_update_current_location(GtkStatusStack *, const mrange_t *, const char *, const char *, const char *); /* Réinitialise les informations associées une position. */ void gtk_status_stack_reset_current_location(GtkStatusStack *); diff --git a/src/gtkext/hexdisplay.c b/src/gtkext/hexdisplay.c index f557513..32bd69b 100644 --- a/src/gtkext/hexdisplay.c +++ b/src/gtkext/hexdisplay.c @@ -25,6 +25,7 @@ #include "gtkbufferdisplay-int.h" +#include "../core/columns.h" #include "../core/params.h" #include "../format/format.h" #include "../glibext/generators/hex.h" diff --git a/src/gtkext/hexdisplay.h b/src/gtkext/hexdisplay.h index 45a1da9..9190548 100644 --- a/src/gtkext/hexdisplay.h +++ b/src/gtkext/hexdisplay.h @@ -48,19 +48,6 @@ typedef struct _GtkHexDisplay GtkHexDisplay; typedef struct _GtkHexDisplayClass GtkHexDisplayClass; -/* Désignation des colonnes d'une ligne */ -typedef enum _HexLineColumn -{ - HLC_PHYSICAL, /* Position physique */ - HLC_BINARY, /* Données binaires brutes */ - HLC_PADDING, /* Espacement forcé */ - HLC_TRANSLATION, /* Traduction de contenu */ - - HLC_COUNT, - -} HexLineColumn; - - /* Détermine le type du composant d'affichage sous forme hexadécimale. */ GType gtk_hex_display_get_type(void); diff --git a/src/gtkext/rendering.c b/src/gtkext/rendering.c index bb86791..8badf21 100644 --- a/src/gtkext/rendering.c +++ b/src/gtkext/rendering.c @@ -28,6 +28,7 @@ #include <malloc.h> #include <stdio.h> #include <string.h> +#include <gtk/gtk.h> #include "../common/extstr.h" diff --git a/src/gtkext/rendering.h b/src/gtkext/rendering.h index d80c096..9adfe1a 100644 --- a/src/gtkext/rendering.h +++ b/src/gtkext/rendering.h @@ -27,7 +27,7 @@ #include <stdbool.h> -#include <gtk/gtk.h> +#include <gdk/gdk.h> |