[llvm] r178722 - Debug Info: according to DWARF 2, FORM_ref_addr the same size as an address on

Manman Ren mren at apple.com
Thu Apr 4 10:21:22 PDT 2013


On Apr 3, 2013, at 6:59 PM, Eric Christopher <echristo at gmail.com> wrote:

>> Debug Info: according to DWARF 2, FORM_ref_addr the same size as an address on
>> the target system.
>> 
>> It was hard-coded to 4 bytes before. I can't get llvm to generate a
>> ref_addr on a reasonably sized testing case.
>> 
>> rdar://problem/13559431
>> 
> 
> Unfortunately our current version really isn't 2, there are many
> dwarf4-isms in our current output. If you'd like to have a dwarf-2
> compatibility mode then you'll need to submit a patch that delineates
> that through all of compilation.

The DWARF_VERSION is set to 2 in llvm/Support/Dwarf.h so the header of our object file will say version 2.
Also our llvm dwarf parser does not check DWARF version and will parse ref_addr according to version 2.
And here it seems that we only support version 2 and 3.
  static bool isSupportedVersion(unsigned version) {
    return version == 2 || version == 3;
  }

I know there are supports of dwarf4 stuff in our current debug info.
Are you okay with me changing the DWARF_VERSION to 4?
It may break a lot of things. 
Another way is to enable this change only for darwin gdb.

Manman

> 
> Please revert this patch for now and we can discuss this in this
> thread if you'd like.
> 
> -eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130404/5b62af49/attachment.html>


More information about the llvm-commits mailing list