http://git.etherboot.org
/
people
/
peper
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7e93a6
)
[debug] Use a delimiter to break up DBG_HD() output
author
Michael Brown
<mcb30@etherboot.org>
Sun, 12 Jul 2009 20:30:08 +0000
(21:30 +0100)
committer
Michael Brown
<mcb30@etherboot.org>
Fri, 17 Jul 2009 21:58:44 +0000
(22:58 +0100)
Reading sixteen columns of hex digits can be difficult; include a "-"
character to split the output into two groups of eight columns.
src/core/debug.c
patch
|
blob
|
history
diff --git
a/src/core/debug.c
b/src/core/debug.c
index
500a7ac
..
8f92930
100644
(file)
--- a/
src/core/debug.c
+++ b/
src/core/debug.c
@@
-36,7
+36,8
@@
static void dbg_hex_dump_da_row ( unsigned long dispaddr, const void *data,
printf ( " " );
continue;
}
- printf ( " %02x", bytes[i] );
+ printf ( "%c%02x",
+ ( ( ( i % 16 ) == 8 ) ? '-' : ' ' ), bytes[i] );
}
printf ( " : " );
for ( i = offset ; i < ( offset + 16 ) ; i++ ) {