Attempt to recover gdb bot after r174445.

Failure: undefined symbol 'Lline_table_start0'.
Root-cause: we use a symbol subtraction to calculate at_stmt_list, but
the line table entries are not dumped in the assembly.
Fix: use zero instead of a symbol subtraction for Compile Unit 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174479 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren 2013-02-06 00:59:41 +00:00
parent ba42625074
commit 9c5861fdbd
6 changed files with 8 additions and 6 deletions

View File

@ -674,6 +674,8 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
NewCU->addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4,
LineTableStartSym);
else if (NewCU->getUniqueID() == 0)
NewCU->addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);
else
NewCU->addDelta(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4,
LineTableStartSym, Asm->GetTempSymbol("section_line"));

View File

@ -17,7 +17,7 @@ target triple = "thumbv7-apple-darwin10"
; DW_OP_constu
; offset
;CHECK: .long Lset7
;CHECK: .long Lset6
;CHECK-NEXT: @ DW_AT_type
;CHECK-NEXT: @ DW_AT_decl_file
;CHECK-NEXT: @ DW_AT_decl_line

View File

@ -8,7 +8,7 @@
; DW_OP_constu
; offset
;CHECK: .long Lset34
;CHECK: .long Lset33
;CHECK-NEXT: @ DW_AT_type
;CHECK-NEXT: @ DW_AT_decl_file
;CHECK-NEXT: @ DW_AT_decl_line

View File

@ -4,7 +4,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
target triple = "x86_64-apple-darwin10.0.0"
; Check debug info for variable z_s
;CHECK: .long Lset14
;CHECK: .long Lset13
;CHECK-NEXT: ## DW_AT_decl_file
;CHECK-NEXT: ## DW_AT_decl_line
;CHECK-NEXT: ## DW_AT_type

View File

@ -4,7 +4,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
target triple = "x86_64-apple-darwin10.0.0"
;Radar 8950491
;CHECK: .long Lset6
;CHECK: .long Lset5
;CHECK-NEXT: ## DW_AT_decl_file
;CHECK-NEXT: ## DW_AT_decl_line
;CHECK-NEXT: ## DW_AT_type

View File

@ -23,8 +23,8 @@
; LINUX-NEXT: .quad yyyy
; Verify that we refer to 'yyyy' without a relocation.
; DARWIN: Lset6 = Linfo_string3-Linfo_string ## DW_AT_name
; DARWIN-NEXT: .long Lset6
; DARWIN: Lset5 = Linfo_string3-Linfo_string ## DW_AT_name
; DARWIN-NEXT: .long Lset5
; DARWIN-NEXT: .long 39 ## DW_AT_type
; DARWIN-NEXT: .byte 1 ## DW_AT_external
; DARWIN-NEXT: .byte 1 ## DW_AT_decl_file