r/Compilers • u/ClassicAdeptness5516 • Aug 01 '26
Any debugging advice / tools for compilers?
Tired of print statements everywhere. It very satisfactory to see one but I would much rather have something like lldb to easily debug the code more intuitively.
Are there any other useful tools?
16
Upvotes
View all comments
Show parent comment
2
u/Satu_Autio Aug 01 '26
To be honest when I was doing debugging my single biggest win was using GDB to trace the generated code instruction by instruction. That's easy to do with a trace file.
Then the
tracerfile looks like this:You can get more advanced, and write to a lotfile, or similar, but this is enough to work - especially combined with
tee.