<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Debug info for function argument missing DW_AT_location"
href="https://llvm.org/bugs/show_bug.cgi?id=22892">22892</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Debug info for function argument missing DW_AT_location
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bruce.mitchener@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14038" name="attach_14038" title="Example C code that demonstrates the issue">attachment 14038</a> <a href="attachment.cgi?id=14038&action=edit" title="Example C code that demonstrates the issue">[details]</a></span>
Example C code that demonstrates the issue
When I compile the attached code, the "args_" argument to
"Khandle_missed_dispatchVKgI" is missing a DW_AT_location.
This is a test case isolated from a much larger body of code (where this
happens more often). This code is also generated from our C back-end. It is
interesting (to me at least) that the code generated by our LLVM back-end has
the same problem.
I compile with clang 3.5, 3.6 or the most recent release from Apple:
clang -arch i386 -g -O -c -o bad-debug-info.o bad-debug-info.c
and then I run dwarfdump (or llvm-dwarfdump) and see:
0x000005f4: DW_TAG_subprogram [18] *
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000030)
DW_AT_high_pc [DW_FORM_addr] (0x000000000000028e)
DW_AT_frame_base [DW_FORM_block1] (<0x01> 55 )
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000447] =
"Khandle_missed_dispatchVKgI")
DW_AT_decl_file [DW_FORM_data1]
("/Users/bruce/Development/dylan/missing-debug-location/new-dispatch.c")
DW_AT_decl_line [DW_FORM_data1] (105)
DW_AT_prototyped [DW_FORM_flag] (0x01)
DW_AT_type [DW_FORM_ref4] (cu + 0x0127 => {0x00000127})
DW_AT_external [DW_FORM_flag] (0x01)
DW_AT_APPLE_optimized [DW_FORM_flag] (0x01)
0x0000060c: DW_TAG_formal_parameter [24]
DW_AT_location [DW_FORM_data4] (0x00000000)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000480] = "d_")
DW_AT_decl_file [DW_FORM_data1]
("/Users/bruce/Development/dylan/missing-debug-location/new-dispatch.c")
DW_AT_decl_line [DW_FORM_data1] (105)
DW_AT_type [DW_FORM_ref4] (cu + 0x0127 => {0x00000127})
0x0000061b: DW_TAG_formal_parameter [24]
DW_AT_location [DW_FORM_data4] (0x000000fc)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000046f] =
"parent_")
DW_AT_decl_file [DW_FORM_data1]
("/Users/bruce/Development/dylan/missing-debug-location/new-dispatch.c")
DW_AT_decl_line [DW_FORM_data1] (105)
DW_AT_type [DW_FORM_ref4] (cu + 0x0127 => {0x00000127})
0x0000062a: DW_TAG_formal_parameter [25]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000047a] = "args_")
DW_AT_decl_file [DW_FORM_data1]
("/Users/bruce/Development/dylan/missing-debug-location/new-dispatch.c")
DW_AT_decl_line [DW_FORM_data1] (105)
DW_AT_type [DW_FORM_ref4] (cu + 0x0127 => {0x00000127})
When I use llvm-dwarfdump, I get a bunch of error messages (and more on 3.6
than on 3.5). I don't get any messages when using the system dwarfdump.
I believe that gcc is generating correct debug info for this code.</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>