diff options
| author | Reid Kleckner <rnk@google.com> | 2016-02-02 17:41:18 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2016-02-02 17:41:18 +0000 |
| commit | 1fcd610c9499d8f1eb42f339926ed17ec6d98ddd (patch) | |
| tree | b80a02a7939d74d6657ce1523b272f81ea84b403 /llvm/test | |
| parent | 7d6b924df841faff6893207044cc57b02464b255 (diff) | |
| download | bcm5719-llvm-1fcd610c9499d8f1eb42f339926ed17ec6d98ddd.tar.gz bcm5719-llvm-1fcd610c9499d8f1eb42f339926ed17ec6d98ddd.zip | |
[codeview] Wire up the .cv_inline_linetable directive
This directive emits the binary annotations that describe line and code
deltas in inlined call sites. Single-stepping through inlined frames in
windbg now works.
llvm-svn: 259535
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/DebugInfo/COFF/asm.ll | 6 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/inlining.ll | 123 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/multifile.ll | 6 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/multifunction.ll | 18 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/simple.ll | 6 | ||||
| -rw-r--r-- | llvm/test/MC/COFF/cv-inline-linetable.s | 25 |
6 files changed, 120 insertions, 64 deletions
diff --git a/llvm/test/DebugInfo/COFF/asm.ll b/llvm/test/DebugInfo/COFF/asm.ll index 33d80a72450..ef0737a80a0 100644 --- a/llvm/test/DebugInfo/COFF/asm.ll +++ b/llvm/test/DebugInfo/COFF/asm.ll @@ -42,8 +42,7 @@ ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 ; X86-NEXT: [[F1_END]]: -; Padding -; X86-NEXT: .zero 3 +; X86-NEXT: .p2align 2 ; Line table ; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]] ; File index to string table offset subsection @@ -131,8 +130,7 @@ ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 ; X64-NEXT: [[F1_END]]: -; Padding -; X64-NEXT: .zero 3 +; X64-NEXT: .p2align 2 ; Line table ; X64-NEXT: .cv_linetable 0, f, [[END_OF_F]] ; File index to string table offset subsection diff --git a/llvm/test/DebugInfo/COFF/inlining.ll b/llvm/test/DebugInfo/COFF/inlining.ll index 08e26c789a2..fafc224022e 100644 --- a/llvm/test/DebugInfo/COFF/inlining.ll +++ b/llvm/test/DebugInfo/COFF/inlining.ll @@ -39,40 +39,95 @@ ; ASM: addl $7, "?x@@3HC" ; ASM: .cv_loc 0 1 17 1 # t.cpp:17:1 -; OBJ: ProcStart { -; OBJ: PtrParent: 0x0 -; OBJ: PtrEnd: 0x0 -; OBJ: PtrNext: 0x0 -; OBJ: CodeSize: 0x3D -; OBJ: DbgStart: 0x0 -; OBJ: DbgEnd: 0x0 -; OBJ: FunctionType: 0x0 -; OBJ: CodeOffset: ?baz@@YAXXZ+0x0 -; OBJ: Segment: 0x0 -; OBJ: Flags [ (0x0) -; OBJ: ] -; OBJ: DisplayName: baz -; OBJ: LinkageName: ?baz@@YAXXZ -; OBJ: } -; OBJ: InlineSite { -; OBJ: PtrParent: 0x0 -; OBJ: PtrEnd: 0x0 -; OBJ: Inlinee: bar (0x1003) -; OBJ: BinaryAnnotations [ -; OBJ: ] -; OBJ: } -; OBJ: InlineSite { -; OBJ: PtrParent: 0x0 -; OBJ: PtrEnd: 0x0 -; OBJ: Inlinee: foo (0x1004) -; OBJ: BinaryAnnotations [ -; OBJ: ] -; OBJ: } -; OBJ: InlineSiteEnd { -; OBJ: } -; OBJ: InlineSiteEnd { -; OBJ: } -; OBJ: ProcEnd +; ASM: .section .debug$S,"dr" +; ASM: .long 246 # Inlinee lines subsection +; ASM: .long [[inline_end:.*]]-[[inline_beg:.*]] +; ASM: [[inline_beg]]: +; ASM: .long 0 +; ASM: .long 4099 # Inlined function bar starts at t.cpp:8 +; ASM: .long 0 +; ASM: .long 8 +; ASM: .long 4100 # Inlined function foo starts at t.cpp:2 +; ASM: .long 0 +; ASM: .long 2 +; ASM: [[inline_end]]: + +; ASM: .long 241 # Symbol subsection for baz +; ASM: .long Ltmp3-Ltmp2 +; ASM: .short 4429 +; ASM: .asciz +; ASM: .cv_inline_linetable 1 1 8 Lfunc_begin0 contains 2 +; ASM: .short 4429 +; ASM: .asciz +; ASM: .cv_inline_linetable 2 1 2 Lfunc_begin0 +; ASM: .short 4430 +; ASM: .short 4430 + +; OBJ: Subsection [ +; OBJ: SubSectionType: InlineeLines (0xF6) +; OBJ: SubSectionSize: 0x1C +; OBJ: InlineeSourceLine { +; OBJ: Inlinee: bar (0x1003) +; OBJ: FileID: D:\src\llvm\build\t.cpp (0x0) +; OBJ: SourceLineNum: 8 +; OBJ: } +; OBJ: InlineeSourceLine { +; OBJ: Inlinee: foo (0x1004) +; OBJ: FileID: D:\src\llvm\build\t.cpp (0x0) +; OBJ: SourceLineNum: 2 +; OBJ: } +; OBJ: ] +; OBJ: Subsection [ +; OBJ: SubSectionType: Symbols (0xF1) +; OBJ: ProcStart { +; OBJ: PtrParent: 0x0 +; OBJ: PtrEnd: 0x0 +; OBJ: PtrNext: 0x0 +; OBJ: CodeSize: 0x3D +; OBJ: DbgStart: 0x0 +; OBJ: DbgEnd: 0x0 +; OBJ: FunctionType: 0x0 +; OBJ: CodeOffset: ?baz@@YAXXZ+0x0 +; OBJ: Segment: 0x0 +; OBJ: Flags [ (0x0) +; OBJ: ] +; OBJ: DisplayName: baz +; OBJ: LinkageName: ?baz@@YAXXZ +; OBJ: } +; OBJ: InlineSite { +; OBJ: PtrParent: 0x0 +; OBJ: PtrEnd: 0x0 +; OBJ: Inlinee: bar (0x1003) +; OBJ: BinaryAnnotations [ +; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x8, LineOffset: 1} +; OBJ-NEXT: ChangeLineOffset: -6 +; OBJ-NEXT: ChangeCodeOffset: 0x7 +; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0xA, LineOffset: 1} +; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x6, LineOffset: 1} +; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x7, LineOffset: 1} +; OBJ-NEXT: ChangeLineOffset: 5 +; OBJ-NEXT: ChangeCodeOffset: 0x7 +; OBJ-NEXT: ChangeCodeLength: 0x7 +; OBJ: ] +; OBJ: } +; OBJ: InlineSite { +; OBJ: PtrParent: 0x0 +; OBJ: PtrEnd: 0x0 +; OBJ: Inlinee: foo (0x1004) +; OBJ: BinaryAnnotations [ +; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0xF, LineOffset: 1} +; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0xA, LineOffset: 1} +; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x6, LineOffset: 1} +; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x7, LineOffset: 1} +; OBJ-NEXT: ChangeCodeLength: 0x7 +; OBJ: ] +; OBJ: } +; OBJ: InlineSiteEnd { +; OBJ: } +; OBJ: InlineSiteEnd { +; OBJ: } +; OBJ: ProcEnd +; OBJ: ] ; ModuleID = 't.cpp' target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/DebugInfo/COFF/multifile.ll b/llvm/test/DebugInfo/COFF/multifile.ll index f1b68b654ba..b8055f1d310 100644 --- a/llvm/test/DebugInfo/COFF/multifile.ll +++ b/llvm/test/DebugInfo/COFF/multifile.ll @@ -51,8 +51,7 @@ ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 ; X86-NEXT: [[F1_END]]: -; Padding -; X86-NEXT: .zero 3 +; X86-NEXT: .p2align 2 ; Line table ; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]] ; File index to string table offset subsection @@ -155,8 +154,7 @@ ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 ; X64-NEXT: [[F1_END]]: -; Padding -; X64-NEXT: .zero 3 +; X64-NEXT: .p2align 2 ; X64: .cv_linetable 0, f, [[END_OF_F]] ; X64: .cv_filechecksums ; X64: .cv_stringtable diff --git a/llvm/test/DebugInfo/COFF/multifunction.ll b/llvm/test/DebugInfo/COFF/multifunction.ll index 2e6b3b7a5cb..152e4acc61a 100644 --- a/llvm/test/DebugInfo/COFF/multifunction.ll +++ b/llvm/test/DebugInfo/COFF/multifunction.ll @@ -72,8 +72,7 @@ ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 ; X86-NEXT: [[F1_END]]: -; Padding -; X86-NEXT: .zero 3 +; X86-NEXT: .p2align 2 ; Line table subsection for x ; X86: .cv_linetable 0, _x, [[END_OF_X]] ; Symbol subsection for y @@ -95,8 +94,7 @@ ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 ; X86-NEXT: [[F1_END]]: -; Padding -; X86-NEXT: .zero 3 +; X86-NEXT: .p2align 2 ; Line table subsection for y ; X86: .cv_linetable 1, _y, [[END_OF_Y]] ; Symbol subsection for f @@ -118,8 +116,7 @@ ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 ; X86-NEXT: [[F1_END]]: -; Padding -; X86-NEXT: .zero 3 +; X86-NEXT: .p2align 2 ; Line table subsection for f ; X86: .cv_linetable 2, _f, [[END_OF_F]] ; X86: .cv_filechecksums @@ -326,8 +323,7 @@ ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 ; X64-NEXT: [[F1_END]]: -; Padding -; X64-NEXT: .zero 3 +; X64-NEXT: .p2align 2 ; Line table subsection for x ; X64: .cv_linetable 0, x, [[END_OF_X]] ; Symbol subsection for y @@ -349,8 +345,7 @@ ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 ; X64-NEXT: [[F1_END]]: -; Padding -; X64-NEXT: .zero 3 +; X64-NEXT: .p2align 2 ; Line table subsection for y ; X64: .cv_linetable 1, y, [[END_OF_Y]] ; Symbol subsection for f @@ -372,8 +367,7 @@ ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 ; X64-NEXT: [[F1_END]]: -; Padding -; X64-NEXT: .zero 3 +; X64-NEXT: .p2align 2 ; Line table subsection for f ; X64: .cv_linetable 2, f, [[END_OF_F]] ; File index to string table offset subsection diff --git a/llvm/test/DebugInfo/COFF/simple.ll b/llvm/test/DebugInfo/COFF/simple.ll index 6612a3393e4..3438c775cbf 100644 --- a/llvm/test/DebugInfo/COFF/simple.ll +++ b/llvm/test/DebugInfo/COFF/simple.ll @@ -41,8 +41,7 @@ ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 ; X86-NEXT: [[F1_END]]: -; Padding -; X86-NEXT: .zero 3 +; X86-NEXT: .p2align 2 ; Line table ; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]] ; File index to string table offset subsection @@ -127,8 +126,7 @@ ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 ; X64-NEXT: [[F1_END]]: -; Padding -; X64-NEXT: .zero 3 +; X64-NEXT: .p2align 2 ; Line table ; X64-NEXT: .cv_linetable 0, f, [[END_OF_F]] ; File index to string table offset subsection diff --git a/llvm/test/MC/COFF/cv-inline-linetable.s b/llvm/test/MC/COFF/cv-inline-linetable.s index db83de97ac8..222a0859db5 100644 --- a/llvm/test/MC/COFF/cv-inline-linetable.s +++ b/llvm/test/MC/COFF/cv-inline-linetable.s @@ -84,13 +84,20 @@ Ltmp3: Ltmp4: .short 4429 .asciz "\000\000\000\000\000\000\000\000\003\020\000" - .cv_inline_linetable 1 1 9 contains 2 + .cv_inline_linetable 1 1 9 Lfunc_begin0 contains 2 # CHECK: InlineSite { # CHECK: PtrParent: 0x0 # CHECK: PtrEnd: 0x0 # CHECK: Inlinee: bar (0x1003) # CHECK: BinaryAnnotations [ -# CHECK: ChangeLineOffset: 2 +# CHECK: ChangeLineOffset: -6 +# CHECK: ChangeCodeOffset: 0xF +# CHECK: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0xA, LineOffset: 1} +# CHECK: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x6, LineOffset: 1} +# CHECK: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x7, LineOffset: 1} +# CHECK: ChangeLineOffset: 5 +# CHECK: ChangeCodeOffset: 0x7 +# CHECK: ChangeCodeLength: 0x7 # CHECK: ] # CHECK: } Ltmp5: @@ -98,26 +105,32 @@ Ltmp5: Ltmp6: .short 4429 .asciz "\000\000\000\000\000\000\000\000\004\020\000" - .cv_inline_linetable 2 1 3 + .cv_inline_linetable 2 1 3 Lfunc_begin0 # CHECK: InlineSite { # CHECK: PtrParent: 0x0 # CHECK: PtrEnd: 0x0 # CHECK: Inlinee: foo (0x1004) # CHECK: BinaryAnnotations [ # CHECK: ChangeLineOffset: 1 -# CHECK: ChangeLineOffset: 1 -# CHECK: ChangeLineOffset: 1 +# CHECK: ChangeCodeOffset: 0x19 +# CHECK: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x6, LineOffset: 1} +# CHECK: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x7, LineOffset: 1} +# CHECK: ChangeCodeLength: 0x7 # CHECK: ] # CHECK: } Ltmp7: .short 2 .short 4430 +# CHECK: InlineSiteEnd { +# CHECK: } .short 2 .short 4430 +# CHECK: InlineSiteEnd { +# CHECK: } .short 2 .short 4431 Ltmp1: - .zero 1 + .p2align 2 .cv_linetable 0, "?baz@@YAXXZ", Lfunc_end0 .cv_filechecksums # File index to string table offset subsection .cv_stringtable # String table |

