headers/bsd: Add sys/queue.h.
[haiku.git] / src / kits / debugger / elf / ElfSymbolLookup.h
blobb06d571ff5334eb4f608f2f75b54430a34a13c73
1 /*
2 * Copyright 2016, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef ELF_SYMBOL_LOOKUP_H
6 #define ELF_SYMBOL_LOOKUP_H
9 #include <Referenceable.h>
11 #include "ElfFile.h"
12 #include "SymbolInfo.h"
15 class ElfSymbolLookupSource : public BReferenceable {
16 public:
17 virtual ssize_t Read(uint64 address, void* buffer,
18 size_t size) = 0;
22 class ElfSymbolLookup {
23 public:
24 static const uint32 kGetSymbolCountFromHash = ~(uint32)0;
26 public:
27 virtual ~ElfSymbolLookup();
29 static status_t Create(ElfSymbolLookupSource* source,
30 uint64 symbolTable, uint64 symbolHash,
31 uint64 stringTable, uint32 symbolCount,
32 uint32 symbolTableEntrySize,
33 uint64 textDelta, bool is64Bit,
34 bool swappedByteOrder, bool cacheSource,
35 ElfSymbolLookup*& _lookup);
37 virtual status_t Init(bool cacheSource) = 0;
38 virtual status_t NextSymbolInfo(uint32& index,
39 SymbolInfo& _info) = 0;
40 virtual status_t GetSymbolInfo(const char* name,
41 uint32 symbolType, SymbolInfo& _info) = 0;
45 #endif // ELF_SYMBOL_LOOKUP_H