Added the LineInfo count to the info line of the debug info file. This allows
the debug info module to reduce memory usage. git-svn-id: svn://svn.cc65.org/cc65/trunk@5265 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -115,9 +115,10 @@ void CreateDbgFile (void)
|
|||||||
*/
|
*/
|
||||||
fprintf (
|
fprintf (
|
||||||
F,
|
F,
|
||||||
"info\tfile=%u,lib=%u,mod=%u,scope=%u,seg=%u,span=%u,type=%u\n",
|
"info\tfile=%u,lib=%u,line=%u,mod=%u,scope=%u,seg=%u,span=%u,type=%u\n",
|
||||||
FileInfoCount (),
|
FileInfoCount (),
|
||||||
LibraryCount (),
|
LibraryCount (),
|
||||||
|
LineInfoCount (),
|
||||||
ObjDataCount (),
|
ObjDataCount (),
|
||||||
ScopeCount (),
|
ScopeCount (),
|
||||||
SegmentCount (),
|
SegmentCount (),
|
||||||
@@ -128,32 +129,32 @@ void CreateDbgFile (void)
|
|||||||
/* Assign the ids to the items */
|
/* Assign the ids to the items */
|
||||||
AssignIds ();
|
AssignIds ();
|
||||||
|
|
||||||
|
/* Output files */
|
||||||
|
PrintDbgFileInfo (F);
|
||||||
|
|
||||||
/* Output libraries */
|
/* Output libraries */
|
||||||
PrintDbgLibraries (F);
|
PrintDbgLibraries (F);
|
||||||
|
|
||||||
|
/* Output line info */
|
||||||
|
PrintDbgLineInfo (F);
|
||||||
|
|
||||||
/* Output modules */
|
/* Output modules */
|
||||||
PrintDbgModules (F);
|
PrintDbgModules (F);
|
||||||
|
|
||||||
/* Output the segment info */
|
/* Output the segment info */
|
||||||
PrintDbgSegments (F);
|
PrintDbgSegments (F);
|
||||||
|
|
||||||
/* Output files */
|
|
||||||
PrintDbgFileInfo (F);
|
|
||||||
|
|
||||||
/* Output line info */
|
|
||||||
PrintDbgLineInfo (F);
|
|
||||||
|
|
||||||
/* Output spans */
|
/* Output spans */
|
||||||
PrintDbgSpans (F);
|
PrintDbgSpans (F);
|
||||||
|
|
||||||
/* Output types */
|
/* Output scopes */
|
||||||
PrintDbgTypes (F);
|
PrintDbgScopes (F);
|
||||||
|
|
||||||
/* Output symbols */
|
/* Output symbols */
|
||||||
PrintDbgSyms (F);
|
PrintDbgSyms (F);
|
||||||
|
|
||||||
/* Output scopes */
|
/* Output types */
|
||||||
PrintDbgScopes (F);
|
PrintDbgTypes (F);
|
||||||
|
|
||||||
/* Close the file */
|
/* Close the file */
|
||||||
if (fclose (F) != 0) {
|
if (fclose (F) != 0) {
|
||||||
|
|||||||
@@ -177,6 +177,26 @@ const LineInfo* GetAsmLineInfo (const Collection* LineInfos)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
unsigned LineInfoCount (void)
|
||||||
|
/* Return the total number of line infos */
|
||||||
|
{
|
||||||
|
/* Walk over all object files */
|
||||||
|
unsigned I;
|
||||||
|
unsigned Count = 0;
|
||||||
|
for (I = 0; I < CollCount (&ObjDataList); ++I) {
|
||||||
|
|
||||||
|
/* Get this object file */
|
||||||
|
const ObjData* O = CollAtUnchecked (&ObjDataList, I);
|
||||||
|
|
||||||
|
/* Count spans */
|
||||||
|
Count += CollCount (&O->LineInfos);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Count;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void AssignLineInfoIds (void)
|
void AssignLineInfoIds (void)
|
||||||
/* Assign the ids to the line infos */
|
/* Assign the ids to the line infos */
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -171,6 +171,9 @@ INLINE unsigned GetSourceLineFromList (const Collection* LineInfos)
|
|||||||
GetSourceLine ((const LineInfo*) CollConstAt ((LineInfos), 0))
|
GetSourceLine ((const LineInfo*) CollConstAt ((LineInfos), 0))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
unsigned LineInfoCount (void);
|
||||||
|
/* Return the total number of line infos */
|
||||||
|
|
||||||
void AssignLineInfoIds (void);
|
void AssignLineInfoIds (void);
|
||||||
/* Assign the ids to the line infos */
|
/* Assign the ids to the line infos */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user