• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
2RUN: 	| llvm-symbolizer -obj="%p/Inputs/test.exe" \
3RUN:    | FileCheck %s
4RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
5RUN: 	| llvm-symbolizer -obj="%p/Inputs/test.exe" -demangle=false \
6RUN: 	| FileCheck %s --check-prefix=CHECK-NO-DEMANGLE
7
8Subtract ImageBase from all the offsets and run the test again with
9--relative-address.
10
11RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
12RUN: 	| %python -c 'import sys;print("\n".join([hex(int(x, 16) - 0x400000) for x in sys.stdin]))' \
13RUN:	| llvm-symbolizer -obj="%p/Inputs/test.exe" -demangle=false --relative-address \
14RUN:    | FileCheck %s --check-prefix=CHECK-NO-DEMANGLE
15
16ADDR: 0x401380
17ADDR: 0x401390
18ADDR: 0x4013A0
19ADDR: 0x4013C0
20ADDR: 0x4013D0
21ADDR: 0x4013E0
22ADDR: 0x4013F0
23ADDR: 0x401420
24
25CHECK: foo(void)
26CHECK-NEXT: test.cpp:10
27CHECK: {{^private_symbol$}}
28CHECK-NEXT: test.cpp:13:0
29CHECK: {{^main}}
30CHECK-NEXT: test.cpp:16:0
31CHECK: {{^foo_cdecl$}}
32CHECK: {{^foo_stdcall$}}
33CHECK: {{^foo_fastcall$}}
34CHECK: {{^foo_vectorcall$}}
35CHECK: NS::Foo::bar(void)
36CHECK-NEXT: test.cpp:6:0
37
38CHECK-NO-DEMANGLE: ?foo@@YAXXZ
39CHECK-NO-DEMANGLE-NEXT: test.cpp:10
40CHECK-NO-DEMANGLE: private_symbol
41CHECK-NO-DEMANGLE-NEXT: test.cpp:13
42CHECK-NO-DEMANGLE: _main
43CHECK-NO-DEMANGLE-NEXT: test.cpp:16
44CHECK-NO-DEMANGLE: _foo_cdecl
45CHECK-NO-DEMANGLE: _foo_stdcall@0
46CHECK-NO-DEMANGLE: @foo_fastcall@0
47CHECK-NO-DEMANGLE: foo_vectorcall@@0
48CHECK-NO-DEMANGLE: ?bar@Foo@NS@@QAEXXZ
49CHECK-NO-DEMANGLE-NEXT: test.cpp:6
50