mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
-check for invalid memory access when creating status bar text
-when displaying word access, show a label if it exists
This commit is contained in:
parent
96938acb3e
commit
bce211bcaa
1 changed files with 24 additions and 10 deletions
|
@ -834,6 +834,10 @@ void CtrlDisAsmView::updateStatusBarText()
|
||||||
text[0] = 0;
|
text[0] = 0;
|
||||||
if (info.isDataAccess)
|
if (info.isDataAccess)
|
||||||
{
|
{
|
||||||
|
if (!Memory::IsValidAddress(info.dataAddress))
|
||||||
|
{
|
||||||
|
sprintf(text,"Invalid address %08X",info.dataAddress);
|
||||||
|
} else {
|
||||||
switch (info.dataSize)
|
switch (info.dataSize)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -843,10 +847,20 @@ void CtrlDisAsmView::updateStatusBarText()
|
||||||
sprintf(text,"[%08X] = %04X",info.dataAddress,Memory::Read_U16(info.dataAddress));
|
sprintf(text,"[%08X] = %04X",info.dataAddress,Memory::Read_U16(info.dataAddress));
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
sprintf(text,"[%08X] = %08X",info.dataAddress,Memory::Read_U32(info.dataAddress));
|
{
|
||||||
|
u32 data = Memory::Read_U32(info.dataAddress);
|
||||||
|
const char* addressSymbol = debugger->findSymbolForAddress(data);
|
||||||
|
if (addressSymbol)
|
||||||
|
{
|
||||||
|
sprintf(text,"[%08X] = %s (%08X)",info.dataAddress,addressSymbol,data);
|
||||||
|
} else {
|
||||||
|
sprintf(text,"[%08X] = %08X",info.dataAddress,data);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (info.isBranch)
|
if (info.isBranch)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue