The following issues are addressed in this patch.
- The operands of DW_LNE_set_discriminator should be an ULEB128 number rather than an address.
- Test the emitted opcodes.
Differential D85717
[DWARFYAML] Teach yaml2obj emit the correct line table program. Higuoxing on Aug 11 2020, 2:53 AM. Authored by
Details The following issues are addressed in this patch.
Diff Detail
Event TimelineComment Actions LGTM, since it's an improvement on the current behaviour, but I think my inline comment should be addressed in a follow-up (assuming you agree, of course).
|
It's good to have a test for this, but I actually think the behaviour is incorrect for yaml2obj. It's possible to have line tables without .debug_info, and there's no reference from a line table to .debug_info anyway. The address should be inferred from the target machine, in my opinion (in this case it would be 8).
From the DWARF v4 spec: