X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=rpikern;a=blobdiff_plain;f=src%2Fdebug.c;fp=src%2Fdebug.c;h=241b147c16a7041210bf304de8bbbccddc645712;hp=0000000000000000000000000000000000000000;hb=6da291dc416a718164b5596aa16b1901f2770732;hpb=32ccc707bc0821d7ff4248fe9f58e92e9c6ebef9 diff --git a/src/debug.c b/src/debug.c new file mode 100644 index 0000000..241b147 --- /dev/null +++ b/src/debug.c @@ -0,0 +1,38 @@ +#include +#include +#include "debug.h" + + +void hexdump(void *start, int nbytes) +{ + int i, j, nlines; + unsigned char *ptr = start; + unsigned char *end = ptr + nbytes; + + nlines = (nbytes + 0xf) >> 4; + + for(i=0; i