[LLVMbugs] [Bug 21881] New: Location list is not being generated

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 11 12:28:50 PST 2014


            Bug ID: 21881
           Summary: Location list is not being generated
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: katya_romanova at playstation.sony.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I fixed PR21176 and submitted a fix for it in r223981. However, buildbot's
testing failed for ppc64 platform on the new test that I added. 

I reverted my fix completely in r224000, but I'm planning to put the fix back
shortly with XFAIL condition for ppc64.

My test failed for PowerPC because a location list for a variable is not being
generated, where expected.

Consider the following testcase:

extern int func();

int main()
   volatile int c = 13;
   c = func();
   return c;


 llc -mtriple=powerpc64-unknown-linux test.ll  -O2  -dwarf-version 2

For PPC DWARF Location lists are not generated and variable 'c' has to
DW_AT_const_value (13).  

0x0000004f:     DW_TAG_variable [3]
                  DW_AT_const_value [DW_FORM_sdata]     (13)
                  DW_AT_name [DW_FORM_strp]     ( .debug_str[0x00000068] = "c")
                  DW_AT_decl_file [DW_FORM_data1]       ("test.cpp")
                  DW_AT_decl_line [DW_FORM_data1]       (4)
                  DW_AT_type [DW_FORM_ref4]     (cu + 0x0063 => {0x00000063})


All other LLVM supported targets generate a location list; 
Die for variable 'c' contains DW_AT_location attribute.

llc -mtriple=x86_64-unknown-linux test.ll  -O2  -dwarf-version 2 -filetype=obj

0x0000004f:     DW_TAG_variable [3]
                  DW_AT_location [DW_FORM_data4]        (0x00000000)
                  DW_AT_name [DW_FORM_strp]     ( .debug_str[0x00000068] = "c")
                  DW_AT_decl_file [DW_FORM_data1]       ("test.cpp")
                  DW_AT_decl_line [DW_FORM_data1]       (4)
                  DW_AT_type [DW_FORM_ref4]     (cu + 0x0066 => {0x00000066})

.debug_loc contents:
0x00000000: Beginning address offset: 0x0000000000000001
               Ending address offset: 0x000000000000000e
                Location description: 10 0d

            Beginning address offset: 0x000000000000000e
               Ending address offset: 0x0000000000000016
                Location description: 50 93 04

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/20141211/c7cd69c7/attachment.html>

More information about the llvm-bugs mailing list