mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
virtual memory block reads/writes properly fail if address is out of bounds.
Fixes Solar v2.1 http://puu.sh/8ScXK.jpg
This commit is contained in:
parent
0d0df4b491
commit
9e791da7bd
5 changed files with 73 additions and 44 deletions
|
@ -322,20 +322,28 @@ void RSXDebugger::GoToGet(wxCommandEvent& event)
|
|||
{
|
||||
if (!RSXReady()) return;
|
||||
CellGcmControl* ctrl = (CellGcmControl*)&Memory[Emu.GetGSManager().GetRender().m_ctrlAddress];
|
||||
m_addr = Memory.RSXIOMem.getRealAddr(Memory.RSXIOMem.GetStartAddr() + ctrl->get);
|
||||
t_addr->SetValue(wxString::Format("%08x", m_addr));
|
||||
UpdateInformation();
|
||||
event.Skip();
|
||||
u64 realAddr;
|
||||
if (Memory.RSXIOMem.getRealAddr(Memory.RSXIOMem.GetStartAddr() + ctrl->get, realAddr)) {
|
||||
m_addr = realAddr; // WARNING: Potential Truncation? Cast from u64 to u32
|
||||
t_addr->SetValue(wxString::Format("%08x", m_addr));
|
||||
UpdateInformation();
|
||||
event.Skip();
|
||||
}
|
||||
// TODO: We should probably throw something?
|
||||
}
|
||||
|
||||
void RSXDebugger::GoToPut(wxCommandEvent& event)
|
||||
{
|
||||
if (!RSXReady()) return;
|
||||
CellGcmControl* ctrl = (CellGcmControl*)&Memory[Emu.GetGSManager().GetRender().m_ctrlAddress];
|
||||
m_addr = Memory.RSXIOMem.getRealAddr(Memory.RSXIOMem.GetStartAddr() + ctrl->put);
|
||||
t_addr->SetValue(wxString::Format("%08x", m_addr));
|
||||
UpdateInformation();
|
||||
event.Skip();
|
||||
u64 realAddr;
|
||||
if (Memory.RSXIOMem.getRealAddr(Memory.RSXIOMem.GetStartAddr() + ctrl->put, realAddr)) {
|
||||
m_addr = realAddr; // WARNING: Potential Truncation? Cast from u64 to u32
|
||||
t_addr->SetValue(wxString::Format("%08x", m_addr));
|
||||
UpdateInformation();
|
||||
event.Skip();
|
||||
}
|
||||
// TODO: We should probably throw something?
|
||||
}
|
||||
|
||||
void RSXDebugger::UpdateInformation()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue