https://bugs.llvm.org/show_bug.cgi?id=33044

            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: unassignedb...@nondot.org
          Reporter: francisjri...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to