Fixed how ca65 handles some debug info from cc65.
ca65 used to claim that an assembler error/warning was found on a C code line; and, that an Assembly line is only indirectly related to it. Now, ca65 says that the Assembly line has the problem; and, that the Assembly line was produced from the C line.
This commit is contained in:
parent
4014783275
commit
a6eb7d0763
2 changed files with 9 additions and 1 deletions
|
@ -144,7 +144,7 @@ static void AddNotifications (const Collection* LineInfos)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LI_TYPE_EXT:
|
case LI_TYPE_EXT:
|
||||||
Msg = "Assembler code generated from this line";
|
Msg = "Assembly code generated from this line";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LI_TYPE_MACRO:
|
case LI_TYPE_MACRO:
|
||||||
|
|
|
@ -368,6 +368,14 @@ void NewAsmLine (void)
|
||||||
|
|
||||||
/* Start a new line using the current line info */
|
/* Start a new line using the current line info */
|
||||||
AsmLineInfo = StartLine (&CurTok.Pos, LI_TYPE_ASM, 0);
|
AsmLineInfo = StartLine (&CurTok.Pos, LI_TYPE_ASM, 0);
|
||||||
|
|
||||||
|
/* If the first LineInfo in the list came from a .dbg line, then we want
|
||||||
|
** errors and warnings to show it as an additional note, not as the primary
|
||||||
|
** line. Therefore, swap the first two LineInfo items.
|
||||||
|
*/
|
||||||
|
if (GetLineInfoType (CollAtUnchecked (&CurLineInfo, 0)) == LI_TYPE_EXT) {
|
||||||
|
CollMove (&CurLineInfo, 1, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue