mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Debugger/Memory: Add support for address spaces
Different address spaces can be chosen in the memory view panel. * Effective (or virtual): Probably the view people mostly want. Address translation goes through MMU. * Auxiliary: ARAM address space. Does not display anything in Wii mode. * Physical: Physical address space. Only supports mem1 and mem2 (wii mode) so far.
This commit is contained in:
@ -1302,4 +1302,14 @@ static TranslateAddressResult TranslateAddress(u32 address)
|
||||
return TranslatePageAddress(address, flag);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
std::optional<u32> GetTranslatedAddress(u32 address)
|
||||
{
|
||||
auto result = TranslateAddress<XCheckTLBFlag::NoException>(address);
|
||||
if (!result.Success())
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
return std::optional<u32>(result.address);
|
||||
}
|
||||
|
||||
} // namespace PowerPC
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
@ -118,4 +119,6 @@ inline bool TranslateBatAddess(const BatTable& bat_table, u32* address)
|
||||
*address = (bat_result & BAT_RESULT_MASK) | (*address & (BAT_PAGE_SIZE - 1));
|
||||
return true;
|
||||
}
|
||||
|
||||
std::optional<u32> GetTranslatedAddress(u32 address);
|
||||
} // namespace PowerPC
|
||||
|
Reference in New Issue
Block a user