1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/tools/llvm-symbolizer/sym-verbose.test
Mircea Trofin 639b1173c3 [llvm] Skip over empty line table entries.
Summary:
This is similar to how addr2line handles consecutive entries with the
same address - pick the last one.

Reviewers: dblaikie, friss, JDevlieghere

Reviewed By: dblaikie

Subscribers: eugenis, vitalybuka, echristo, JDevlieghere, probinson, aprantl, hiraditya, rupprecht, jdoerfert, llvm-commits

Tags: #llvm, #debug-info

Differential Revision: https://reviews.llvm.org/D58952

llvm-svn: 356265
2019-03-15 15:00:12 +00:00

98 lines
2.4 KiB
Plaintext

#static volatile int do_mul;
#static volatile int x, v;
#
#int foo () {
# if (do_mul) x *= v; else x /= v;
# return x;
#}
#
#int main() {
# return foo() + foo();
#}
#Build as : clang -gmlt -fdebug-info-for-profiling -O2 discrim.c -o discrim
RUN: llvm-symbolizer -verbose -print-address -obj=%p/Inputs/discrim < %p/Inputs/discrim.inp | FileCheck %s
#CHECK: some text
#CHECK: 0x400590
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 7
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK: 0x4005a5
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 17
#CHECK-NEXT: Discriminator: 2
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK: 0x4005ad
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 0
#CHECK-NEXT: Column: 30
#CHECK-NEXT: Discriminator: 4
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK: 0x4005b9
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 7
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK-NEXT: Discriminator: 2
#CHECK: 0x4005ce
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 17
#CHECK-NEXT: Discriminator: 2
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK-NEXT: Discriminator: 2
#CHECK: 0x4005d4
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 30
#CHECK-NEXT: Discriminator: 4
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK-NEXT: Discriminator: 2
#CHECK: some more text