Skip to content

Commit 3c2815d

Browse files
committed
fbc-debug: add note about removal of BINCL/EINCL STAB tags
1 parent 654c870 commit 3c2815d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/compiler/edbg_stab.bas

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ sub edbgEmitHeader( byval filename as zstring ptr )
213213

214214
ctx.typecnt = 1
215215
ctx.label = NULL
216-
ctx.incfile = NULL
216+
ctx.incfile = NULL
217+
218+
'' ctx.filename is never used
217219
ctx.filename = *filename
218220

219221
'' emit source file name
@@ -1016,6 +1018,15 @@ end sub
10161018

10171019
sub edbgInclude( byval incfile as zstring ptr )
10181020
dim as string lname
1021+
1022+
'' NOTE: originally, fbc used STAB_TYPE_BINCL and STAB_TYPE_EINCL
1023+
'' to mark the beginning and end of an include file. The purpose
1024+
'' for these markers is so the linker (LD) can remove duplicate
1025+
'' debug type information from the final EXE. However, because
1026+
'' fbc only emits types actually used, the end result is that
1027+
'' type information from a header (.BI) is often different from
1028+
'' one object module to another is generally not used in the
1029+
'' way that BINCL/EINCL/EXCL was intented.
10191030

10201031
'' incfile is the new include file or main file name
10211032

0 commit comments

Comments
 (0)