1 /* pdb.h - header file for generating PDB CodeView debugging files.
2 Copyright (C) 2022 Free Software Foundation, Inc.
4 This file is part of the GNU Binutils.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
21 /* Header files referred to below can be found in Microsoft's PDB
22 repository: https://github.com/microsoft/microsoft-pdb. */
31 /* PDBStream70 in pdb1.h */
40 #define PDB_STREAM_VERSION_VC70 20000404
41 #define PDB_STREAM_VERSION_VC140 20140508
44 struct pdb_tpi_stream_header
48 uint32_t type_index_begin
;
49 uint32_t type_index_end
;
50 uint32_t type_record_bytes
;
51 uint16_t hash_stream_index
;
52 uint16_t hash_aux_stream_index
;
53 uint32_t hash_key_size
;
54 uint32_t num_hash_buckets
;
55 uint32_t hash_value_buffer_offset
;
56 uint32_t hash_value_buffer_length
;
57 uint32_t index_offset_buffer_offset
;
58 uint32_t index_offset_buffer_length
;
59 uint32_t hash_adj_buffer_offset
;
60 uint32_t hash_adj_buffer_length
;
63 #define TPI_STREAM_VERSION_80 20040203
65 #define TPI_FIRST_INDEX 0x1000
67 /* NewDBIHdr in dbi.h */
68 struct pdb_dbi_stream_header
70 uint32_t version_signature
;
71 uint32_t version_header
;
73 uint16_t global_stream_index
;
74 uint16_t build_number
;
75 uint16_t public_stream_index
;
76 uint16_t pdb_dll_version
;
77 uint16_t sym_record_stream
;
78 uint16_t pdb_dll_rbld
;
79 uint32_t mod_info_size
;
80 uint32_t section_contribution_size
;
81 uint32_t section_map_size
;
82 uint32_t source_info_size
;
83 uint32_t type_server_map_size
;
84 uint32_t mfc_type_server_index
;
85 uint32_t optional_dbg_header_size
;
86 uint32_t ec_substream_size
;
92 #define DBI_STREAM_VERSION_70 19990903
94 struct optional_dbg_header
97 uint16_t exception_stream
;
98 uint16_t fixup_stream
;
99 uint16_t omap_to_src_stream
;
100 uint16_t omap_from_src_stream
;
101 uint16_t section_header_stream
;
102 uint16_t token_map_stream
;
103 uint16_t xdata_stream
;
104 uint16_t pdata_stream
;
105 uint16_t new_fpo_stream
;
106 uint16_t orig_section_header_stream
;
109 extern bool create_pdb_file (bfd
*, const char *, const unsigned char *);