mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
New file, made out of files from libiberty in binutils.
2006-08-20 Soren Sandmann <sandmann@redhat.com> * Makefile.am, demangle.c: New file, made out of files from libiberty in binutils. * binfile.c: Use the new sysprof_cplus_demangle() function * elfparser.[ch]: Add code to lookup symbols. Add demangling function * testelf.c: Various tests
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
8967b3148c
commit
6c7afad3ff
18
elfparser.h
18
elfparser.h
@ -1,8 +1,26 @@
|
||||
#include <glib.h>
|
||||
|
||||
typedef struct ElfSym ElfSym;
|
||||
typedef struct ElfParser ElfParser;
|
||||
|
||||
ElfParser *elf_parser_new (const guchar *data,
|
||||
gsize length);
|
||||
|
||||
/* Lookup a symbol in the file.
|
||||
*
|
||||
* The symbol returned is const, so don't free it it or anything. It
|
||||
* will be valid until elf_parser_free() is called on the parser.
|
||||
*
|
||||
*
|
||||
* The address should be given in "file coordinates". This means that
|
||||
* if the file is mapped at address m and offset o, then an address a
|
||||
* should be looked up as "a - (m - o)". (m - o) is where the start
|
||||
* of the file would have been mapped, so a - (m - o) is the position
|
||||
* in the file of a.
|
||||
*/
|
||||
const ElfSym *elf_parser_lookup_symbol (ElfParser *parser,
|
||||
gulong address);
|
||||
|
||||
const char *elf_sym_get_name (const ElfSym *sym);
|
||||
gulong elf_sym_get_address (const ElfSym *sym);
|
||||
char *elf_demangle (const char *name);
|
||||
|
||||
Reference in New Issue
Block a user