[LLVMbugs] [Bug 22892] New: Debug info for function argument missing DW_AT_location
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 13 03:03:35 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=22892
Bug ID: 22892
Summary: Debug info for function argument missing
DW_AT_location
Product: new-bugs
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: bruce.mitchener at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14038
--> https://llvm.org/bugs/attachment.cgi?id=14038&action=edit
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.
--
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/20150313/d1cb662c/attachment.html>
More information about the llvm-bugs
mailing list