Write the high level debug info to the object file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5281 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -45,7 +45,9 @@
|
|||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
#include "filetab.h"
|
#include "filetab.h"
|
||||||
|
#include "global.h"
|
||||||
#include "lineinfo.h"
|
#include "lineinfo.h"
|
||||||
|
#include "objfile.h"
|
||||||
#include "nexttok.h"
|
#include "nexttok.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
|
||||||
@@ -351,3 +353,39 @@ void DbgInfoSym (void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void WriteHLDbgSyms (void)
|
||||||
|
/* Write a list of all high level language symbols to the object file. */
|
||||||
|
{
|
||||||
|
unsigned I;
|
||||||
|
|
||||||
|
/* Only if debug info is enabled */
|
||||||
|
if (DbgSyms) {
|
||||||
|
|
||||||
|
/* Write the symbol count to the list */
|
||||||
|
ObjWriteVar (CollCount (&HLDbgSyms));
|
||||||
|
|
||||||
|
/* Walk through list and write all symbols to the file. */
|
||||||
|
for (I = 0; I < CollCount (&HLDbgSyms); ++I) {
|
||||||
|
|
||||||
|
/* Get the next symbol */
|
||||||
|
const HLDbgSym* S = CollAtUnchecked (&HLDbgSyms, I);
|
||||||
|
|
||||||
|
/* Write the symbol data */
|
||||||
|
ObjWriteVar (S->Flags);
|
||||||
|
ObjWriteVar (S->Name);
|
||||||
|
ObjWriteVar (S->AsmName);
|
||||||
|
ObjWriteVar (S->Offs);
|
||||||
|
ObjWriteVar (S->Type);
|
||||||
|
ObjWriteVar (S->ScopeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
/* Write a count of zero */
|
||||||
|
ObjWriteVar (0);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ void DbgInfoLine (void);
|
|||||||
void DbgInfoSym (void);
|
void DbgInfoSym (void);
|
||||||
/* Parse and handle SYM subcommand of the .dbg pseudo instruction */
|
/* Parse and handle SYM subcommand of the .dbg pseudo instruction */
|
||||||
|
|
||||||
|
void WriteHLDbgSyms (void);
|
||||||
|
/* Write a list of all high level language symbols to the object file. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of dbginfo.h */
|
/* End of dbginfo.h */
|
||||||
|
|||||||
@@ -45,9 +45,10 @@
|
|||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
/* ca65 */
|
/* ca65 */
|
||||||
#include "global.h"
|
#include "dbginfo.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
|
#include "global.h"
|
||||||
#include "objfile.h"
|
#include "objfile.h"
|
||||||
#include "scanner.h"
|
#include "scanner.h"
|
||||||
#include "segment.h"
|
#include "segment.h"
|
||||||
@@ -909,6 +910,9 @@ void WriteDbgSyms (void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Write the high level symbols */
|
||||||
|
WriteHLDbgSyms ();
|
||||||
|
|
||||||
/* Done writing debug symbols */
|
/* Done writing debug symbols */
|
||||||
ObjEndDbgSyms ();
|
ObjEndDbgSyms ();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user