3 ; RUN: llvm-pdbutil pretty -injected-sources -injected-source-content \
4 ; RUN: %p/Inputs/InjectedSource.pdb | FileCheck %s
5 ; RUN: llvm-pdbutil pretty -injected-sources -injected-source-content \
6 ; RUN: %p/Inputs/ClassLayoutTest.pdb | FileCheck --check-prefix=NEGATIVE %s
8 ; CHECK: ---INJECTED SOURCES---
9 ; CHECK: c.natvis (140 bytes): obj=<null>, vname=c.natvis, crc=334478030, compression=None
10 ; CHECK-NEXT: <?xml version="1.0" encoding="utf-8"?>
11 ; CHECK-NEXT: <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
12 ; CHECK-NEXT: </AutoVisualizer>
13 ; CHECK: a.natvis (140 bytes): obj=<null>, vname=a.natvis, crc=334478030, compression=None
14 ; CHECK-NEXT: <?xml version="1.0" encoding="utf-8"?>
15 ; CHECK-NEXT: <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
16 ; CHECK-NEXT: </AutoVisualizer>
17 ; CHECK: b.natvis (294 bytes): obj=<null>, vname=b.natvis, crc=2059731902, compression=None
18 ; CHECK-NEXT: <?xml version="1.0" encoding="utf-8"?>
19 ; CHECK-NEXT: <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
20 ; CHECK-NEXT: <Type Name="Baz">
21 ; CHECK-NEXT: <DisplayString>Third test</DisplayString>
23 ; CHECK-NEXT: <Type Name="Buzz">
24 ; CHECK-NEXT: <DisplayString>Fourth test</DisplayString>
26 ; CHECK-NEXT: </AutoVisualizer>
28 ; NEGATIVE: ---INJECTED SOURCES---
29 ; NEGATIVE-NEXT: There are no injected sources.
31 ; PDB created by running `csc /debug Hello.cs`
32 ; RUN: llvm-pdbutil pretty -native -injected-sources -injected-source-content \
33 ; RUN: %p/Inputs/dotnet_hashonly.pdb | FileCheck --check-prefix=HASH %s
35 ; HASH: ---INJECTED SOURCES---
36 ; HASH: C:\src\llvm-mono\Hello.cs (92 bytes): obj=<null>, vname=c:\src\llvm-mono\hello.cs, crc=269413292, compression=DotNet
37 ; HASH-NEXT: Compressed data (
38 ; HASH-NEXT: 0000: F862513F C607D311 905300C0 4FA302A1 C4454B99 E9E6D211 903F00C0 4FA302A1 |.bQ?.....S..O....EK......?..O...|
39 ; HASH-NEXT: 0020: 0B9D865A 1166D311 BD2A0000 F80849BD EC1618FF 5EAA104D 87F76F49 63833460 |...Z.f...*....I.....^..M..oIc.4`|
40 ; HASH-NEXT: 0040: 14000000 00000000 17299CBE 74FDDF66 FFCD5E08 CE34A775 D464C611 |.........)..t..f..^..4.u.d..|
43 ; PDB created by running `csc /debug Hello.cs` with Hello.cs smaller than 200 bytes.
44 ; RUN: llvm-pdbutil pretty -native -injected-sources -injected-source-content \
45 ; RUN: %p/Inputs/dotnet_contents_uncompressed.pdb | FileCheck --check-prefix=UNCOMP %s
47 ; UNCOMP: ---INJECTED SOURCES---
48 ; UNCOMP: C:\src\llvm-mono\Hello.cs (232 bytes): obj=<null>, vname=c:\src\llvm-mono\hello.cs, crc=323787205, compression=DotNet
49 ; UNCOMP-NEXT: Compressed data (
50 ; UNCOMP-NEXT: 0000: F862513F C607D311 905300C0 4FA302A1 C4454B99 E9E6D211 903F00C0 4FA302A1 |.bQ?.....S..O....EK......?..O...|
51 ; UNCOMP-NEXT: 0020: 0B9D865A 1166D311 BD2A0000 F80849BD EC1618FF 5EAA104D 87F76F49 63833460 |...Z.f...*....I.....^..M..oIc.4`|
52 ; UNCOMP-NEXT: 0040: 14000000 8C000000 17299CBE 74FDDF66 FFCD5E08 CE34A775 D464C611 00000000 |.........)..t..f..^..4.u.d......|
53 ; UNCOMP-NEXT: 0060: 6E616D65 73706163 65204865 6C6C6F57 6F726C64 207B0D0A 636C6173 73204865 |namespace HelloWorld {..class He|
54 ; UNCOMP-NEXT: 0080: 6C6C6F20 7B0D0A20 20737461 74696320 766F6964 204D6169 6E282920 7B205379 |llo {.. static void Main() { Sy|
55 ; UNCOMP-NEXT: 00A0: 7374656D 2E436F6E 736F6C65 2E577269 74654C69 6E652822 48656C6C 6F206173 |stem.Console.WriteLine("Hello as|
56 ; UNCOMP-NEXT: 00C0: 64666A6B 6C777763 6F697762 72796669 75667566 20576F72 6C642122 293B207D |dfjklwwcoiwbryfiufuf World!"); }|
57 ; UNCOMP-NEXT: 00E0: 0D0A7D0D 0A7D0D0A |..}..}..|
60 ; PDB created by running `csc /debug Hello.cs` with Hello.cs larger than 200 bytes.
61 ; RUN: llvm-pdbutil pretty -native -injected-sources -injected-source-content \
62 ; RUN: %p/Inputs/dotnet_contents_compressed.pdb | FileCheck --check-prefix=COMP %s
64 ; COMP: ---INJECTED SOURCES---
65 ; COMP: C:\src\llvm-mono\Hello.cs (218 bytes): obj=<null>, vname=c:\src\llvm-mono\hello.cs, crc=616104201, compression=DotNet
66 ; COMP-NEXT: Compressed data (
67 ; COMP-NEXT: 0000: F862513F C607D311 905300C0 4FA302A1 C4454B99 E9E6D211 903F00C0 4FA302A1 |.bQ?.....S..O....EK......?..O...|
68 ; COMP-NEXT: 0020: 0B9D865A 1166D311 BD2A0000 F80849BD EC1618FF 5EAA104D 87F76F49 63833460 |...Z.f...*....I.....^..M..oIc.4`|
69 ; COMP-NEXT: 0040: 14000000 7E000000 52CD36A0 6A9824CD A3034543 7FA9765E D572DA21 FB000000 |....~...R.6.j.$...EC..v^.r.!....|
70 ; COMP-NEXT: 0060: CB4BCC4D 2D2E484C 4E55F048 CDC9C90F CF2FCA49 51A8E6E5 4ACE492C 2E868881 |.K.M-.HLNU.H...../.IQ...J.I,....|
71 ; COMP-NEXT: 0080: B80A0AC5 25892599 C90A65F9 99290ABE 8999791A 9A0AD50A C195C525 A9B97ACE |....%.%...e..)....y........%..z.|
72 ; COMP-NEXT: 00A0: F979C5F9 39A97AE1 459925A9 3E9979A9 1A4A109D 89C52969 59D939E5 E5C9F999 |.y..9.z.E.%.>.y..J....)iY.9.....|
73 ; COMP-NEXT: 00C0: E5494595 6999A569 A5690321 0CF698A2 92A6B542 2D2F1704 0100 |.IE.i..i.i.!.......B-/....|