mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Add commented out code to reject callback.
2008-02-17 Soren Sandmann <sandmann@redhat.com> * collector.c (lookup_symbol): Add commented out code to reject callback. * elfparser.c (struct ElfParser): Store the filename if any (elf_parser_get_sym_address): Subtract the load address, so the result will be an offset into the text section. * process.[ch] (process_lookup_symbol): Add an offset out-argument * binfile.[ch] (bin_symbol_get_address): New function * TODO: updates svn path=/trunk/; revision=397
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
9d2f7a1a9d
commit
b98db05f9b
10
binfile.c
10
binfile.c
@ -407,3 +407,13 @@ bin_symbol_get_name (BinFile *file,
|
||||
else
|
||||
return elf_parser_get_sym_name (file->elf, (const ElfSym *)symbol);
|
||||
}
|
||||
|
||||
gulong
|
||||
bin_symbol_get_address (BinFile *file,
|
||||
const BinSymbol *symbol)
|
||||
{
|
||||
if (file->undefined_name == (char *)symbol)
|
||||
return 0x0;
|
||||
else
|
||||
return file->text_offset + elf_parser_get_sym_address (file->elf, (const ElfSym *)symbol);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user