diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-09-12 20:09:06 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2013-09-20 20:09:24 +0400 |
commit | 227b8175e2c60334c644c7cf7800bef8efbe085b (patch) | |
tree | 7155c1bf7e775e15ea7e99c5087adc4e448b1823 /translate-all.c | |
parent | 41d1af4de44ac8729a21e4bf233d696861a3c570 (diff) | |
download | qemu-227b8175e2c60334c644c7cf7800bef8efbe085b.zip qemu-227b8175e2c60334c644c7cf7800bef8efbe085b.tar.gz qemu-227b8175e2c60334c644c7cf7800bef8efbe085b.tar.bz2 |
translate-all: Fix formatting of dump output
The page dump writes a table with 3 abi_ulong values in each row.
These values take 8 or 16 characters (depending on sizeof abi_ulong).
Fix the table headings to be aligned with the table columns.
old:
start end size prot
0000000120000000-000000012021e000 000000000021e000 rwx
0000004000000000-0000004000002000 0000000000002000 ---
0000004000002000-0000004000802000 0000000000800000 rw-
new:
start end size prot
0000000120000000-000000012021e000 000000000021e000 rwx
0000004000000000-0000004000002000 0000000000002000 ---
0000004000002000-0000004000802000 0000000000800000 rw-
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'translate-all.c')
-rw-r--r-- | translate-all.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/translate-all.c b/translate-all.c index 2c923c6..e7aff92 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1679,8 +1679,9 @@ static int dump_region(void *priv, abi_ulong start, /* dump memory mappings */ void page_dump(FILE *f) { - (void) fprintf(f, "%-8s %-8s %-8s %s\n", - "start", "end", "size", "prot"); + const int length = sizeof(abi_ulong) * 2; + (void) fprintf(f, "%-*s %-*s %-*s %s\n", + length, "start", length, "end", length, "size", "prot"); walk_memory_regions(f, dump_region); } |