diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-09 22:30:20 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-09 22:30:20 -0500 |
commit | e1449ed956ae29129bde3e5137dde1d579d585ff (patch) | |
tree | 6b83388003e15046e738fb2da4276163f192ec84 /arch/powerpc | |
parent | a7ddc5e85351931b67a48afa22788d77763837d8 (diff) |
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: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index b43a57425ea9..cfcb2a56d662 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -1792,7 +1792,7 @@ memex(void) | |||
1792 | for(;;){ | 1792 | for(;;){ |
1793 | if (!mnoread) | 1793 | if (!mnoread) |
1794 | n = mread(adrs, val, size); | 1794 | n = mread(adrs, val, size); |
1795 | printf("%.16x%c", adrs, brev? 'r': ' '); | 1795 | printf(REG"%c", adrs, brev? 'r': ' '); |
1796 | if (!mnoread) { | 1796 | if (!mnoread) { |
1797 | if (brev) | 1797 | if (brev) |
1798 | byterev(val, size); | 1798 | byterev(val, size); |
@@ -1971,17 +1971,18 @@ prdump(unsigned long adrs, long ndump) | |||
1971 | nr = mread(adrs, temp, r); | 1971 | nr = mread(adrs, temp, r); |
1972 | adrs += nr; | 1972 | adrs += nr; |
1973 | for (m = 0; m < r; ++m) { | 1973 | for (m = 0; m < r; ++m) { |
1974 | if ((m & 7) == 0 && m > 0) | 1974 | if ((m & (sizeof(long) - 1)) == 0 && m > 0) |
1975 | putchar(' '); | 1975 | putchar(' '); |
1976 | if (m < nr) | 1976 | if (m < nr) |
1977 | printf("%.2x", temp[m]); | 1977 | printf("%.2x", temp[m]); |
1978 | else | 1978 | else |
1979 | printf("%s", fault_chars[fault_type]); | 1979 | printf("%s", fault_chars[fault_type]); |
1980 | } | 1980 | } |
1981 | if (m <= 8) | 1981 | for (; m < 16; ++m) { |
1982 | printf(" "); | 1982 | if ((m & (sizeof(long) - 1)) == 0) |
1983 | for (; m < 16; ++m) | 1983 | putchar(' '); |
1984 | printf(" "); | 1984 | printf(" "); |
1985 | } | ||
1985 | printf(" |"); | 1986 | printf(" |"); |
1986 | for (m = 0; m < r; ++m) { | 1987 | for (m = 0; m < r; ++m) { |
1987 | if (m < nr) { | 1988 | if (m < nr) { |