1 : // Copyright 2012 Google Inc.
2 : //
3 : // Licensed under the Apache License, Version 2.0 (the "License");
4 : // you may not use this file except in compliance with the License.
5 : // You may obtain a copy of the License at
6 : //
7 : // http://www.apache.org/licenses/LICENSE-2.0
8 : //
9 : // Unless required by applicable law or agreed to in writing, software
10 : // distributed under the License is distributed on an "AS IS" BASIS,
11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 : // See the License for the specific language governing permissions and
13 : // limitations under the License.
14 : #ifndef SYZYGY_PDB_PDB_CONSTANTS_H_
15 : #define SYZYGY_PDB_PDB_CONSTANTS_H_
16 :
17 : #include "base/basictypes.h"
18 :
19 m : namespace pdb {
20 :
21 : // The index of the Pdb old directory stream.
22 m : const size_t kPdbOldDirectoryStream = 0;
23 :
24 : // The index of the Pdb info header stream.
25 m : const size_t kPdbHeaderInfoStream = 1;
26 :
27 : // The version we've observed in the Pdb info header.
28 m : const uint32 kPdbCurrentVersion = 20000404;
29 :
30 : // The signature we've observed in the section contribs substream of the Pdb Dbi
31 : // stream.
32 m : const uint32 kPdbDbiSectionContribsSignature = 0xF12EBA2D;
33 :
34 : // The signature we've observed for the name tables of the Pdb.
35 m : const uint32 kPdbNameTableSignature = 0xEFFEEFFE;
36 :
37 : // The version we've observed for the name tables of the Pdb.
38 m : const uint32 kPdbNameTableVersion = 1;
39 :
40 : // The index of the Tpi (Type info) stream.
41 m : const size_t kTpiStream = 2;
42 :
43 : // The index of the Dbi info stream.
44 m : const size_t kDbiStream = 3;
45 :
46 : // This is the magic value found at the start of all MSF v7.00 files.
47 m : extern const uint8 kPdbHeaderMagicString[32];
48 :
49 : // The maximum number of root pages in the Multi-Stream Format (MSF) header.
50 : // See http://code.google.com/p/pdbparser/wiki/MSF_Format
51 m : extern const uint32 kPdbMaxDirPages;
52 :
53 : // This is the Multi-Stream Format (MSF) page size generally used for PDB
54 : // files. Check bytes 32 through 35 (little endian) of any PDB file.
55 m : const uint32 kPdbPageSize = 1024;
56 :
57 : // The named PDB stream containing the history of Syzygy transformations applied
58 : // to an image. This consists of a sequence of Metadata objects.
59 m : extern const char kSyzygyHistoryStreamName[];
60 :
61 : // The version of the Syzygy history stream. This needs to be incremented
62 : // whenever the format of the stream has changed.
63 m : const uint32 kSyzygyHistoryStreamVersion = 0;
64 :
65 : // The named PDB stream containing the serialized BlockGraph of an image.
66 m : extern const char kSyzygyBlockGraphStreamName[];
67 :
68 : // The version of the Syzygy BlockGraph data stream. This needs to be
69 : // incremented whenever the format of the stream has changed.
70 m : const uint32 kSyzygyBlockGraphStreamVersion = 1;
71 :
72 m : } // namespace pdb
73 :
74 : #endif // SYZYGY_PDB_PDB_CONSTANTS_H_
|