[llvm-bugs] [Bug 51042] New: llvm-dwarfdump unable to decode some variable location information for code generated by gcc

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 9 12:02:48 PDT 2021


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

            Bug ID: 51042
           Summary: llvm-dwarfdump unable to decode some variable location
                    information for code generated by gcc
           Product: libraries
           Version: 12.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: wcohen at redhat.com
                CC: jdevlieghere at apple.com, keith.walker at arm.com,
                    llvm-bugs at lists.llvm.org,
                    paul_robinson at playstation.sony.com

When using llvm-dwarfdump to look at the debug information for various Linux
kernel functions it would be unable to decode location information for some of
the function parameters/variables.

For example the following was installed on the machine:

kernel-debuginfo-5.12.7-300.fc34.x86_64
llvm-12.0.0-2.fc34.x86_64

Generate output for the part of the debuginfo associated with uv_program_mmr
function:

llvm-dwarfdump  -c --name=uv_program_mmr 
/usr/lib/debug/lib/modules/5.12.7-300.fc34.x86_64/vmlinux >
uv_program_mmr.dwarf

Looking through he uv_program_mmr.dwarf there are a number of parameters and a
variable that have "<decoding error>" rather than actual location information:



0x00f49757:   DW_TAG_variable
                DW_AT_abstract_origin   (0x00f493f8 "entry")
                DW_AT_location  (0x002ffc4d: 
                   [0xffffffff810d0c4d, 0xffffffff810d0cc7): <decoding error>
f2 4f 97 f4 00 00)
                DW_AT_unknown_2137      (0x002ffc4b)

0x00f49764:   DW_TAG_formal_parameter
                DW_AT_abstract_origin   (0x00f493e0 "info")
                DW_AT_location  (0x002ffc77: 
                   [0xffffffff810d0c45, 0xffffffff810d0cc7): <decoding error>
fa 20 d4 00 00 9f)
                DW_AT_unknown_2137      (0x002ffc75)

0x00f49771:   DW_TAG_formal_parameter
                DW_AT_abstract_origin   (0x00f493d4 "cfg")
                DW_AT_location  (0x002ffca1: 
                   [0xffffffff810d0c45, 0xffffffff810d0cc7): <decoding error>
fa 14 d4 00 00 9f)
                DW_AT_unknown_2137      (0x002ffc9f)


These are GNU extensions described in /usr/include/dwarf.h


    /* GNU extensions.  */
    DW_OP_GNU_push_tls_address = 0xe0,
    DW_OP_GNU_uninit = 0xf0,
    DW_OP_GNU_encoded_addr = 0xf1,
    DW_OP_GNU_implicit_pointer = 0xf2,
    DW_OP_GNU_entry_value = 0xf3,
    DW_OP_GNU_const_type = 0xf4,
    DW_OP_GNU_regval_type = 0xf5,
    DW_OP_GNU_deref_type = 0xf6,
    DW_OP_GNU_convert = 0xf7,
    DW_OP_GNU_reinterpret = 0xf9,
    DW_OP_GNU_parameter_ref = 0xfa,

-- 
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/20210709/4b07a3a6/attachment.html>


More information about the llvm-bugs mailing list