Load map files and set function names.

This commit is contained in:
Ben Vanik
2013-12-22 14:04:41 -08:00
parent 47f0397245
commit 9208132ad9
12 changed files with 142 additions and 30 deletions

View File

@@ -21,11 +21,12 @@ namespace alloy {
namespace runtime {
class Function;
class Runtime;
class Module {
public:
Module(Memory* memory);
Module(Runtime* runtime);
virtual ~Module();
Memory* memory() const { return memory_; }
@@ -45,12 +46,15 @@ public:
void ForEachFunction(std::function<void (FunctionInfo*)> callback);
int ReadMap(const char* file_name);
private:
SymbolInfo::Status DeclareSymbol(
SymbolInfo::Type type, uint64_t address, SymbolInfo** out_symbol_info);
SymbolInfo::Status DefineSymbol(SymbolInfo* symbol_info);
protected:
Runtime* runtime_;
Memory* memory_;
private: