fix a minor "misfeature" in the symbol table code.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1952 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-01-20 13:13:03 +00:00
parent 8c997e90d9
commit d6443478b0
3 changed files with 33 additions and 23 deletions

View File

@ -93,11 +93,12 @@ void SymbolDB::AddKnownSymbol(u32 startAddr, u32 size, const char *name, int typ
XFuncMap::iterator iter = functions.find(startAddr);
if (iter != functions.end())
{
// already got it, let's just update name and checksum to be sure.
// already got it, let's just update name, checksum & size to be sure.
Symbol *tempfunc = &iter->second;
tempfunc->name = name;
tempfunc->hash = SignatureDB::ComputeCodeChecksum(startAddr, startAddr + size);
tempfunc->type = type;
tempfunc->size = size;
}
else
{
@ -110,6 +111,7 @@ void SymbolDB::AddKnownSymbol(u32 startAddr, u32 size, const char *name, int typ
PPCAnalyst::AnalyzeFunction(startAddr, tf, size);
checksumToFunction[tf.hash] = &(functions[startAddr]);
}
tf.size = size;
functions[startAddr] = tf;
}
}