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

@@ -15,10 +15,20 @@ using namespace alloy::runtime;
SymbolInfo::SymbolInfo(Type type, Module* module, uint64_t address) :
type_(type), status_(STATUS_DEFINING),
module_(module), address_(address) {
module_(module), address_(address), name_(0) {
}
SymbolInfo::~SymbolInfo() {
if (name_) {
xe_free(name_);
}
}
void SymbolInfo::set_name(const char* name) {
if (name_) {
xe_free(name_);
}
name_ = xestrdupa(name);
}
FunctionInfo::FunctionInfo(Module* module, uint64_t address) :