#include "error.h"
#include "expr.h"
#include "filetab.h"
+#include "global.h"
#include "lineinfo.h"
+#include "objfile.h"
#include "nexttok.h"
#include "symtab.h"
unsigned AsmName = EMPTY_STRING_ID;
unsigned Flags;
int Offs;
- HLDbgSym* S;
+ HLDbgSym* S;
/* Parameters are separated by a comma */
+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);
+
+ }
+}
+
+
+
void DbgInfoSym (void);
/* 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 */