Open x87 opened 1 year ago
Each source file should result in one mapping list (when include directive is used then there is multiple source files).
Currently Sanny source info only includes main source file. Perhaps current source code data structure should be multiplied with extra header field holding source filename (with path relative to main source file).
Currently Include_Once builds unique list of files used to build final code. This list could be saved in footer like:
02 // number of items
"main.txt" 00 // first item
"utils\\vehicle.txt" 00 // second item
Then offset mapping table would look like:
0003 // number of entries (text lines in preprocessor output source file)
0004 00 0000 // binary offset 4 : file index 0, file line 0
0014 00 0007 // binary offset 20 : file index 0, file line 7
0028 01 0005 // binary offset 40 : file index 1, file line 5
Make a simple mapping CODE_OFFSET:LINE_OF_CODE
adds +4 bytes per LoC to the footer size + 4 bytes for line count update Footer documentation