summaryrefslogtreecommitdiff
path: root/src/format/elf/helper_x86.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2010-08-01 14:16:09 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2010-08-01 14:16:09 (GMT)
commitbcfcb4ec8b4cf9a35b77e93d172e7dae81e8872a (patch)
tree49320473d97a18f4c2fcb705358871be5a5e33c0 /src/format/elf/helper_x86.c
parent8725bd7f911369b04a507040256bf889517b377e (diff)
Cleaned the code and provided a fast way to demangle strings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@178 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/elf/helper_x86.c')
-rw-r--r--src/format/elf/helper_x86.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/format/elf/helper_x86.c b/src/format/elf/helper_x86.c
index d74c7dd..3b9084c 100644
--- a/src/format/elf/helper_x86.c
+++ b/src/format/elf/helper_x86.c
@@ -291,27 +291,7 @@ void translate_exe_elf_relocations(GElfFormat *format, GArchInstruction **instru
/* Routine */
- //printf("++ routine :: %s\n", "_ZN1N1TIiiE2mfES0_IddE"/*g_binary_symbol_to_string(symbols[j])*/);
- printf("++ routine :: %s\n", g_binary_symbol_to_string(symbols[j]));
- fflush(NULL);
-
- //routine = try_to_demangle_routine(get_demangler_by_type(DGT_ITANIUM), "_ZN1N1TIiiE2mfES0_IddE");
- routine = try_to_demangle_routine(get_demangler_by_type(DGT_ITANIUM), g_binary_symbol_to_string(symbols[j]));
-
- if (routine == NULL)
- {
- routine = g_binary_routine_new();
- g_binary_routine_set_name(routine, strdup(g_binary_symbol_to_string(symbols[j])));
- printf("++failed\n");
- //exit(0);
- }
- else printf("++success\n");
-
- printf(" -->> '%s'\n", g_binary_routine_get_name(routine));
-
- //if (strcmp(g_binary_symbol_to_string(symbols[j]), "_ZNSt8ios_base4InitC1Ev") == 0)
- //if (strcmp(g_binary_symbol_to_string(symbols[j]), "_ZNSolsEPFRSoS_E") == 0)
- // exit(0);
+ routine = try_to_demangle_routine(g_binary_symbol_to_string(symbols[j]));
g_binary_routine_set_address(routine, address);
@@ -419,19 +399,7 @@ void translate_dyn_elf_relocations(GElfFormat *format, GArchInstruction **instru
/* Routine */
- printf("++ routine :: %s\n", name);
- fflush(NULL);
-
- routine = try_to_demangle_routine(get_demangler_by_type(DGT_ITANIUM), name);
-
- if (routine == NULL)
- {
- routine = g_binary_routine_new();
- g_binary_routine_set_name(routine, strdup(name));
- printf("++failed\n");
- //exit(0);
- }
- else printf("++success\n");
+ routine = try_to_demangle_routine(name);
g_binary_routine_set_address(routine, address);