diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-07-12 22:26:49 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-07-12 22:26:49 (GMT) |
commit | 7e1c5ac72a317d39952843239023c0fa506f2322 (patch) | |
tree | 206b4f7ca4165c22b796d90e3343f677296b0857 /src/panels | |
parent | 254254db8c09eb4b4f8523e73551c13ec281d194 (diff) |
Cleaned the code handling binary symbols.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@548 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/panels')
-rw-r--r-- | src/panels/strings.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/panels/strings.c b/src/panels/strings.c index 1362ee1..8fd7ae6 100644 --- a/src/panels/strings.c +++ b/src/panels/strings.c @@ -125,7 +125,8 @@ void handle_new_exe_on_strings_panel(GtkWidget *panel, const GExeFormat *format) size_t count; /* Nombre des chaînes */ GBinSymbol **symbols; /* Liste des chaînes trouvées */ size_t i; /* Boucle de parcours */ - char address[11]; /* Conversion de l'adresse */ + const mrange_t *range; /* Emplacement de symbole */ + char address[VMPA_MAX_LEN]; /* Conversion de l'adresse */ GtkTreeIter iter; /* Point d'insertion */ store = g_object_get_data(G_OBJECT(panel), "store"); @@ -136,13 +137,13 @@ void handle_new_exe_on_strings_panel(GtkWidget *panel, const GExeFormat *format) { if (g_binary_symbol_get_target_type(symbols[i]) != STP_STRING) continue; - /* FIXME : adresses autres que 32 bits */ - snprintf(address, 11, "0x%08llx", g_binary_symbol_get_address(symbols[i])); + range = g_binary_symbol_get_range(symbols[i]); + mrange_virt_to_string(range, MDS_UNDEFINED, true, address, NULL); gtk_tree_store_append(store, &iter, NULL); gtk_tree_store_set(store, &iter, STC_ADDRESS, address, - STC_STRING, g_binary_symbol_to_string(symbols[i]), + STC_STRING, g_binary_symbol_get_label(symbols[i]), -1); } |