1 : // Copyright 2012 Google Inc. All Rights Reserved.
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 : //
15 : // This file provide some data types used to store the content of the different
16 : // PDB streams.
17 :
18 : #ifndef SYZYGY_PDB_PDB_DATA_TYPES_H_
19 : #define SYZYGY_PDB_PDB_DATA_TYPES_H_
20 :
21 : #include <map>
22 : #include <vector>
23 :
24 m : namespace pdb {
25 :
26 : // Stores the basic information for a symbol record. Symbol records are
27 : // composed of length and type fields, followed by some data.
28 m : struct SymbolRecord {
29 m : size_t start_position; // Positioned after the length and type fields.
30 m : uint16_t len; // Length of data.
31 m : uint16_t type;
32 m : };
33 m : typedef std::vector<SymbolRecord> SymbolRecordVector;
34 :
35 : // Stores the basic information for a type info record.
36 m : struct TypeInfoRecord {
37 m : size_t start_position;
38 m : uint16_t len;
39 m : uint16_t type;
40 m : };
41 : // Map with the type number as a key and the TypeInfoRecord as a value.
42 m : typedef std::map<uint32_t, TypeInfoRecord> TypeInfoRecordMap;
43 :
44 m : } // namespace pdb
45 :
46 : #endif // SYZYGY_PDB_PDB_DATA_TYPES_H_
|