Output information about the item counts in the debug info file.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5136 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-08-08 17:15:18 +00:00
parent 57e39e0e04
commit 07cd427110
11 changed files with 88 additions and 9 deletions

View File

@@ -98,6 +98,25 @@ Scope* ReadScope (FILE* F, ObjData* Obj, unsigned Id)
unsigned ScopeCount (void)
/* Return the total number of scopes */
{
/* Count scopes from all modules we have linked into the output file */
unsigned I;
unsigned Count = 0;
for (I = 0; I < CollCount (&ObjDataList); ++I) {
/* Get the object file */
const ObjData* O = CollAtUnchecked (&ObjDataList, I);
/* Account for the scopes in this file */
Count += CollCount (&O->Scopes);
}
return Count;
}
void PrintDbgScopes (FILE* F)
/* Output the scopes to a debug info file */
{
@@ -132,7 +151,7 @@ void PrintDbgScopes (FILE* F)
if (SCOPE_HAS_LABEL (S->Flags)) {
fprintf (F, ",sym=%u", O->SymBaseId + S->LabelId);
}
/* Terminate the output line */
fputc ('\n', F);
}