summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2013-01-26 00:28:05 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2013-01-26 00:28:05 +0000
commit9a8ff813f34b39438b8042a6d784a4f2305b9fcc (patch)
tree0842a314e5a6ca3e10b8a9f58b464824c8ea18c6 /llvm/test
parent201d7b2545f112cd5774e803011ac9b0edfb40d3 (diff)
downloadbcm5719-llvm-9a8ff813f34b39438b8042a6d784a4f2305b9fcc.tar.gz
bcm5719-llvm-9a8ff813f34b39438b8042a6d784a4f2305b9fcc.zip
Add DIContext::getLineInfoForAddressRange() function and test. This function allows a caller to obtain a table of line information for a function using the function's address and size.
llvm-svn: 173537
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/DebugInfo/Inputs/test-parameters.obin0 -> 5792 bytes
-rw-r--r--llvm/test/DebugInfo/debuglineinfo.test46
2 files changed, 40 insertions, 6 deletions
diff --git a/llvm/test/DebugInfo/Inputs/test-parameters.o b/llvm/test/DebugInfo/Inputs/test-parameters.o
new file mode 100644
index 00000000000..7f4b6702df2
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/test-parameters.o
Binary files differ
diff --git a/llvm/test/DebugInfo/debuglineinfo.test b/llvm/test/DebugInfo/debuglineinfo.test
index 78de390a8b1..14d2f82b04a 100644
--- a/llvm/test/DebugInfo/debuglineinfo.test
+++ b/llvm/test/DebugInfo/debuglineinfo.test
@@ -1,15 +1,49 @@
RUN: llvm-rtdyld -printline %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
; This test verifies that relocations are correctly applied to the
-; .debug_line section. If relocations are not applied the first two
-; functions will be reported as both starting at address zero in the
-; line number table.
+; .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:test-inline.cpp, line:33
+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:test-inline.cpp, line:28
+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:test-inline.cpp, line:39
+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
OpenPOWER on IntegriCloud