mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 14:46:49 +01:00
Merge pull request #12351 from TryTwo/bugfix_data_symbols
PPCSymbolDB. Bugfix. Fix .data symbols not loading
This commit is contained in:
commit
98eda4dc9f
@ -407,9 +407,16 @@ bool PPCSymbolDB::LoadMap(const Core::CPUThreadGuard& guard, const std::string&
|
|||||||
|
|
||||||
// Check if this is a valid entry.
|
// Check if this is a valid entry.
|
||||||
if (strlen(name) > 0)
|
if (strlen(name) > 0)
|
||||||
|
{
|
||||||
|
bool good;
|
||||||
|
const Common::Symbol::Type type = section_name == ".text" || section_name == ".init" ?
|
||||||
|
Common::Symbol::Type::Function :
|
||||||
|
Common::Symbol::Type::Data;
|
||||||
|
|
||||||
|
if (type == Common::Symbol::Type::Function)
|
||||||
{
|
{
|
||||||
// Can't compute the checksum if not in RAM
|
// Can't compute the checksum if not in RAM
|
||||||
bool good = !bad && PowerPC::MMU::HostIsInstructionRAMAddress(guard, vaddress) &&
|
good = !bad && PowerPC::MMU::HostIsInstructionRAMAddress(guard, vaddress) &&
|
||||||
PowerPC::MMU::HostIsInstructionRAMAddress(guard, vaddress + size - 4);
|
PowerPC::MMU::HostIsInstructionRAMAddress(guard, vaddress + size - 4);
|
||||||
if (!good)
|
if (!good)
|
||||||
{
|
{
|
||||||
@ -423,12 +430,17 @@ bool PPCSymbolDB::LoadMap(const Core::CPUThreadGuard& guard, const std::string&
|
|||||||
good = read_result.valid && read_result.hex == 0x4e800020;
|
good = read_result.valid && read_result.hex == 0x4e800020;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Data type, can have any length.
|
||||||
|
good = !bad && PowerPC::MMU::HostIsRAMAddress(guard, vaddress) &&
|
||||||
|
PowerPC::MMU::HostIsRAMAddress(guard, vaddress + size - 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (good)
|
if (good)
|
||||||
{
|
{
|
||||||
++good_count;
|
++good_count;
|
||||||
const Common::Symbol::Type type = section_name == ".text" || section_name == ".init" ?
|
|
||||||
Common::Symbol::Type::Function :
|
|
||||||
Common::Symbol::Type::Data;
|
|
||||||
AddKnownSymbol(guard, vaddress, size, name, type);
|
AddKnownSymbol(guard, vaddress, size, name, type);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user