diff options
author | J.T. Conklin <jtc@acorntoolworks.com> | 1995-07-14 20:47:19 +0000 |
---|---|---|
committer | J.T. Conklin <jtc@acorntoolworks.com> | 1995-07-14 20:47:19 +0000 |
commit | 5a25ad782b1016c0b6d9beac78ec05203f3f9474 (patch) | |
tree | f0a8f36f5d1d1e4594baabe7041156f6f1af2c68 /binutils | |
parent | 63e1380d5700428ddbfb8f7c92bacdaa54d1c1a1 (diff) | |
download | gdb-5a25ad782b1016c0b6d9beac78ec05203f3f9474.zip gdb-5a25ad782b1016c0b6d9beac78ec05203f3f9474.tar.gz gdb-5a25ad782b1016c0b6d9beac78ec05203f3f9474.tar.bz2 |
* sysdump.c (dh): Changed format of output to be 16 hex digits
followed by 16 ascii characters, similar to Emacs' hexl-mode,
to make it easier to read.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | bin | 105399 -> 10565 bytes | |||
-rw-r--r-- | binutils/sysdump.c | 15 |
2 files changed, 7 insertions, 8 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog Binary files differindex 6bb5d0d..f0e7ae0 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog diff --git a/binutils/sysdump.c b/binutils/sysdump.c index aa7b7cd..891ce13 100644 --- a/binutils/sysdump.c +++ b/binutils/sysdump.c @@ -84,27 +84,26 @@ dh (ptr, size) { int i; int j; - int span = 20; + int span = 16; printf ("\n************************************************************\n"); for (i = 0; i < size; i += span) { - for (j = 0; j < span && j + i < size; j++) + for (j = 0; j < span; j++) { - printf ("%02x ", ptr[i + j]); + if (j + i < size) + printf ("%02x ", ptr[i + j]); + else + printf (" "); } - printf ("\n"); - } - for (i = 0; i < size; i += span) - { for (j = 0; j < span && j + i < size; j++) { int c = ptr[i + j]; if (c < 32 || c > 127) c = '.'; - printf (" %c ", c); + printf ("%c", c); } printf ("\n"); } |