summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2018-12-17 14:14:40 +0000
committerEric Liu <ioeric@google.com>2018-12-17 14:14:40 +0000
commit6c933a2bed30be7009b1994d112e188343d40265 (patch)
tree6f7194ff0beec7ee8431f46f31d8374894cc1965 /llvm/test
parent450606759351dabe1b975e3b48be80db9030c51a (diff)
downloadbcm5719-llvm-6c933a2bed30be7009b1994d112e188343d40265.tar.gz
bcm5719-llvm-6c933a2bed30be7009b1994d112e188343d40265.zip
Revert "DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is empty (devoid of code addresses)"
This reverts commit r349333. It caused internal test to fail. I have sent more information to the author. llvm-svn: 349353
Diffstat (limited to 'llvm/test')
-rwxr-xr-xllvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64bin17864 -> 9640 bytes
-rwxr-xr-xllvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.debuglinkbin16288 -> 8668 bytes
-rwxr-xr-xllvm/test/DebugInfo/Inputs/llvm-symbolizer-test.elf-x86-64bin17200 -> 10693 bytes
-rw-r--r--llvm/test/DebugInfo/Inputs/test-inline.obin2968 -> 6040 bytes
-rw-r--r--llvm/test/DebugInfo/Inputs/test-parameters.obin2352 -> 5792 bytes
-rw-r--r--llvm/test/DebugInfo/debuglineinfo.test53
-rw-r--r--llvm/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test7
-rw-r--r--llvm/test/DebugInfo/llvm-symbolizer.test20
8 files changed, 54 insertions, 26 deletions
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64 b/llvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64
index e3afa0f4288..455dd1ce4fc 100755
--- a/llvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64
Binary files differ
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.debuglink b/llvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.debuglink
index 9b513215f2b..8c08037ea37 100755
--- a/llvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.debuglink
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.debuglink
Binary files differ
diff --git a/llvm/test/DebugInfo/Inputs/llvm-symbolizer-test.elf-x86-64 b/llvm/test/DebugInfo/Inputs/llvm-symbolizer-test.elf-x86-64
index c952cff13de..99a448a7778 100755
--- a/llvm/test/DebugInfo/Inputs/llvm-symbolizer-test.elf-x86-64
+++ b/llvm/test/DebugInfo/Inputs/llvm-symbolizer-test.elf-x86-64
Binary files differ
diff --git a/llvm/test/DebugInfo/Inputs/test-inline.o b/llvm/test/DebugInfo/Inputs/test-inline.o
index 93073a19c52..a650c91725d 100644
--- a/llvm/test/DebugInfo/Inputs/test-inline.o
+++ b/llvm/test/DebugInfo/Inputs/test-inline.o
Binary files differ
diff --git a/llvm/test/DebugInfo/Inputs/test-parameters.o b/llvm/test/DebugInfo/Inputs/test-parameters.o
index 3b887c45640..7f4b6702df2 100644
--- a/llvm/test/DebugInfo/Inputs/test-parameters.o
+++ 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 651bbe5a095..720ba12ed76 100644
--- a/llvm/test/DebugInfo/debuglineinfo.test
+++ b/llvm/test/DebugInfo/debuglineinfo.test
@@ -1,19 +1,50 @@
RUN: llvm-rtdyld -printline %p/Inputs/test-inline.o \
-RUN: | FileCheck %s
+RUN: | FileCheck %s -check-prefix TEST_INLINE
RUN: llvm-rtdyld -printdebugline %p/Inputs/test-inline.o \
-RUN: | FileCheck %s
+RUN: | FileCheck %s -check-prefix TEST_INLINE
RUN: llvm-rtdyld -printline %p/Inputs/test-parameters.o \
-RUN: | FileCheck %s
+RUN: | FileCheck %s -check-prefix TEST_PARAMETERS
RUN: llvm-rtdyld -printdebugline %p/Inputs/test-parameters.o \
-RUN: | FileCheck %s
+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: 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
+
+; 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
-CHECK: Function: _Z2f1v, Size = 6
-CHECK-NEXT: Line info @ 0: test-inline.cpp, line:1
-CHECK-NEXT: Line info @ 4: test-inline.cpp, line:1
-CHECK-NEXT: Function: _Z2f2v, Size = 11
-CHECK-NEXT: Line info @ 0: test-inline.cpp, line:2
-CHECK-NEXT: Line info @ 4: test-inline.cpp, line:2
-CHECK-NEXT: Line info @ 9: test-inline.cpp, line:2
diff --git a/llvm/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test b/llvm/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test
index 1b8da86f6d3..b6c9ccc2d17 100644
--- a/llvm/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test
+++ b/llvm/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test
@@ -15,8 +15,5 @@ Compiled to assembly with clang, modified the skeleton CU to remove the
high/low pc (& update the CU length field and abbrev to match) & then
compile/objcopy to make the .o and .dwo.
-Ensure that the f2 inlined frame is not included - it's inefficient to have to
-go and load all the debug info and search for the address ranges, so assume
-that a lack of ranges on the CU means the CU covers no addresses.
-
-CHECK-NOT: _Z2f2v
+CHECK: _Z2f2v
+CHECK: test.cpp:2:51
diff --git a/llvm/test/DebugInfo/llvm-symbolizer.test b/llvm/test/DebugInfo/llvm-symbolizer.test
index 5a5e06c3789..a6a15491c20 100644
--- a/llvm/test/DebugInfo/llvm-symbolizer.test
+++ b/llvm/test/DebugInfo/llvm-symbolizer.test
@@ -1,10 +1,10 @@
RUN: rm -rf %t
RUN: mkdir -p %t
-RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x40113f" > %t.input
-RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64.debuglink 0x40113f" >> %t.input
-RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x401020" >> %t.input
-RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x40110e" >> %t.input
-RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x401160" >> %t.input
+RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400559" > %t.input
+RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64.debuglink 0x400559" >> %t.input
+RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400436" >> %t.input
+RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400528" >> %t.input
+RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400586" >> %t.input
RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004e8" >> %t.input
RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004f4" >> %t.input
RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" >> %t.input
@@ -181,8 +181,8 @@ UNKNOWN-ARCH-NOT: main
UNKNOWN-ARCH: ??
UNKNOWN-ARCH-NOT: main
-RUN: echo "0x40113f" > %t.input4
-RUN: echo "0x401020" >> %t.input4
+RUN: echo "0x400559" > %t.input4
+RUN: echo "0x400436" >> %t.input4
RUN: llvm-symbolizer --obj %p/Inputs/dwarfdump-test.elf-x86-64 < %t.input4 \
RUN: | FileCheck %s --check-prefix=BINARY
@@ -190,9 +190,9 @@ BINARY: main
BINARY-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
BINARY: _start
-RUN: echo "0x401140" > %t.input5
-RUN: echo "0x401020" >> %t.input5
-RUN: echo "0x401120" >> %t.input5
+RUN: echo "0x400720" > %t.input5
+RUN: echo "0x4004a0" >> %t.input5
+RUN: echo "0x4006f0" >> %t.input5
RUN: llvm-symbolizer --obj %p/Inputs/llvm-symbolizer-test.elf-x86-64 < %t.input5 \
RUN: | FileCheck %s --check-prefix=BINARY_C
OpenPOWER on IntegriCloud