/* */
/* */
/* (C) 2003 Ullrich von Bassewitz */
-/* Römerstrasse 52 */
+/* Römerstraße 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
Error ("Cannot create debug file `%s': %s", DbgFileName, strerror (errno));
}
+ /* Clear the debug sym table (used to detect duplicates) */
+ ClearDbgSymTable ();
+
/* Output the segment info */
PrintDbgSegments (F);
/* */
/* */
/* (C) 2001-2003 Ullrich von Bassewitz */
-/* Römerstrasse 52 */
+/* Römerstraße 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* Output the files section */
for (I = 0; I < O->FileCount; ++I) {
const FileInfo* FI = O->Files[I];
- fprintf (F, "file\t\"%s\", %lu, %lu\n",
+ fprintf (F, "file\t\"%s\",size=%lu,mtime=0x%08lX\n",
GetString (FI->Name), FI->Size, FI->MTime);
}
- /* Output the lines */
+ /* Output the line infos */
for (I = 0; I < O->LineInfoCount; ++I) {
/* Get this line info */
}
/* Name and line number */
- fprintf (F, "line\t\"%s\", %lu", GetString (LI->File->Name), LI->Pos.Line);
+ fprintf (F, "line\t\"%s\",line=%lu", GetString (LI->File->Name),
+ LI->Pos.Line);
/* Code ranges */
for (J = 0; J < CollCount (CodeRanges); ++J) {
const CodeRange* R = CollConstAt (CodeRanges, J);
/* Print it */
- fprintf (F, ", %06lX-%06lX", R->Offs, R->Offs + R->Size - 1);
+ fprintf (F, ",range=0x%06lX-0x%06lX", R->Offs, R->Offs + R->Size - 1);
}
/* Terminate the line */
/* */
/* */
/* (C) 1998-2003 Ullrich von Bassewitz */
-/* Römerstrasse 52 */
+/* Römerstraße 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
#include <string.h>
/* common */
+#include "addrsize.h"
#include "check.h"
#include "symdefs.h"
#include "xmalloc.h"
{
/* Create the hash. We hash over the symbol value */
unsigned Hash = ((Val >> 24) & 0xFF) ^
- ((Val >> 16) & 0xFF) ^
- ((Val >> 8) & 0xFF) ^
- ((Val >> 0) & 0xFF);
+ ((Val >> 16) & 0xFF) ^
+ ((Val >> 8) & 0xFF) ^
+ ((Val >> 0) & 0xFF);
/* Check for this symbol */
DbgSym* Sym = DbgSymPool[Hash];
-static void ClearDbgSymTable (void)
+void ClearDbgSymTable (void)
/* Clear the debug symbol table */
{
unsigned I;
{
unsigned I;
- /* Clear the debug sym table */
- ClearDbgSymTable ();
-
/* Walk through all debug symbols in this module */
for (I = 0; I < O->DbgSymCount; ++I) {
/* Emit the debug file line */
fprintf (F,
- "sym\t\"%s\", %08lX, %s\n",
+ "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 */
{
unsigned I;
- /* Clear the debug sym table */
- ClearDbgSymTable ();
-
/* Walk through all debug symbols in this module */
for (I = 0; I < O->DbgSymCount; ++I) {
-
+
long GetDbgSymVal (DbgSym* D);
/* Get the value of this symbol */
+void ClearDbgSymTable (void);
+/* Clear the debug symbol table. Must be called before outputting debug syms
+ * or debug labels the first time.
+ */
+
void PrintDbgSyms (ObjData* O, FILE* F);
/* Print the debug symbols in a debug file */
/* */
/* */
/* (C) 1998-2003 Ullrich von Bassewitz */
-/* Römerstrasse 52 */
+/* Römerstraße 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
Error ("Cannot create label file `%s': %s", LabelFileName, strerror (errno));
}
+ /* Clear the debug sym table (used to detect duplicates) */
+ ClearDbgSymTable ();
+
/* Print the labels for the export symbols */
PrintExportLabels (F);
if (S->Size > 0) {
/* Print the segment data */
- fprintf (F, "segment\t\"%s\", 0x%06lX, 0x%04lX, %s, %s\n",
+ fprintf (F, "segment\t\"%s\",start=0x%06lX,size=0x%04lX,addrsize=%s,type=%s\n",
GetString (S->Name), S->PC, S->Size,
AddrSizeToStr (S->AddrSize),
S->ReadOnly? "ro" : "rw");