1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file include/monitor/ElfParser.h
10 #ifndef AesalonMonitor_ElfParser_H
11 #define AesalonMonitor_ElfParser_H
16 #include "config/Vault.h"
18 #define ELF32_TYPES Elf32_Ehdr, Elf32_Shdr, Elf32_Sym
19 #define ELF64_TYPES Elf64_Ehdr, Elf64_Shdr, Elf64_Sym
27 virtual ~Processor() {}
29 virtual void process(const char *symbolName
, uint64_t symbolAddress
, uint64_t symbolSize
) = 0;
34 Processor
*m_processor
;
49 void parse(const std::string
&filename
, Processor
*processor
);
53 template<typename ELFHeader
, typename SectionHeader
, typename SymbolHeader
>
56 template<typename SymbolHeader
>
57 void parseSymbols(SymbolHeader
*symbols
, int symbolCount
, const char *stringTable
);
60 } // namespace Monitor