[PATCH] D68465: [DebugInfo] Trim call-clobbered location list entries when tuning for GDB

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 09:04:20 PDT 2019


probinson added a comment.

In D68465#1698682 <https://reviews.llvm.org/D68465#1698682>, @dblaikie wrote:

> In D68465#1697824 <https://reviews.llvm.org/D68465#1697824>, @probinson wrote:
>
> > @dblaikie I'm also not clear what you're suggestion about .debug_addr entry plus offset.  DW_LLE_offset_pair does this, derived from the base address, which ought to be available for any given function, assuming DWARF v5.  Can you explain more clearly what's missing?
>
>
> Right - for loclists there's no need for new forms, etc. It was specifically related to the other review related to this that modifies the in-memory representation of the debug_addr (llvm::AddressPool) - which I assume meant a difference in output in the address pool, but seems it doesn't add the offset inside the pool (but may end up with redundant entries in the pool which should be fixed in any case).


I agree, address pool management should be able to eliminate redundant entries

> My point was generally that the debug_addr section shouldn't be incnluding addresses with offsets, it should be the places that refer to debug_addr that use the offsets. The specific place I'd like to use offsets would be from FORM_addr in debug_info. But, yes, in this case the support for debug addr references from loclists, the forms are already sufficiently descriptive for this.

Ah, got it.  The problem you're facing is that for a DIE, a FORM describes one value, while you want to describe two--the address (or index into .debug_addr), and a separate offset.  For a DIE attribute, this would normally be done using an expression.  Would it work to have (say) DW_AT_low_pc be allowed to have class exprloc?  (It currently must have class address, either FORM_addr or one of the FORM_addrx's.)  The expression can index into .debug_addr and then add an offset to the result.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68465/new/

https://reviews.llvm.org/D68465





More information about the llvm-commits mailing list