llvm-6502/test/DebugInfo/debuglineinfo.test
Keno Fischer b6976af3cd Make it easier to use DwarfContext with MCJIT
Summary:
This supersedes http://reviews.llvm.org/D4010, hopefully properly
dealing with the JIT case and also adds an actual test case.
DwarfContext was basically already usable for the JIT (and back when
we were overwriting ELF files it actually worked out of the box by
accident), but in order to resolve relocations correctly it needs
to know the load address of the section.
Rather than trying to get this out of the ObjectFile or requiring
the user to create a new ObjectFile just to get some debug info,
this adds the capability to pass in that info directly.
As part of this I separated out part of the LoadedObjectInfo struct
from RuntimeDyld, since it is now required at a higher layer.

Reviewers: lhames, echristo

Reviewed By: echristo

Subscribers: vtjnash, friss, rafael, llvm-commits

Differential Revision: http://reviews.llvm.org/D6961

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237961 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-21 21:24:32 +00:00

54 lines
3.0 KiB
Plaintext

RUN: llvm-rtdyld -printline %p/Inputs/test-inline.o \
RUN: | FileCheck %s -check-prefix TEST_INLINE
RUN: llvm-rtdyld -printdebugline %p/Inputs/test-inline.o \
RUN: | FileCheck %s -check-prefix TEST_INLINE
RUN: llvm-rtdyld -printline %p/Inputs/test-parameters.o \
RUN: | FileCheck %s -check-prefix TEST_PARAMETERS
RUN: llvm-rtdyld -printdebugline %p/Inputs/test-parameters.o \
RUN: | FileCheck %s -check-prefix TEST_PARAMETERS
; This test verifies that relocations are correctly applied to the
; .debug_line section and exercises DIContext::getLineInfoForAddressRange().
; If relocations are not applied the first two functions will be reported as
; both starting at address zero in the; line number table.
TEST_INLINE: Function: _Z15test_parametersPfPA2_dR11char_structPPitm, Size = 170
TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:33
TEST_INLINE-NEXT: Line info @ 35: test-inline.cpp, line:34
TEST_INLINE-NEXT: Line info @ 165: test-inline.cpp, line:35
TEST_INLINE-NEXT: Function: _Z3foov, Size = 3
TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:28
TEST_INLINE-NEXT: Line info @ 2: test-inline.cpp, line:29
TEST_INLINE-NEXT: Line info @ 3: test-inline.cpp, line:29
TEST_INLINE-NEXT: Function: main, Size = 146
TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:39
TEST_INLINE-NEXT: Line info @ 21: test-inline.cpp, line:41
TEST_INLINE-NEXT: Line info @ 39: test-inline.cpp, line:42
TEST_INLINE-NEXT: Line info @ 60: test-inline.cpp, line:44
TEST_INLINE-NEXT: Line info @ 80: test-inline.cpp, line:48
TEST_INLINE-NEXT: Line info @ 90: test-inline.cpp, line:45
TEST_INLINE-NEXT: Line info @ 95: test-inline.cpp, line:46
TEST_INLINE-NEXT: Line info @ 114: test-inline.cpp, line:48
TEST_INLINE-NEXT: Line info @ 141: test-inline.cpp, line:49
TEST_INLINE-NEXT: Line info @ 146: test-inline.cpp, line:49
; This test checks the case where all code is in a single section.
TEST_PARAMETERS: Function: _Z15test_parametersPfPA2_dR11char_structPPitm, Size = 170
TEST_PARAMETERS-NEXT: Line info @ 0: test-parameters.cpp, line:33
TEST_PARAMETERS-NEXT: Line info @ 35: test-parameters.cpp, line:34
TEST_PARAMETERS-NEXT: Line info @ 165: test-parameters.cpp, line:35
TEST_PARAMETERS-NEXT: Function: _Z3foov, Size = 3
TEST_PARAMETERS-NEXT: Line info @ 0: test-parameters.cpp, line:28
TEST_PARAMETERS-NEXT: Line info @ 2: test-parameters.cpp, line:29
TEST_PARAMETERS-NEXT: Function: main, Size = 146
TEST_PARAMETERS-NEXT: Line info @ 0: test-parameters.cpp, line:39
TEST_PARAMETERS-NEXT: Line info @ 21: test-parameters.cpp, line:41
TEST_PARAMETERS-NEXT: Line info @ 39: test-parameters.cpp, line:42
TEST_PARAMETERS-NEXT: Line info @ 60: test-parameters.cpp, line:44
TEST_PARAMETERS-NEXT: Line info @ 80: test-parameters.cpp, line:48
TEST_PARAMETERS-NEXT: Line info @ 90: test-parameters.cpp, line:45
TEST_PARAMETERS-NEXT: Line info @ 95: test-parameters.cpp, line:46
TEST_PARAMETERS-NEXT: Line info @ 114: test-parameters.cpp, line:48
TEST_PARAMETERS-NEXT: Line info @ 141: test-parameters.cpp, line:49
TEST_PARAMETERS-NEXT: Line info @ 146: test-parameters.cpp, line:49