Made debugging optional.
authormichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 27 Mar 2000 02:06:59 +0000 (02:06 +0000)
committermichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 27 Mar 2000 02:06:59 +0000 (02:06 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@211 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCglobl.h
src/SDCCglue.c
src/z80/main.c

index c054ff9528ed2a4d1cd0bfb67a263ed025e1c441..a0b75c2a62d54708254ab5b762bad95f3d99c364 100644 (file)
@@ -200,6 +200,7 @@ struct options {
     int nopeep    : 1  ; /* no peep hole optimization */
     int asmpeep   : 1  ; /* pass inline assembler thru peep hole */
     int debug     : 1  ; /* generate extra debug info */
+    int nodebug          : 1  ; /* Generate no debug info. */
     int stackOnData:1  ; /* stack after data segment  */
     int noregparms: 1  ; /* do not pass parameters in registers */
     int c1mode   : 1  ; /* Act like c1 - no pre-proc, asm or link */
index 8b4629595e1f10acff04feda0076f854c1c3eded..9412e4ae700713846b98aa6f52867d2a4575330c 100644 (file)
@@ -154,7 +154,7 @@ static void emitRegularMap (memmap * map, bool addPublics, bool arFlag)
            continue;
        
        /* print extra debug info if required */
-       if (options.debug || sym->level == 0) {
+       if ((options.debug || sym->level == 0) && !options.nodebug) {
 
            cdbSymbol(sym,cdbFile,FALSE,FALSE);
 
@@ -172,7 +172,7 @@ static void emitRegularMap (memmap * map, bool addPublics, bool arFlag)
        /* if is has an absolute address then generate
           an equate for this no need to allocate space */
        if (SPEC_ABSA (sym->etype)) {
-           if (options.debug || sym->level == 0)
+           if ((options.debug || sym->level == 0) && !options.nodebug)
                fprintf (map->oFile," == 0x%04x\n",SPEC_ADDR (sym->etype));         
 
            fprintf (map->oFile, "%s\t=\t0x%04x\n",
@@ -181,7 +181,7 @@ static void emitRegularMap (memmap * map, bool addPublics, bool arFlag)
        }
        else {
            /* allocate space */
-           if (options.debug || sym->level == 0)
+           if ((options.debug || sym->level == 0) && !options.nodebug)
                fprintf(map->oFile,"==.\n");
            fprintf (map->oFile, "%s:\n", sym->rname);
            fprintf (map->oFile, "\t.ds\t0x%04x\n", (unsigned int)getSize (sym->type) & 0xffff);
@@ -643,7 +643,7 @@ void emitStaticSeg (memmap * map)
            addSetHead (&publics, sym);
 
        /* print extra debug info if required */
-       if (options.debug || sym->level == 0) {
+       if ((options.debug || sym->level == 0) && !options.nodebug) {
 
            cdbSymbol(sym,cdbFile,FALSE,FALSE);
 
@@ -662,7 +662,7 @@ void emitStaticSeg (memmap * map)
        
        /* if it has an absolute address */
        if (SPEC_ABSA (sym->etype)) {
-           if (options.debug || sym->level == 0)
+           if ((options.debug || sym->level == 0) && !options.nodebug)
                fprintf(code->oFile," == 0x%04x\n", SPEC_ADDR (sym->etype));
 
            fprintf (code->oFile, "%s\t=\t0x%04x\n",
@@ -670,7 +670,7 @@ void emitStaticSeg (memmap * map)
                     SPEC_ADDR (sym->etype));
        }
        else {
-           if (options.debug || sym->level == 0)
+           if ((options.debug || sym->level == 0) && !options.nodebug)
                fprintf(code->oFile," == .\n"); 
 
            /* if it has an initial value */
@@ -853,7 +853,7 @@ static void emitOverlay(FILE *afile)
                continue;
 
            /* print extra debug info if required */
-           if (options.debug || sym->level == 0) {
+           if ((options.debug || sym->level == 0) && !options.nodebug) {
                
                cdbSymbol(sym,cdbFile,FALSE,FALSE);
                
@@ -874,7 +874,7 @@ static void emitOverlay(FILE *afile)
               an equate for this no need to allocate space */
            if (SPEC_ABSA (sym->etype)) {
                
-               if (options.debug || sym->level == 0)
+               if ((options.debug || sym->level == 0) && !options.nodebug)
                    fprintf (afile," == 0x%04x\n",SPEC_ADDR (sym->etype));          
 
                fprintf (afile, "%s\t=\t0x%04x\n",
@@ -882,7 +882,7 @@ static void emitOverlay(FILE *afile)
                         SPEC_ADDR (sym->etype));
            }
            else {
-               if (options.debug || sym->level == 0)
+               if ((options.debug || sym->level == 0) && !options.nodebug)
                    fprintf(afile,"==.\n");
        
                /* allocate space */
index 0e0e932d0bae8c8a80121b1e794649b69f11d16c..f99766f450ec416b2d35e58f41ea7eee9c95b1a1 100644 (file)
@@ -69,6 +69,7 @@ static void _setDefaultOptions(void)
     options.stackAuto = 1;
     options.mainreturn = 1;
     options.noregparms = 1;
+    options.nodebug = 1;
     /* first the options part */
     options.intlong_rent = 1;