#include "lineinfo.h"
#include "scopes.h"
#include "segments.h"
-#include "span.h"
+#include "span.h"
#include "tpool.h"
*/
fprintf (
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 (),
LibraryCount (),
+ LineInfoCount (),
ObjDataCount (),
ScopeCount (),
SegmentCount (),
/* Assign the ids to the items */
AssignIds ();
+ /* Output files */
+ PrintDbgFileInfo (F);
+
/* Output libraries */
PrintDbgLibraries (F);
+ /* Output line info */
+ PrintDbgLineInfo (F);
+
/* Output modules */
PrintDbgModules (F);
/* Output the segment info */
PrintDbgSegments (F);
- /* Output files */
- PrintDbgFileInfo (F);
-
- /* Output line info */
- PrintDbgLineInfo (F);
-
/* Output spans */
PrintDbgSpans (F);
-
- /* Output types */
- PrintDbgTypes (F);
+
+ /* Output scopes */
+ PrintDbgScopes (F);
/* Output symbols */
PrintDbgSyms (F);
- /* Output scopes */
- PrintDbgScopes (F);
+ /* Output types */
+ PrintDbgTypes (F);
/* Close the file */
if (fclose (F) != 0) {
+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)
/* Assign the ids to the line infos */
{
GetSourceLine ((const LineInfo*) CollConstAt ((LineInfos), 0))
#endif
+unsigned LineInfoCount (void);
+/* Return the total number of line infos */
+
void AssignLineInfoIds (void);
/* Assign the ids to the line infos */