mirror of
https://github.com/cc65/cc65.git
synced 2024-12-26 08:32:00 +00:00
Output line info for symbol definition and references.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5216 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
1797235794
commit
2a038ffef9
@ -239,6 +239,22 @@ static long GetDbgSymVal (const DbgSym* D)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void PrintLineInfo (FILE* F, const Collection* LineInfos, const char* Format)
|
||||||
|
/* Output an attribute with line infos */
|
||||||
|
{
|
||||||
|
if (CollCount (LineInfos) > 0) {
|
||||||
|
unsigned I;
|
||||||
|
const LineInfo* LI = CollConstAt (LineInfos, 0);
|
||||||
|
fprintf (F, Format, LI->Id);
|
||||||
|
for (I = 1; I < CollCount (LineInfos); ++I) {
|
||||||
|
LI = CollConstAt (LineInfos, I);
|
||||||
|
fprintf (F, "+%u", LI->Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PrintDbgSyms (FILE* F)
|
void PrintDbgSyms (FILE* F)
|
||||||
/* Print the debug symbols in a debug file */
|
/* Print the debug symbols in a debug file */
|
||||||
{
|
{
|
||||||
@ -277,15 +293,8 @@ void PrintDbgSyms (FILE* F)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Output line infos */
|
/* Output line infos */
|
||||||
if (CollCount (&S->DefLines) > 0) {
|
PrintLineInfo (F, &S->DefLines, ",def=%u");
|
||||||
unsigned K;
|
PrintLineInfo (F, &S->RefLines, ",ref=%u");
|
||||||
const LineInfo* LI = CollConstAt (&S->DefLines, 0);
|
|
||||||
fprintf (F, ",line=%u", LI->Id);
|
|
||||||
for (K = 1; K < CollCount (&S->DefLines); ++K) {
|
|
||||||
LI = CollConstAt (&S->DefLines, K);
|
|
||||||
fprintf (F, "+%u", LI->Id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If this is an import, output the id of the matching export.
|
/* If this is an import, output the id of the matching export.
|
||||||
* If this is not an import, output its value and - if we have
|
* If this is not an import, output its value and - if we have
|
||||||
|
Loading…
Reference in New Issue
Block a user