1
// Copyright 2013 Dolphin Emulator Project
2
// Licensed under GPLv2
3
// Refer to the license.txt file included.
5
// This file contains a generic symbol map implementation. For CPU-specific
6
// magic, derive and extend.
40
type(SYMBOL_FUNCTION),
45
std::vector<SCall> callers; //addresses of functions that call this function
46
std::vector<SCall> calls; //addresses of functions that are called by this function
47
u32 hash; //use for HLE function finding
53
int index; // only used for coloring the disasm view
59
FFLAG_TIMERINSTRUCTIONS=(1<<0),
61
FFLAG_ONLYCALLSNICELEAFS=(1<<2),
72
typedef std::map<u32, Symbol> XFuncMap;
73
typedef std::map<u32, Symbol*> XFuncPtrMap;
77
XFuncPtrMap checksumToFunction;
81
virtual ~SymbolDB() {}
82
virtual Symbol *GetSymbolFromAddr(u32 addr) { return 0; }
83
virtual Symbol *AddFunction(u32 startAddr) { return 0;}
85
void AddCompleteSymbol(const Symbol &symbol);
87
Symbol *GetSymbolFromName(const char *name);
88
Symbol *GetSymbolFromHash(u32 hash) {
89
XFuncPtrMap::iterator iter = checksumToFunction.find(hash);
90
if (iter != checksumToFunction.end())
96
const XFuncMap &Symbols() const {return functions;}
97
XFuncMap &AccessSymbols() {return functions;}
100
XFuncMap::iterator GetIterator() { return functions.begin(); }
101
XFuncMap::const_iterator GetConstIterator() { return functions.begin(); }
102
XFuncMap::iterator End() { return functions.end(); }
104
void Clear(const char *prefix = "");