projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41d1af4
)
translate-all: Fix formatting of dump output
author
Stefan Weil
<sw@weilnetz.de>
Thu, 12 Sep 2013 18:09:06 +0000
(20:09 +0200)
committer
Michael Tokarev
<mjt@tls.msk.ru>
Fri, 20 Sep 2013 16:09:24 +0000
(20:09 +0400)
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>
translate-all.c
patch
|
blob
|
history
diff --git
a/translate-all.c
b/translate-all.c
index 2c923c644b023180e2043a080a53e5a56aca671d..e7aff928b6664adb0762482b506416b1c8079a10 100644
(file)
--- 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);
}