1
0
Fork 0

GUI: show label of memory address in CPUInfoBox

This commit is contained in:
mrexodia 2017-08-09 02:40:02 +02:00
parent f97439c9f5
commit 8271b69f87
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 5 additions and 0 deletions

View File

@ -164,6 +164,11 @@ void CPUInfoBox::disasmSelectionChanged(dsint parVA)
bool ok; bool ok;
argMnemonic.toULongLong(&ok, 16); argMnemonic.toULongLong(&ok, 16);
QString valText = DbgMemIsValidReadPtr(arg.value) ? ToPtrString(arg.value) : ToHexString(arg.value); QString valText = DbgMemIsValidReadPtr(arg.value) ? ToPtrString(arg.value) : ToHexString(arg.value);
auto valTextSym = getSymbolicName(arg.value);
if(!valTextSym.contains(valText))
valText = QString("%1 %2").arg(valText, valTextSym);
else
valText = valTextSym;
argMnemonic = !ok ? QString("%1]=[%2").arg(argMnemonic).arg(valText) : valText; argMnemonic = !ok ? QString("%1]=[%2").arg(argMnemonic).arg(valText) : valText;
QString sizeName = ""; QString sizeName = "";
int memsize = basicinfo.memory.size; int memsize = basicinfo.memory.size;