mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
Debugger/PPU: Add Go-To from function pointer
This commit is contained in:
parent
6dc9e9659d
commit
6908d20128
@ -1242,10 +1242,32 @@ void debugger_frame::ShowGotoAddressDialog()
|
|||||||
|
|
||||||
void debugger_frame::PerformGoToRequest(const QString& text_argument)
|
void debugger_frame::PerformGoToRequest(const QString& text_argument)
|
||||||
{
|
{
|
||||||
const u64 address = EvaluateExpression(text_argument);
|
const bool asterisk_prefixed = text_argument.startsWith(QChar('*'));
|
||||||
|
const u64 address = EvaluateExpression(asterisk_prefixed ? text_argument.sliced(1, text_argument.size() - 1) : text_argument);
|
||||||
|
|
||||||
if (address != umax)
|
if (address != umax)
|
||||||
{
|
{
|
||||||
|
// Try to read from OPD entry if prefixed by asterisk
|
||||||
|
if (asterisk_prefixed)
|
||||||
|
{
|
||||||
|
if (auto cpu = get_cpu())
|
||||||
|
{
|
||||||
|
if (auto ppu = cpu->try_get<ppu_thread>())
|
||||||
|
{
|
||||||
|
const vm::ptr<u32> func_ptr = vm::cast(static_cast<u32>(address));
|
||||||
|
|
||||||
|
be_t<u32> code_addr{};
|
||||||
|
|
||||||
|
if (func_ptr.try_read(code_addr))
|
||||||
|
{
|
||||||
|
m_debugger_list->ShowAddress(code_addr, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_debugger_list->ShowAddress(static_cast<u32>(address), true);
|
m_debugger_list->ShowAddress(static_cast<u32>(address), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user