1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

fixup for rsx debugging tools segfaults

This commit is contained in:
eladash 2018-10-23 08:52:59 +03:00 committed by Ivan
parent 5ee351234c
commit dfacdd8a40
2 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ void debugger_list::ShowAddress(u32 addr)
const u32 cpu_offset = is_spu ? static_cast<spu_thread&>(*cpu).offset : 0;
const u32 address_limits = is_spu ? 0x3ffff : ~0;
m_pc &= address_limits;
m_disasm->offset = (u8*)vm::base(cpu_offset);
m_disasm->offset = vm::get_super_ptr(cpu_offset);
for (uint i = 0, count = 4; i<m_item_count; ++i, m_pc = (m_pc + count) & address_limits)
{
if (!vm::check_addr(cpu_offset + m_pc, 4))

View File

@ -633,7 +633,7 @@ void rsx_debugger::GetMemory()
if (vm::check_addr(RSXIOMem.RealAddr(addr)))
{
u32 cmd = vm::read32(RSXIOMem.RealAddr(addr));
u32 cmd = *vm::get_super_ptr<u32>(RSXIOMem.RealAddr(addr));
u32 count = (cmd >> 18) & 0x7ff;
m_list_commands->setItem(i, 1, new QTableWidgetItem(qstr(fmt::format("%08x", cmd))));
m_list_commands->setItem(i, 2, new QTableWidgetItem(DisAsmCommand(cmd, count, addr)));
@ -690,7 +690,7 @@ void rsx_debugger::GetBuffers()
if(!vm::check_addr(RSXbuffer_addr))
continue;
auto RSXbuffer = vm::_ptr<u8>(RSXbuffer_addr);
auto RSXbuffer = vm::get_super_ptr<u8>(RSXbuffer_addr);
u32 width = buffers[bufferId].width;
u32 height = buffers[bufferId].height;
@ -739,7 +739,7 @@ void rsx_debugger::GetBuffers()
if(!vm::check_addr(TexBuffer_addr))
return;
unsigned char* TexBuffer = vm::_ptr<u8>(TexBuffer_addr);
unsigned char* TexBuffer = vm::get_super_ptr<u8>(TexBuffer_addr);
u32 width = render->textures[m_cur_texture].width();
u32 height = render->textures[m_cur_texture].height();