+void PrintDbgSegments (FILE* F)
+/* Output the segments to the debug file */
+{
+ /* Walk over all segments */
+ unsigned I;
+ for (I = 0; I < CollCount (&SegmentList); ++I) {
+
+ /* Get the next segment */
+ const Segment* S = CollAtUnchecked (&SegmentList, I);
+
+ /* Print the segment data */
+ fprintf (F,
+ "seg\tid=%u,name=\"%s\",start=0x%06lX,size=0x%04lX,addrsize=%s,type=%s",
+ S->Id, GetString (S->Name), S->PC, S->Size,
+ AddrSizeToStr (S->AddrSize),
+ S->ReadOnly? "ro" : "rw");
+ if (S->OutputName) {
+ fprintf (F, ",oname=\"%s\",ooffs=%lu",
+ S->OutputName, S->OutputOffs);
+ }
+ fputc ('\n', F);
+ }
+}
+
+
+