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

@@ -76,7 +76,7 @@ struct Library {
static Collection OpenLibs = STATIC_COLLECTION_INITIALIZER;
/* List of used libraries */
static Collection Libraries = STATIC_COLLECTION_INITIALIZER;
static Collection LibraryList = STATIC_COLLECTION_INITIALIZER;
/* Flag for library grouping */
static int Grouping = 0;
@@ -431,8 +431,8 @@ static void LibResolve (void)
*/
if (CollCount (&L->Modules) > 0) {
CloseLibrary (L);
L->Id = CollCount (&Libraries);
CollAppend (&Libraries, L);
L->Id = CollCount (&LibraryList);
CollAppend (&LibraryList, L);
} else {
/* Delete the library */
FreeLibrary (L);
@@ -526,15 +526,23 @@ unsigned GetLibId (const Library* L)
unsigned LibraryCount (void)
/* Return the total number of libraries */
{
return CollCount (&LibraryList);
}
void PrintDbgLibraries (FILE* F)
/* Output the libraries to a debug info file */
{
unsigned I;
/* Output information about all libraries */
for (I = 0; I < CollCount (&Libraries); ++I) {
for (I = 0; I < CollCount (&LibraryList); ++I) {
/* Get the library */
const Library* L = CollAtUnchecked (&Libraries, I);
const Library* L = CollAtUnchecked (&LibraryList, I);
/* Output the info */
fprintf (F, "library\tid=%u,name=\"%s\"\n", L->Id, GetString (L->Name));