diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-08-09 18:12:27 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-08-09 18:12:27 (GMT) |
commit | 5cd25c4adfe0426520a51a76de3f77c77cfa4b8e (patch) | |
tree | 396514971fb78e81b7bb55c9cd3331d87b45ca9a /src/panel/symbols.c | |
parent | d02deb2425d6559c357bdd00e1c0fb05f35d5fc9 (diff) |
Reorganized the way formats are handled (Java and PE got disabled, Dwarf is empty).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@105 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/panel/symbols.c')
-rw-r--r-- | src/panel/symbols.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/panel/symbols.c b/src/panel/symbols.c index a31cc4b..1908ed0 100644 --- a/src/panel/symbols.c +++ b/src/panel/symbols.c @@ -30,6 +30,7 @@ #include "../arch/processor.h" +#include "../format/format.h" #include "../gtkext/gtkbinview.h" @@ -158,10 +159,10 @@ void change_symbols_selection(GtkTreeSelection *selection, gpointer data) * * ******************************************************************************/ -void reload_symbols_panel_content(GtkWidget *panel, const exe_format *format) +void reload_symbols_panel_content(GtkWidget *panel, const GExeFormat *format) { - GBinRoutine **routines; /* Routines trouvées */ - size_t count; /* Nombre de ces routines */ + GBinSymbol **symbols; /* Symboles trouvés */ + size_t count; /* Nombre de ces symboles */ GtkTreeStore *store; /* Modèle de gestion */ GArchProcessor *proc; /* Architecture utilisée */ size_t i; /* Boucle de parcours */ @@ -169,9 +170,9 @@ void reload_symbols_panel_content(GtkWidget *panel, const exe_format *format) char tmp[19]; /* Version humainement lisible */ GtkTreeIter iter; /* Point d'insertion */ - routines = get_all_exe_routines(format, &count); + symbols = g_binary_format_get_symbols(G_BIN_FORMAT(format), &count); - if (routines != NULL) + if (symbols != NULL) { store = g_object_get_data(G_OBJECT(panel), "store"); @@ -179,7 +180,10 @@ void reload_symbols_panel_content(GtkWidget *panel, const exe_format *format) for (i = 0; i < count; i++) { - address = g_binary_routine_get_address(routines[i]); + if (g_binary_symbol_get_target_type(symbols[i]) == STP_STRING) + continue; + + address = g_binary_symbol_get_address(symbols[i]); switch (g_arch_processor_get_memory_size(proc)) { @@ -205,7 +209,7 @@ void reload_symbols_panel_content(GtkWidget *panel, const exe_format *format) gtk_tree_store_append(store, &iter, NULL); gtk_tree_store_set(store, &iter, SBC_ADDRESS, tmp, - SBC_NAME, g_binary_routine_get_name(routines[i]), + SBC_NAME, g_binary_symbol_to_string(symbols[i]), -1); } |