mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
2006-10-09 Soren Sandmann <ssp@localhost.localdomain> * process.c (process_get_vdso_bytes): New function. * elfparser.c (parser_new_from_data): export this function as elf_parser_new_from_data(). * binfile.c (read_inode): Don't stat if filename is '[vdso]'. Instead just return -1; (bin_file_new): Use elf_parser_new_from_data() when the file is [vdso]. * process.c (read_maps): Change the offset of the vdso map to 0 and the inode to -1. * elfparser.c (elf_parser_lookup_symbol): Remove unused 'size' variable. * binfile.c (find_separate_debug_file): Deal with cycles in the debuglink graph. * configure.ac: Set version to 1.1.0. Print warning about HEAD.
37 lines
1.3 KiB
C
37 lines
1.3 KiB
C
#include <glib.h>
|
|
|
|
typedef struct ElfSym ElfSym;
|
|
typedef struct ElfParser ElfParser;
|
|
|
|
ElfParser * elf_parser_new_from_data (const guchar *data,
|
|
gsize length);
|
|
ElfParser * elf_parser_new (const char *filename,
|
|
GError **err);
|
|
void elf_parser_free (ElfParser *parser);
|
|
const char * elf_parser_get_debug_link (ElfParser *parser,
|
|
guint32 *crc32);
|
|
const guchar *elf_parser_get_eh_frame (ElfParser *parser);
|
|
gulong elf_parser_get_text_offset (ElfParser *parser);
|
|
|
|
|
|
/* 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);
|
|
guint32 elf_parser_get_crc32 (ElfParser *parser);
|
|
const char *elf_parser_get_sym_name (ElfParser *parser,
|
|
const ElfSym *sym);
|
|
gulong elf_parser_get_sym_address (ElfParser *parser,
|
|
const ElfSym *sym);
|
|
char *elf_demangle (const char *name);
|