<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - llvm-dwarfdump unable to decode some variable location information for code generated by gcc"
href="https://bugs.llvm.org/show_bug.cgi?id=51042">51042</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm-dwarfdump unable to decode some variable location information for code generated by gcc
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>12.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>DebugInfo
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>wcohen@redhat.com
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, keith.walker@arm.com, llvm-bugs@lists.llvm.org, paul_robinson@playstation.sony.com
</td>
</tr></table>
<p>
<div>
<pre>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,</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>