summaryrefslogtreecommitdiff
path: root/src/panel/symbols.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/panel/symbols.c')
-rw-r--r--src/panel/symbols.c18
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);
}