mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 17:29:50 +00:00
Output module info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5120 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
3593eb2869
commit
317676d868
@ -58,6 +58,8 @@
|
||||
void CreateDbgFile (void)
|
||||
/* Create a debug info file */
|
||||
{
|
||||
unsigned I;
|
||||
|
||||
/* Open the debug info file */
|
||||
FILE* F = fopen (DbgFileName, "w");
|
||||
if (F == 0) {
|
||||
@ -67,6 +69,34 @@ void CreateDbgFile (void)
|
||||
/* Output version information */
|
||||
fprintf (F, "version\tmajor=1,minor=2\n");
|
||||
|
||||
/* Output modules */
|
||||
for (I = 0; I < CollCount (&ObjDataList); ++I) {
|
||||
|
||||
/* Get this object file */
|
||||
const ObjData* O = CollConstAt (&ObjDataList, I);
|
||||
|
||||
/* The main source file is the one at index zero */
|
||||
const FileInfo* Source = CollConstAt (&O->Files, 0);
|
||||
|
||||
/* Output the module line */
|
||||
fprintf (F,
|
||||
"module\tid=%u,name=\"%s\",file=%u",
|
||||
I,
|
||||
GetObjFileName (O),
|
||||
Source->Id);
|
||||
|
||||
/* Add library if any */
|
||||
if (O->LibName != INVALID_STRING_ID) {
|
||||
fprintf (F,
|
||||
",lib=\"%s\",mtime=0x%08lX",
|
||||
GetString (O->LibName),
|
||||
O->MTime);
|
||||
}
|
||||
|
||||
/* Terminate the output line */
|
||||
fputc ('\n', F);
|
||||
}
|
||||
|
||||
/* Output the segment info */
|
||||
PrintDbgSegments (F);
|
||||
|
||||
|
@ -111,9 +111,10 @@ void PrintDbgScopes (FILE* F)
|
||||
const Scope* S = CollConstAt (&O->Scopes, J);
|
||||
|
||||
fprintf (F,
|
||||
"scope\tid=%u,name=\"%s\",type=%u",
|
||||
"scope\tid=%u,name=\"%s\",module=%u,type=%u",
|
||||
BaseId + S->Id,
|
||||
GetString (S->Name),
|
||||
I,
|
||||
S->Type);
|
||||
|
||||
/* Print the size if available */
|
||||
|
Loading…
Reference in New Issue
Block a user