[DebugInfo] emission of loclists.dwo

Hi Folks,

While working on dwarf5 features in clang, I noticed some subtleties wrt locationlists–

In split-dwarf + dwarf5 mode -
debug_loclists.dwo section is not generated, instead debug_loc.dwo is getting populated in dwo file. + Hexdump shows that pre-standardized encoding used while encoding.

This is causing problems for llvm-dwarfdump in dumping location list.
I’m guessing, llvm-dwarfdump is assuming it should be accessed according to dwarf5, hence failing{not reporting} ???

In, split-mode +dwarf-4{default} mode – everything is fine. section generation and llvm-dwarfdump.

  • While fixing this issue, I’ve been trying to bring this section debug_loclists.dwo from ground up – creating LoclistsDWOSection and so forth.

Can anybody faced with these issues earlier, validate these findings?, work in progress if it’s their any?, approach / solution taken to fix these ???

Thanks !
– Sourabh Singh Tomar

Yep, I’ve been looking at making some improvements to location list emission (using base address specifiers, etc) & came across this hole as well.

Don’t have any immediate fix myself - but I’m pretty sure we don’t ever want to use the direct address forms (LLE_base_address, LLE_start_length, etc) even in non-Split DWARF (sticking to the address pool forms - base_addressx, startx_length, etc) - so it should be fine to use exactly the same code for debug_loclists and debug_loclists.dwo