mirror of
https://github.com/mupen64plus/mupen64plus-ui-console.git
synced 2025-04-02 10:52:34 -04:00
fix last commit; we need to support hex addresses too
This commit is contained in:
parent
0dc8782b4d
commit
cbbfeaad14
1 changed files with 12 additions and 5 deletions
|
@ -237,7 +237,9 @@ int debugger_loop(void *arg) {
|
|||
uint32_t readAddr, length=1, rows=1, size=4;
|
||||
uint32_t i, j;
|
||||
char chSize;
|
||||
if (sscanf(input, "mem /%ux%u%c %u", &rows, &length, &chSize, &readAddr) == 4 && (chSize == 'b' || chSize == 'h' || chSize == 'w' || chSize == 'd'))
|
||||
if ((sscanf(input, "mem /%ux%u%c %x", &rows, &length, &chSize, &readAddr) == 4 ||
|
||||
sscanf(input, "mem /%ux%u%c %u", &rows, &length, &chSize, &readAddr) == 4)
|
||||
&& (chSize == 'b' || chSize == 'h' || chSize == 'w' || chSize == 'd'))
|
||||
{
|
||||
if (chSize == 'b')
|
||||
size = 1;
|
||||
|
@ -248,10 +250,13 @@ int debugger_loop(void *arg) {
|
|||
else // chSize == 'd'
|
||||
size = 8;
|
||||
}
|
||||
else if (sscanf(input, "mem /%ux%u %u", &rows, &length, &readAddr) == 3)
|
||||
else if (sscanf(input, "mem /%ux%u %x", &rows, &length, &readAddr) == 3 ||
|
||||
sscanf(input, "mem /%ux%u %u", &rows, &length, &readAddr) == 3)
|
||||
{
|
||||
}
|
||||
else if (sscanf(input, "mem /%u%c %u", &length, &chSize, &readAddr) == 3 && (chSize == 'b' || chSize == 'h' || chSize == 'w' || chSize == 'd'))
|
||||
else if ((sscanf(input, "mem /%u%c %x", &length, &chSize, &readAddr) == 3 ||
|
||||
sscanf(input, "mem /%u%c %u", &length, &chSize, &readAddr) == 3)
|
||||
&& (chSize == 'b' || chSize == 'h' || chSize == 'w' || chSize == 'd'))
|
||||
{
|
||||
rows = 1;
|
||||
if (chSize == 'b')
|
||||
|
@ -263,11 +268,13 @@ int debugger_loop(void *arg) {
|
|||
else // chSize == 'd'
|
||||
size = 8;
|
||||
}
|
||||
else if (sscanf(input, "mem /%u %u", &length, &readAddr) == 2)
|
||||
else if (sscanf(input, "mem /%u %x", &length, &readAddr) == 2 ||
|
||||
sscanf(input, "mem /%u %u", &length, &readAddr) == 2)
|
||||
{
|
||||
rows = 1;
|
||||
}
|
||||
else if (sscanf(input, "mem %u", &readAddr) == 1)
|
||||
else if (sscanf(input, "mem %x", &readAddr) == 1 ||
|
||||
sscanf(input, "mem %u", &readAddr) == 1)
|
||||
{
|
||||
rows = 1;
|
||||
length = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue