diff options
author | Soeren Sandmann <sandmann@redhat.com> | 2005-07-10 14:52:41 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2005-07-10 14:52:41 +0000 |
commit | 775a1e3c5d975c32a01a3573c159a83ff0f11406 (patch) | |
tree | c85f8b17fcc5fb6f343b53df149984773644ee7d | |
parent | f3b78b794403c24485001646da0d6e55046a305a (diff) |
Various minor clean-upssysprof-0.91
Sun Jul 10 10:51:52 2005 Soeren Sandmann <sandmann@redhat.com>
* binfile.c: Various minor clean-ups
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | binfile.c | 11 |
2 files changed, 7 insertions, 8 deletions
@@ -1,3 +1,7 @@ +Sun Jul 10 10:51:52 2005 Soeren Sandmann <sandmann@redhat.com> + + * binfile.c: Various minor clean-ups + Sat Jul 9 23:20:39 2005 Soeren Sandmann <sandmann@redhat.com> * binfile.c (bin_file_new): Cache BinFiles by filename. @@ -269,7 +269,7 @@ extern char *cplus_demangle (const char *mangled, int options); #define DMGL_PARAMS (1 << 0) /* Include function args */ #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ -char * +static char * demangle (bfd *bfd, const char *name) { char *demangled; @@ -278,7 +278,7 @@ demangle (bfd *bfd, const char *name) ++name; demangled = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS); - return demangled ? demangled : strdup (name); + return demangled ? demangled : g_strdup (name); } static gint @@ -370,17 +370,12 @@ read_symbols (BinFile *bf) #endif symbol.address = bfd_asymbol_value (bfd_symbols[i]) - load_address; - name = demangle (bfd, bfd_asymbol_name (bfd_symbols[i])); - + symbol.name = demangle (bfd, bfd_asymbol_name (bfd_symbols[i])); #if 0 symbol.name = g_strdup_printf ("%s (%s)", name, bf->filename); -#endif symbol.name = g_strdup (name); -#if 0 g_print ("symbol: %s (%s) %p\n", name, bf->filename, symbol.address); #endif - - free (name); g_array_append_vals (symbols, &symbol, 1); } |