Closed atrosinenko closed 4 years ago
I guess the key point is whether we're ok with DWARF debug info emission for 16-bit target...
Frankly speaking, I'm not significantly familiar with any particular debug info format. So it was the MSP430 EABI document (part 10) I repeated the particular "DWARF version 3" after :) So, it seems to be already used on 16-bit target.
Closing, as the fix was already upstreamed: 1, 2 and follow-up fix.
When debugging MSP430 code, it would be very useful to have at least the line number information. For example, it highly speeds up debugging where UBSan was triggered.
I have patched my working copy like this:
And it seems to basically work. The DWARF3 register numbers are taken from MSP430 EABI document (subregister handling is still to-be-written). On the other hand, other targets such as X86 involve some non-trivial DWARF-related code in the TargetFrameLowering passes, for example.
If there is some well-known simple way to get at least basic debug info support in LLVM (possibly not too comprehensive but non-misleading), I would want to work on it.