Commit e1449ed9 authored by Paul Mackerras's avatar Paul Mackerras

powerpc: 32-bit fixes for xmon

This makes the memory examine/change command print the address as
8 digits instead of 16, and makes the memory dump command print
4 4-byte values per line instead of 2 8-byte values.
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent a7ddc5e8
...@@ -1792,7 +1792,7 @@ memex(void) ...@@ -1792,7 +1792,7 @@ memex(void)
for(;;){ for(;;){
if (!mnoread) if (!mnoread)
n = mread(adrs, val, size); n = mread(adrs, val, size);
printf("%.16x%c", adrs, brev? 'r': ' '); printf(REG"%c", adrs, brev? 'r': ' ');
if (!mnoread) { if (!mnoread) {
if (brev) if (brev)
byterev(val, size); byterev(val, size);
...@@ -1971,17 +1971,18 @@ prdump(unsigned long adrs, long ndump) ...@@ -1971,17 +1971,18 @@ prdump(unsigned long adrs, long ndump)
nr = mread(adrs, temp, r); nr = mread(adrs, temp, r);
adrs += nr; adrs += nr;
for (m = 0; m < r; ++m) { for (m = 0; m < r; ++m) {
if ((m & 7) == 0 && m > 0) if ((m & (sizeof(long) - 1)) == 0 && m > 0)
putchar(' '); putchar(' ');
if (m < nr) if (m < nr)
printf("%.2x", temp[m]); printf("%.2x", temp[m]);
else else
printf("%s", fault_chars[fault_type]); printf("%s", fault_chars[fault_type]);
} }
if (m <= 8) for (; m < 16; ++m) {
printf(" "); if ((m & (sizeof(long) - 1)) == 0)
for (; m < 16; ++m) putchar(' ');
printf(" "); printf(" ");
}
printf(" |"); printf(" |");
for (m = 0; m < r; ++m) { for (m = 0; m < r; ++m) {
if (m < nr) { if (m < nr) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment