[llvm-bugs] [Bug 38822] New: debug info is missing information about a structure.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 4 06:39:17 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38822

            Bug ID: 38822
           Summary: debug info is missing information about a structure.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at google.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20834
  --> https://bugs.llvm.org/attachment.cgi?id=20834&action=edit
lib.cc

This is a reproducer:

clang++ -fPIC -g -shared -o lib.so lib.cc
readelf -wai lib.so

....

<1><54>: Abbrev Number: 6 (DW_TAG_structure_type)
    <55>   DW_AT_name        : (indirect string, offset: 0x11a): Foo
    <59>   DW_AT_declaration : 1
.... 

Where if the same file compiled using g++ it provides full information about
structure_type:

g++ -fPIC -g -shared -o lib.so lib.cc
readelf -wai lib.so

...
 <1><2d>: Abbrev Number: 2 (DW_TAG_structure_type)
    <2e>   DW_AT_name        : Foo
    <32>   DW_AT_byte_size   : 4
    <33>   DW_AT_decl_file   : 2
    <34>   DW_AT_decl_line   : 1
    <35>   DW_AT_sibling     : <0x46>
 <2><39>: Abbrev Number: 3 (DW_TAG_member)
    <3a>   DW_AT_name        : (indirect string, offset: 0x41): value
    <3e>   DW_AT_decl_file   : 2
    <3f>   DW_AT_decl_line   : 2
    <40>   DW_AT_type        : <0x46>
    <44>   DW_AT_data_member_location: 0
...


It would be nice to have full debug info of a referenced structure even when
some fields of this structure are not used.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180904/964d170a/attachment.html>


More information about the llvm-bugs mailing list