From 379d2ed5a965fc1bdb2785bcd0fe0f95cf4a59d9 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 31 Jan 1999 19:12:46 +0000 Subject: New files added to ease debugging. --- cpukit/libmisc/dumpbuf/dumpbuf.c | 75 ++++++++++++++++++++++++++++++++++++++++ cpukit/libmisc/dumpbuf/dumpbuf.h | 21 +++++++++++ 2 files changed, 96 insertions(+) create mode 100644 cpukit/libmisc/dumpbuf/dumpbuf.c create mode 100644 cpukit/libmisc/dumpbuf/dumpbuf.h (limited to 'cpukit/libmisc') diff --git a/cpukit/libmisc/dumpbuf/dumpbuf.c b/cpukit/libmisc/dumpbuf/dumpbuf.c new file mode 100644 index 0000000000..1e41f52bbf --- /dev/null +++ b/cpukit/libmisc/dumpbuf/dumpbuf.c @@ -0,0 +1,75 @@ +/* + * COPYRIGHT (c) 1997. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may in + * the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#include +#include +#include +#include + +/* + * Put the body below Dump_Buffer so it won't get inlined. + */ + +static inline void Dump_Line( + unsigned char *buffer, + int length +); + +void Dump_Buffer( + unsigned char *buffer, + int length +) +{ + + int i, mod, max; + + if ( !length ) return; + + mod = length % 16; + + max = length - mod; + + for ( i=0 ; i