1; RUN: llvm-pdbutil explain -offset=0 %p/Inputs/InjectedSource.pdb \
2; RUN:  | FileCheck --check-prefix=ZERO %s
3; RUN: llvm-pdbutil explain -offset=40 %p/Inputs/InjectedSource.pdb \
4; RUN:  | FileCheck --check-prefix=FORTY %s
5; RUN: llvm-pdbutil explain -offset=60 %p/Inputs/InjectedSource.pdb \
6; RUN:  | FileCheck --check-prefix=SIXTY %s
7
8; RUN: llvm-pdbutil explain -offset=0x1000 %p/Inputs/InjectedSource.pdb \
9; RUN:  | FileCheck --check-prefix=FPM1 %s
10; RUN: llvm-pdbutil explain -offset=0x1100 %p/Inputs/InjectedSource.pdb \
11; RUN:  | FileCheck --check-prefix=EXTRANEOUSFPM %s
12; RUN: llvm-pdbutil explain -offset=0x2000 %p/Inputs/InjectedSource.pdb \
13; RUN:  | FileCheck --check-prefix=FPM2 %s
14
15; RUN: llvm-pdbutil explain -offset=0x3000 %p/Inputs/InjectedSource.pdb \
16; RUN:  | FileCheck --check-prefix=UNALLOCATED %s
17
18; RUN: llvm-pdbutil explain -offset=0x7000 %p/Inputs/InjectedSource.pdb \
19; RUN:  | FileCheck --check-prefix=STREAM %s
20
21; RUN: llvm-pdbutil explain -offset=0x1A000 %p/Inputs/InjectedSource.pdb \
22; RUN:  | FileCheck --check-prefix=STREAMDIR %s
23
24; RUN: llvm-pdbutil explain -offset=0x1B000 %p/Inputs/InjectedSource.pdb \
25; RUN:  | FileCheck --check-prefix=DIRBLOCKLIST %s
26
27; RUN: llvm-pdbutil explain -offset=0x1D000 %p/Inputs/InjectedSource.pdb \
28; RUN:  | FileCheck --check-prefix=INVALIDFILEOFFSET %s
29
30; RUN: llvm-pdbutil explain -offset=0xA100 %p/Inputs/InjectedSource.pdb \
31; RUN:  | FileCheck --check-prefix=UNUSED %s
32
33
34ZERO:      Block:Offset = 0:0000.
35ZERO-NEXT: Address is in block 0 (allocated).
36ZERO-NEXT:   This corresponds to offset 0 of the MSF super block,
37ZERO-NEXT:   which is part of the MSF file magic.
38
39FORTY:      Block:Offset = 0:0028.
40FORTY-NEXT: Address is in block 0 (allocated).
41FORTY-NEXT:   This corresponds to offset 40 of the MSF super block,
42FORTY-NEXT:   which contains the number of blocks in the file.
43FORTY-NEXT:   The current value is 29.
44
45SIXTY:      Block:Offset = 0:003C.
46SIXTY-NEXT: Address is in block 0 (allocated).
47SIXTY-NEXT:   This corresponds to offset 60 of the MSF super block,
48SIXTY-NEXT:   which is outside the range of valid data for the super block.
49
50FPM1:      Block:Offset = 1:0000.
51FPM1-NEXT: Address is in block 1 (allocated).
52FPM1-NEXT:   Address is in FPM1 (Alt FPM)
53FPM1-NEXT:   Address describes the allocation status of blocks [0,8)
54FPM1-NEXT:   Status = 00000011 (Note: 0 = allocated, 1 = free)
55
56EXTRANEOUSFPM:      Block:Offset = 1:0100.
57EXTRANEOUSFPM-NEXT: Address is in block 1 (allocated).
58EXTRANEOUSFPM-NEXT:   Address is in FPM1 (Alt FPM)
59EXTRANEOUSFPM-NEXT:   Address is in extraneous FPM space.
60
61FPM2:      Block:Offset = 2:0000.
62FPM2-NEXT: Address is in block 2 (allocated).
63FPM2-NEXT:   Address is in FPM2 (Main FPM)
64FPM2-NEXT:   Address describes the allocation status of blocks [0,8)
65FPM2-NEXT:   Status = 00011100 (Note: 0 = allocated, 1 = free)
66
67UNALLOCATED:      Block:Offset = 3:0000.
68UNALLOCATED-NEXT: Address is in block 3 (unallocated).
69
70STREAM:      Block:Offset = 7:0000.
71STREAM-NEXT: Address is in block 7 (allocated).
72STREAM-NEXT:   Address is at offset 0/684 of Stream 12 (Module "* Linker *").
73
74STREAMDIR:      Block:Offset = 1A:0000.
75STREAMDIR-NEXT: Address is in block 26 (allocated).
76STREAMDIR-NEXT:   Address is at offset 0/156 of Stream Directory.
77
78DIRBLOCKLIST:      Block:Offset = 1B:0000.
79DIRBLOCKLIST-NEXT: Address is in block 27 (allocated).
80DIRBLOCKLIST-NEXT:   Address is at offset 0 of the directory block list
81
82INVALIDFILEOFFSET: Address 118784 is not in the file (file size = 118784).
83
84UNUSED:      Block:Offset = A:0100.
85UNUSED-NEXT: Address is in block 10 (allocated).
86UNUSED-NEXT:   Address is at offset 256/120 of Stream 11 (Section Header Data) in unused space.
87