Debugger Memory Search: add Array of byte type

This commit is contained in:
solid1353 2023-07-09 18:10:30 +03:00 committed by Connor McLaughlin
parent 3804a58729
commit 8362e6f435
2 changed files with 25 additions and 6 deletions

View File

@ -625,6 +625,8 @@ std::vector<u32> startWorker(DebugInterface* cpu, int type, u32 start, u32 end,
return searchWorker<double>(cpu, start, end, value.toDouble());
case 6:
return searchWorkerString(cpu, start, end, value.toStdString());
case 7:
return searchWorkerString(cpu, start, end, QByteArray::fromHex(value.toUtf8()).toStdString());
default:
Console.Error("Debugger: Unknown type when doing memory search!");
break;
@ -667,13 +669,24 @@ void CpuWidget::onSearchButtonClicked()
unsigned long long value;
if (searchType < 4)
switch (searchType)
{
value = searchValue.toULongLong(&ok, searchHex ? 16 : 10);
}
else if (searchType != 6)
{
searchValue.toDouble(&ok);
case 0:
case 1:
case 2:
case 3:
value = searchValue.toULongLong(&ok, searchHex ? 16 : 10);
break;
case 4:
case 5:
searchValue.toDouble(&ok);
break;
case 6:
ok = !searchValue.isEmpty();
break;
case 7:
ok = !searchValue.trimmed().isEmpty();
break;
}
if (!ok)
@ -684,6 +697,7 @@ void CpuWidget::onSearchButtonClicked()
switch (searchType)
{
case 7:
case 6:
case 5:
case 4:

View File

@ -231,6 +231,11 @@
<string>String</string>
</property>
</item>
<item>
<property name="text">
<string>Array of byte</string>
</property>
</item>
</widget>
</item>
<item row="1" column="2">