debug




HEX DUMP
--------
    % ls | debug
    00000000: 4d 61 6b 65 66 69 6c 65 0a 64 65 62 75 67 0a 64  Makefile.debug.d
    00000010: 65 62 75 67 2e 43 0a 64 65 62 75 67 2e 63 2e 6f  ebug.C.debug.c.o
    00000020: 6b 0a                                            k.


DECIMAL DUMP
------------
    % ls | debug -d
     0:  77  97 107 101 102 105 108 101  10 100  Makefile.d
    10: 101  98 117 103  10 100 101  98 117 103  ebug.debug
    20:  46  67  10 100 101  98 117 103  46  99  .C.debug.c
    30:  46 111 107  10                          .ok.


BINARY DUMP
-----------
    % ls | debug -b
    00000000000000000000000000000000: 01001101 01100001 01101011 01100101 01100110 01101001 01101100 01100101  Makefile
    00000000000000000000000000001000: 00001010 01100100 01100101 01100010 01110101 01100111 00001010 01100100  .debug.d
    00000000000000000000000000010000: 01100101 01100010 01110101 01100111 00101110 01000011 00001010 01100100  ebug.C.d
    00000000000000000000000000011000: 01100101 01100010 01110101 01100111 00101110 01100011 00101110 01101111  ebug.c.o
    00000000000000000000000000100000: 01101011 00001010                                                        k.


USING WITH DD FOR OFFSETS
-------------------------
    % dd if=/dev/mem bs=1 skip=1024 count=64 | debug
    00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00000010: 6c 65 3a 2d 62 75 6e 64 6c 65 20 25 7b 21 64 79  le:-bundle %{!dy
    00000020: 6e 61 6d 69 63 6c 69 62 3a 25 7b 69 6d 61 67 65  namiclib:%{image
    00000030: 5f 62 61 73 65 7d 7d 7d 20 09 09 25 7b 41 7d 20  _base}}} ..%{A}


COMPILE
-------
    c++ debug.C -o debug      # Mac OSX
    g++ debug.C -o debug      # Linux
    CC  debug.C -o debug      # IRIX
    cl /DIBMPC debug.C /Tp    # Windows (haven't tested this in a while)


HELP
----
    % debug -help
    NAME
	debug - a simple debug facility, V 1.10

    USAGE
	debug -[options] filename [..]
	debug -[options] < filename

    OPTIONS:
       -h    ;Hex     mode (default)
       -d    ;Decimal mode
       -o    ;Octal   mode
       -b    ;Binary  mode
       -c    ;Char  [8 bit] mode (default)
       -s    ;Short [16 bit] mode
       -l    ;Long  [32 bit] mode
       -m    ;More. Pauses listing every 256 bytes
       -na   ;No ascii (don't show ascii conversion column

    EXAMPLES
	debug file                    # hex dump 'file'
	debug -d file                 # decimal dump 'file'
	debug -d -m file              # decimal dump 'file' with MORE prompts
	cat file | debug -m -d        # decimal dump 'file' with MORE prompts
	perl -e '$|=1;for($t=0;1;$t++){printf("%c",($t%0x100));}'|debug -m

    AUTHOR
	erco@3dsite.com 09/27/02
































































nuthin down here to see.