ยง Debugging debug info in GHC
I wanted to use debug info to help build a better debugging experience
within tweag/asterius
. So, I was
reading through the sources of cmm/Debug.hs
.
I'd never considered how to debug debug-info, and I found the information
tucked inside a cute note in GHC ( Note [Debugging DWARF unwinding info]
):
This makes GDB produce a trace of its internal workings. Having gone this far, it's just a tiny step to run GDB in GDB. Make sure you install debugging symbols for gdb if you obtain it through a package manager.