[llvm-bugs] [Bug 33044] New: Some variables have no dwarf location when -fast-isel is disabled on thumb targets

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 15 11:08:10 PDT 2017


            Bug ID: 33044
           Summary: Some variables have no dwarf location when -fast-isel
                    is disabled on thumb targets
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: francisjricci at gmail.com
                CC: llvm-bugs at lists.llvm.org

To reproduce:

=== Objective-C Testcase ===
@class NSString;

void foo()
  NSString* t = @"foo";
  NSString* s = @"bar";

Compile with:

clang -cc1 -triple thumbv7-apple-ios9.0 -debug-info-kind=limited
-fsanitize=address -fobjc-arc -fobjc-runtime=ios -mllvm -fast-isel=0 test.m
-emit-obj -o test.o

clang -cc1 -triple thumbv7-apple-ios9.0 -debug-info-kind=limited
-fsanitize=address -fobjc-arc -fobjc-runtime=ios -mllvm -fast-isel=1 test.m
-emit-obj -o test.fast-isel.o

Compare dwarf for variable "s":

llvm-dwarfdump test.o:
0x00000048:     DW_TAG_variable [4]
                  DW_AT_name [DW_FORM_strp]     ( .debug_str[0x000000e1] = "s")
                  DW_AT_decl_file [DW_FORM_data1]       ("test.m")
                  DW_AT_decl_line [DW_FORM_data1]       (6)
                  DW_AT_type [DW_FORM_ref4]     (cu + 0x0054 => {0x00000054})

llvm-dwarfdump test.fast-isel.o:
0x00000048:     DW_TAG_variable [3]
                  DW_AT_location [DW_FORM_sec_offset]   (0x00000021)
                  DW_AT_name [DW_FORM_strp]     ( .debug_str[0x000000e1] = "s")
                  DW_AT_decl_file [DW_FORM_data1]       ("test.m")
                  DW_AT_decl_line [DW_FORM_data1]       (6)
                  DW_AT_type [DW_FORM_ref4]     (cu + 0x0058 => {0x00000058})

0x00000021: Beginning address offset: 0x00000000000000b8
               Ending address offset: 0x00000000000000c2
                Location description: 75 00

            Beginning address offset: 0x00000000000000c2
               Ending address offset: 0x00000000000001a6
                Location description: 76 28 06

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/20170515/e8bdb3ec/attachment-0001.html>

More information about the llvm-bugs mailing list