Annotation of researchv10no/cmd/lcc/gen2/mips/stab.c, revision 1.1

1.1     ! root        1: /* C compiler: UNIX code generator
        !             2:  *
        !             3:  * Outputs `stab' entries for the UNIX dbx debugger,
        !             4:  * if -g is specified.
        !             5:  */
        !             6: 
        !             7: #include "c.h"
        !             8: 
        !             9: static char *currentfile;
        !            10: 
        !            11: /* stabblock - output a stab entry for '{' or '}' at level lev */
        !            12: void stabblock(brace, lev, p) Symbol *p; { &brace; &lev; &p; }
        !            13: 
        !            14: /* stabend - finalize stab output */
        !            15: void stabend(cp, p, cpp, sp, syms) Coordinate *cp; Symbol p, *sp, *syms; Coordinate **cpp; { &cp; &p; &cpp; &sp; &syms; }
        !            16: 
        !            17: /* stabfend - end of function p */
        !            18: void stabfend(p, line) Symbol p; { &p; &line; }
        !            19: 
        !            20: /* stabinit - initialize stab output */
        !            21: void stabinit(file, argc, argv) char *file, *argv[]; {
        !            22:        if (file) {
        !            23:                print(".file 2,\"%s\"\n", file);
        !            24:                currentfile = file;
        !            25:        }
        !            26: }
        !            27: 
        !            28: /* stabline - emit stab entry for source coordinate *cp */
        !            29: void stabline(cp) Coordinate *cp; {
        !            30:        if (cp->file && cp->file != currentfile) {
        !            31:                print(".file 2,\"%s\"\n", cp->file);
        !            32:                currentfile = cp->file;
        !            33:        }
        !            34:        print(".loc 2,%d\n", cp->y);
        !            35: }
        !            36: 
        !            37: /* stabsym - output a stab entry for symbol p */
        !            38: void stabsym(p) Symbol p; {
        !            39:        if (p == cfunc)
        !            40:                stabline(&p->src);
        !            41: }
        !            42: 
        !            43: /* stabtype - output a stab entry for type *p */
        !            44: void stabtype(p) Symbol p; { &p; }

unix.superglobalmegacorp.com

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