mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Pass map->bin_file to bin_symbol_get_name.
2006-08-21 Soren Sandmann <sandmann@redhat.com> * process.c (process_lookup_symbol): Pass map->bin_file to bin_symbol_get_name. * binfile.h (bin_symbol_get_name): Add BinFile parameter * elfparser.c (elf_demangle): Use options DMGL_PARAMS | DMGL_ANSI * TODO: Updates * binfile.c: Rewrite this file to use ElfParser instead of libbfd. * configure.ac: Drop dependencies on libbfd and libiberty.
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
ad09fd10cb
commit
a1bddd8d9f
23
process.c
23
process.c
@ -573,8 +573,29 @@ process_lookup_symbol (Process *process, gulong address)
|
||||
return process->undefined;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (strcmp (map->filename, "/home/ssp/sysprof/sysprof") == 0)
|
||||
{
|
||||
g_print ("YES\n");
|
||||
|
||||
g_print ("map address: %lx\n", map->start);
|
||||
g_print ("map offset: %lx\n", map->offset);
|
||||
g_print ("address before: %lx\n", address);
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
g_print ("address before: \n");
|
||||
#endif
|
||||
|
||||
address -= map->start;
|
||||
address += map->offset;
|
||||
|
||||
#if 0
|
||||
if (strcmp (map->filename, "/home/ssp/sysprof/sysprof") == 0)
|
||||
{
|
||||
g_print ("address after: %lx\n", address);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!map->bin_file)
|
||||
map->bin_file = bin_file_new (map->filename);
|
||||
@ -600,7 +621,7 @@ process_lookup_symbol (Process *process, gulong address)
|
||||
|
||||
/* g_print ("(%x) %x %x name; %s\n", address, map->start, map->offset, result->name); */
|
||||
|
||||
return bin_symbol_get_name (result);
|
||||
return bin_symbol_get_name (map->bin_file, result);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
||||
Reference in New Issue
Block a user