]> git.sur5r.net Git - cc65/blobdiff - src/ca65/main.c
Added line infos
[cc65] / src / ca65 / main.c
index b01b50166b23341fcaafd600910e9974db82e13a..b029e2f0cc64b67255ec5102819d2143cf6c9f64 100644 (file)
@@ -41,6 +41,7 @@
 /* common */
 #include "chartype.h"
 #include "cmdline.h"
+#include "print.h"
 #include "target.h"
 #include "tgttrans.h"
 #include "version.h"
@@ -55,6 +56,7 @@
 #include "incpath.h"
 #include "instr.h"
 #include "istack.h"
+#include "lineinfo.h"
 #include "listing.h"
 #include "macro.h"
 #include "nexttok.h"
@@ -313,7 +315,7 @@ static void OptTarget (const char* Opt, const char* Arg)
 static void OptVerbose (const char* Opt, const char* Arg)
 /* Increase verbosity */
 {
-    ++Verbose;
+    ++Verbosity;
 }
 
 
@@ -479,6 +481,9 @@ static void CreateObjFile (void)
     /* Write debug symbols if requested */
     WriteDbgSyms ();
 
+    /* Write line infos if requested */
+    WriteLineInfo ();
+
     /* Write an updated header and close the file */
     ObjClose ();
 }
@@ -635,8 +640,11 @@ int main (int argc, char* argv [])
         SegCheck ();
     }
 
+    /* If we didn't have an errors, index the line infos */
+    MakeLineInfoIndex ();
+
     /* Dump the data */
-    if (Verbose >= 2) {
+    if (Verbosity >= 2) {
         SymDump (stdout);
         SegDump ();
     }