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