This patch builds on top of D169, establishing DWARF generation for the NCG
This is split into three parts:
- Generation of line information (.debug_line)
We are not directly generating DWARF, but instead instruct the assembler to generate it for us using .loc and .file directives. Getting them to to appear in the correct places means that we need to get into the guts of native code generation a bit - we especially need to keep track of what files we have declared so far.
- Generation of debug records (.debug_line)
This is where we deposit information about the compiler, compilation units as well as source blocks. This is also where we assign Haskell names to things (sadly, most consumers straight-up ignore it right now because they don't recognise our language ID).
- Generation of unwind information (.debug_frame)
This allows debuggers to unwind the Haskell stack. This is a bit more involved than it should be - mostly due to the fact that our stack doesn't really look the way debuggers expect. We especially can't promise that unwinding will work from any place that's not a block entry.