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