summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-02-09 20:15:52 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-02-09 20:15:52 (GMT)
commit8d326041a0379b87e54be44506d544367567e89b (patch)
treea3c3555c27c30858155fbee4df0ca236f33774f8 /src/gui
parentb70f428256963385a140e9eb503624106df5aa9b (diff)
Registered all the supported processors in the system code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@467 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/panels/bookmarks.c6
-rw-r--r--src/gui/panels/symbols.c10
-rw-r--r--src/gui/status.c10
3 files changed, 15 insertions, 11 deletions
diff --git a/src/gui/panels/bookmarks.c b/src/gui/panels/bookmarks.c
index 4b4777e..9239203 100644
--- a/src/gui/panels/bookmarks.c
+++ b/src/gui/panels/bookmarks.c
@@ -473,7 +473,6 @@ static void reload_bookmarks_into_treeview(GBookmarksPanel *panel, GLoadedBinary
{
GtkTreeStore *store; /* Modèle de gestion */
GDbCollection *collec; /* Collection à lister ici */
- GExeFormat *format; /* Format du fichier binaire */
GArchProcessor *proc; /* Architecture du binaire */
MemoryDataSize msize; /* Taille par défaut */
GList *items; /* Liste des éléments groupés */
@@ -503,10 +502,9 @@ static void reload_bookmarks_into_treeview(GBookmarksPanel *panel, GLoadedBinary
/* Actualisation de l'affichage */
- format = g_loaded_binary_get_format(binary);
- proc = get_arch_processor_from_format(format);
-
+ proc = g_loaded_binary_get_processor(binary);
msize = g_arch_processor_get_memory_size(proc);
+ g_object_unref(G_OBJECT(proc));
collec = g_loaded_binary_find_collection(binary, DBF_BOOKMARKS);
diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c
index cb10a54..e5fd390 100644
--- a/src/gui/panels/symbols.c
+++ b/src/gui/panels/symbols.c
@@ -635,9 +635,9 @@ static void change_symbols_panel_current_binary(GSymbolsPanel *panel, GLoadedBin
static void reload_symbols_for_new_list_view(GSymbolsPanel *panel)
{
GExeFormat *format; /* Format associé au binaire */
- GArchProcessor *proc; /* Architecture utilisée */
GBinSymbol **symbols; /* Symboles à représenter */
size_t sym_count; /* Qté de symboles présents */
+ GArchProcessor *proc; /* Architecture utilisée */
MemoryDataSize size; /* Taille des localisations */
size_t i; /* Boucle de parcours */
cairo_surface_t *icon; /* Image associée au symbole */
@@ -646,11 +646,12 @@ static void reload_symbols_for_new_list_view(GSymbolsPanel *panel)
GtkTreeIter iter; /* Point d'insertion */
format = g_loaded_binary_get_format(panel->binary);
- proc = get_arch_processor_from_format(format);
symbols = g_binary_format_get_symbols(G_BIN_FORMAT(format), &sym_count);
+ proc = g_loaded_binary_get_processor(panel->binary);
size = g_arch_processor_get_memory_size(proc);
+ g_object_unref(G_OBJECT(proc));
for (i = 0; i < sym_count; i++)
{
@@ -801,9 +802,9 @@ static bool find_parent_for_symbol(GtkTreeStore *store, const GBinSymbol *symbol
static void reload_symbols_for_new_tree_view(GSymbolsPanel *panel)
{
GExeFormat *format; /* Format associé au binaire */
- GArchProcessor *proc; /* Architecture utilisée */
GBinSymbol **symbols; /* Symboles à représenter */
size_t sym_count; /* Qté de symboles présents */
+ GArchProcessor *proc; /* Architecture utilisée */
MemoryDataSize size; /* Taille des localisations */
size_t i; /* Boucle de parcours */
GtkTreeIter parent; /* Point d'insertion parent */
@@ -813,11 +814,12 @@ static void reload_symbols_for_new_tree_view(GSymbolsPanel *panel)
GtkTreeIter iter; /* Point d'insertion */
format = g_loaded_binary_get_format(panel->binary);
- proc = get_arch_processor_from_format(format);
symbols = g_binary_format_get_symbols(G_BIN_FORMAT(format), &sym_count);
+ proc = g_loaded_binary_get_processor(panel->binary);
size = g_arch_processor_get_memory_size(proc);
+ g_object_unref(G_OBJECT(proc));
for (i = 0; i < sym_count; i++)
{
diff --git a/src/gui/status.c b/src/gui/status.c
index 3a96ea1..07e8254 100644
--- a/src/gui/status.c
+++ b/src/gui/status.c
@@ -283,8 +283,10 @@ static void track_caret_address_on_buffer_views(GtkBufferView *view, const vmpa2
item = G_EDITOR_ITEM(info);
binary = g_editor_item_get_current_binary(item);
- format = g_loaded_binary_get_format(binary);
- proc = get_arch_processor_from_format(format);
+
+ proc = g_loaded_binary_get_processor(binary);
+ msize = g_arch_processor_get_memory_size(proc);
+ g_object_unref(G_OBJECT(proc));
/* Adresse brute */
@@ -374,8 +376,10 @@ static void focus_address_in_status_info(GStatusInfo *info, GLoadedBinary *binar
size_t len; /* Caractère à faire basculer */
format = g_loaded_binary_get_format(binary);
- proc = get_arch_processor_from_format(format);
+
+ proc = g_loaded_binary_get_processor(binary);
msize = g_arch_processor_get_memory_size(proc);
+ g_object_unref(G_OBJECT(proc));
msg = strdup(_("Localisation:"));