/* */
/* */
/* */
-/* (C) 1998-2011, Ullrich von Bassewitz */
+/* (C) 1998-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
#include <string.h>
-#include <errno.h>
-#include <time.h>
-#include <sys/types.h> /* EMX needs this */
-#include <sys/stat.h>
/* common */
#include "fname.h"
H->AssertSize = Read32 (Obj);
H->ScopeOffs = Read32 (Obj);
H->ScopeSize = Read32 (Obj);
+ H->SpanOffs = Read32 (Obj);
+ H->SpanSize = Read32 (Obj);
}
/* Seek to the correct position */
FileSetPos (F, Pos);
- /* Read the data */
+ /* Read the asm debug symbols */
DbgSymCount = ReadVar (F);
CollGrow (&O->DbgSyms, DbgSymCount);
for (I = 0; I < DbgSymCount; ++I) {
- CollAppend (&O->DbgSyms, ReadDbgSym (F, O, I));
+ CollAppend (&O->DbgSyms, ReadDbgSym (F, O, I));
+ }
+
+ /* Read the hll debug symbols */
+ DbgSymCount = ReadVar (F);
+ CollGrow (&O->HLLDbgSyms, DbgSymCount);
+ for (I = 0; I < DbgSymCount; ++I) {
+ CollAppend (&O->HLLDbgSyms, ReadHLLDbgSym (F, O, I));
}
}
+void ObjReadSpans (FILE* F, unsigned long Pos, ObjData* O)
+/* Read the span table from a file at the given offset */
+{
+ unsigned I;
+ unsigned SpanCount;
+
+ /* Seek to the correct position */
+ FileSetPos (F, Pos);
+
+ /* Read the data */
+ SpanCount = ReadVar (F);
+ CollGrow (&O->Spans, SpanCount);
+ for (I = 0; I < SpanCount; ++I) {
+ CollAppend (&O->Spans, ReadSpan (F, O, I));
+ }
+}
+
+
+
void ObjAdd (FILE* Obj, const char* Name)
/* Add an object file to the module list */
{
*/
ObjReadScopes (Obj, O->Header.ScopeOffs, O);
+ /* Read the spans from the object file */
+ ObjReadSpans (Obj, O->Header.SpanOffs, O);
+
/* Mark this object file as needed */
O->Flags |= OBJ_REF;