summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/xmon/xmon.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-10 04:30:20 +0100
committerPaul Mackerras <paulus@samba.org>2005-11-10 04:30:20 +0100
commite1449ed956ae29129bde3e5137dde1d579d585ff (patch)
tree6b83388003e15046e738fb2da4276163f192ec84 /arch/powerpc/xmon/xmon.c
parentpowerpc: Add user CPU features for POWER4, POWER5, POWER5+ and Cell. (diff)
downloadlinux-e1449ed956ae29129bde3e5137dde1d579d585ff.tar.xz
linux-e1449ed956ae29129bde3e5137dde1d579d585ff.zip
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/xmon/xmon.c')
-rw-r--r--arch/powerpc/xmon/xmon.c13
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)
for(;;){
if (!mnoread)
n = mread(adrs, val, size);
- printf("%.16x%c", adrs, brev? 'r': ' ');
+ printf(REG"%c", adrs, brev? 'r': ' ');
if (!mnoread) {
if (brev)
byterev(val, size);
@@ -1971,17 +1971,18 @@ prdump(unsigned long adrs, long ndump)
nr = mread(adrs, temp, r);
adrs += nr;
for (m = 0; m < r; ++m) {
- if ((m & 7) == 0 && m > 0)
- putchar(' ');
+ if ((m & (sizeof(long) - 1)) == 0 && m > 0)
+ putchar(' ');
if (m < nr)
printf("%.2x", temp[m]);
else
printf("%s", fault_chars[fault_type]);
}
- if (m <= 8)
- printf(" ");
- for (; m < 16; ++m)
+ for (; m < 16; ++m) {
+ if ((m & (sizeof(long) - 1)) == 0)
+ putchar(' ');
printf(" ");
+ }
printf(" |");
for (m = 0; m < r; ++m) {
if (m < nr) {