| ▲ | Joker_vD 8 hours ago | |||||||
> And finally, source-level debugging is gnarly. You would like to be able to embed DWARF information corresponding to the code you residualize; I don’t know how to do that when generating C. I think emitting something like
for each line of your source before the generated code for that line does something that GDB recognizes well enough. | ||||||||
| ▲ | gopalv 7 hours ago | parent | next [-] | |||||||
If you have ever used something like yacc/bison, debugging it is relatively sane with gdb. You can find all the possible tricks in making it debuggable by reading the y.tab.c Including all the corner cases for odd compilers. Re2c is a bit more modern if you don't need all the history of yacc. | ||||||||
| ||||||||
| ▲ | Silphendio 6 hours ago | parent | prev [-] | |||||||
Nim compiles to C, and it has a compiler iotion that does this. | ||||||||