+void PrintDbgSyms (ObjData* O, FILE* F)
+/* Print the debug symbols in a debug file */
+{
+ unsigned I;
+
+ /* Walk through all debug symbols in this module */
+ for (I = 0; I < CollCount (&O->DbgSyms); ++I) {
+
+ long Val;
+
+ /* Get the next debug symbol */
+ DbgSym* D = CollAt (&O->DbgSyms, I);
+
+ /* Get the symbol value */
+ Val = GetDbgSymVal (D);
+
+ /* Lookup this symbol in the table. If it is found in the table, it was
+ * already written to the file, so don't emit it twice. If it is not in
+ * the table, insert and output it.
+ */
+ if (GetDbgSym (D, Val) == 0) {
+
+ /* Emit the debug file line */
+ fprintf (F,
+ "sym\t\"%s\",value=0x%08lX,addrsize=%s,type=%s\n",
+ GetString (D->Name),
+ Val,
+ AddrSizeToStr (D->AddrSize),
+ IS_EXP_LABEL (D->Type)? "label" : "equate");
+
+ /* Insert the symbol into the table */
+ InsertDbgSym (D, Val);
+ }
+ }
+}
+
+
+