]> git.sur5r.net Git - cc65/commitdiff
Don't output multiple code ranges per line, since this is harder to parse.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 3 Aug 2010 19:00:14 +0000 (19:00 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 3 Aug 2010 19:00:14 +0000 (19:00 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4780 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ld65/dbginfo.c

index 8af831ba3e9bc8836ecaa2ef85c71423f81e8b4b..4626a7c538e7f18bb18567d2a98711655471235b 100644 (file)
@@ -68,15 +68,6 @@ void PrintDbgInfo (ObjData* O, FILE* F)
        /* Get a pointer to the code ranges */
        const Collection* CodeRanges = &LI->CodeRanges;
 
-       /* We must have code ranges, otherwise ignore the entry */
-       if (CollCount (CodeRanges) == 0) {
-           continue;
-       }
-
-       /* Name and line number */
-       fprintf (F, "line\t\"%s\",line=%lu", GetString (LI->File->Name),
-                 LI->Pos.Line);
-
        /* Code ranges */
        for (J = 0; J < CollCount (CodeRanges); ++J) {
 
@@ -84,7 +75,11 @@ void PrintDbgInfo (ObjData* O, FILE* F)
            const CodeRange* R = CollConstAt (CodeRanges, J);
 
            /* Print it */
-                   fprintf (F, ",range=0x%06lX-0x%06lX", R->Offs, R->Offs + R->Size - 1);
+           fprintf (F,
+                    "line\t\"%s\",line=%lu,range=0x%06lX-0x%06lX",
+                    GetString (LI->File->Name),
+                    LI->Pos.Line,
+                    R->Offs, R->Offs + R->Size - 1);
        }
 
        /* Terminate the line */