+void CreateDbgFile (void)
+/* Create a debug info file */
+{
+ ObjData* O;
+
+ /* Open the debug info file */
+ FILE* F = fopen (DbgFileName, "w");
+ if (F == 0) {
+ Error ("Cannot create label file `%s': %s", DbgFileName, strerror (errno));
+ }
+
+ /* Print line infos from all modules we have linked into the output file */
+ O = ObjRoot;
+ while (O) {
+ if (O->Flags & OBJ_HAVEDATA) {
+ /* We've linked this module */
+ PrintDbgInfo (O, F);
+
+ }
+ O = O->Next;
+ }
+
+ /* Close the file */
+ if (fclose (F) != 0) {
+ Error ("Error closing map file `%s': %s", DbgFileName, strerror (errno));
+ }
+}
+
+
+