mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
RSX-Debugger: Implement backwards scrolling
* Use 2 points of known true RSX code roots and follow them in order to peek at the current section of valid RSX code: These roots are: current RSX instruction address and the last targeted address by a branch instruction.
This commit is contained in:
parent
26d8120168
commit
1d51f3af0c
10 changed files with 108 additions and 34 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "Emu/CPU/CPUDisAsm.h"
|
||||
#include "Emu/CPU/CPUThread.h"
|
||||
#include "Emu/RSX/RSXDisAsm.h"
|
||||
#include "Emu/RSX/RSXThread.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
|
|
@ -164,6 +165,16 @@ void debugger_list::scroll(s32 steps)
|
|||
steps--;
|
||||
}
|
||||
|
||||
if (m_cpu && m_cpu->id_type() == 0x55 && steps < 0)
|
||||
{
|
||||
// If scrolling backwards (upwards), try to obtain the start of commands tail
|
||||
if (auto [count, res] = static_cast<rsx::thread*>(m_cpu)->try_get_pc_of_x_cmds_backwards(-steps, m_pc); count == 0u - steps)
|
||||
{
|
||||
steps = 0;
|
||||
m_pc = res;
|
||||
}
|
||||
}
|
||||
|
||||
ShowAddress(m_pc + (steps * 4), false, true);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue