Write out global symbols to the debug file. Added some fixes for unusual

situations (extern symbols without attached import, because the import wasn't
referenced and therefore removed by the assembler).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5290 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-08-31 20:48:40 +00:00
parent f204ec956a
commit 8fc851b338
6 changed files with 69 additions and 37 deletions

View File

@@ -495,16 +495,22 @@ void WriteHLLDbgSyms (void)
for (I = 0; I < CollCount (&HLLDbgSyms); ++I) {
/* Get the next symbol */
const HLLDbgSym* S = CollAtUnchecked (&HLLDbgSyms, I);
HLLDbgSym* S = CollAtUnchecked (&HLLDbgSyms, I);
/* Get the type of the symbol */
unsigned SC = HLL_GET_SC (S->Flags);
/* Remember if the symbol has debug info attached
* ### This should go into DbgInfoCheck
*/
if (S->Sym && S->Sym->DebugSymId) {
S->Flags |= HLL_DATA_SYM;
}
/* Write the symbol data */
ObjWriteVar (S->Flags);
ObjWriteVar (S->Name);
if (SC != HLL_SC_AUTO) {
CHECK (S->Sym->DebugSymId != ~0U);
if (HLL_HAS_SYM (S->Flags)) {
ObjWriteVar (S->Sym->DebugSymId);
}
if (SC == HLL_SC_AUTO || SC == HLL_SC_REG) {