Formatting fixes in header files
[platform/upstream/sysprof.git] / elfparser.h
1 #include <glib.h>
2
3 typedef struct ElfSym ElfSym;
4 typedef struct ElfParser ElfParser;
5
6 ElfParser * elf_parser_new            (const char  *filename,
7                                        GError     **err);
8 void        elf_parser_free           (ElfParser   *parser);
9 const char *elf_parser_get_debug_link (ElfParser   *parser,
10                                        guint32     *crc32);
11
12
13 /* Lookup a symbol in the file.
14  *
15  * The symbol returned is const, so don't free it it or anything. It
16  * will be valid until elf_parser_free() is called on the parser.
17  *
18  *
19  * The address should be given in "file coordinates". This means that
20  * if the file is mapped at address m and offset o, then an address a
21  * should be looked up as  "a - (m - o)".  (m - o) is where the start
22  * of the file would have been mapped, so a - (m - o) is the position
23  * in the file of a.
24  */
25 const ElfSym *elf_parser_lookup_symbol (ElfParser *parser,
26                                         gulong     address);
27 guint32 elf_parser_get_crc32 (ElfParser *parser);
28 const char *elf_parser_get_sym_name (ElfParser *parser,
29                                      const ElfSym *sym);
30 gulong elf_parser_get_sym_address (ElfParser *parser,
31                                    const ElfSym *sym);
32 char *elf_demangle (const char *name);