Annotation of hatari/tools/debugger/dsp-lod-symbols-convert.sh, revision 1.1

1.1     ! root        1: #!/bin/sh
        !             2: #
        !             3: # script to convert DSP LOD file table for Hatari debugger.
        !             4: #
        !             5: # 2013 (C) Eero Tamminen, licenced under GPL v2+
        !             6: 
        !             7: usage ()
        !             8: {
        !             9:        name=${0##*/}
        !            10:        echo
        !            11:        echo "Usage: $name <symbol file>"
        !            12:        echo
        !            13:        echo "Convert P-memspace symbols in DSP LOD file"
        !            14:        echo "(output by CLDLOD.TTP) to format understood"
        !            15:        echo "by the Hatari debugger 'dspsymbols' command."
        !            16:        echo
        !            17:        echo "For example:"
        !            18:        echo "  $name FOOBAR.LOD > foobar.sym"
        !            19:        echo
        !            20:        echo "ERROR: $1!"
        !            21:        echo
        !            22:        exit 1
        !            23: }
        !            24: if [ $# -ne 1 ]; then
        !            25:        usage "incorrect number of arguments"
        !            26: fi
        !            27: 
        !            28: if [ \! -f $1 ]; then
        !            29:        usage "given '$1' symbol file not found"
        !            30: fi
        !            31: 
        !            32: # remove CR & parse symbol information at the end of the file
        !            33: tr -d '\r' < $1 | awk '
        !            34: BEGIN { show = 0 }
        !            35: /^_SYMBOL P/ { show = 1; next }
        !            36: /^_SYMBOL / { show = 0; next }
        !            37: /^[_0-9a-zA-Z]+ * I [0-9A-F]+/ {
        !            38:        if (show) {
        !            39:                printf("%s T %s\n", $3, $1);
        !            40:        }
        !            41: }'

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.