]> Git Repo - binutils.git/blob - gas/codeview.h
Automatic date update in version.in
[binutils.git] / gas / codeview.h
1 /* codeview.h - CodeView debug support
2    Copyright (C) 2022 Free Software Foundation, Inc.
3
4    This file is part of GAS, the GNU Assembler.
5
6    GAS 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, or (at your option)
9    any later version.
10
11    GAS 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.
15
16    You should have received a copy of the GNU General Public License
17    along with GAS; see the file COPYING.  If not, write to the Free
18    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
19    02110-1301, USA.  */
20
21 /* Header files referred to below can be found in Microsoft's PDB
22    repository: https://github.com/microsoft/microsoft-pdb.  */
23
24 #ifndef GAS_CODEVIEW_H
25 #define GAS_CODEVIEW_H
26
27 #define CV_SIGNATURE_C13        4
28
29 #define DEBUG_S_SYMBOLS         0xf1
30 #define DEBUG_S_LINES           0xf2
31 #define DEBUG_S_STRINGTABLE     0xf3
32 #define DEBUG_S_FILECHKSMS      0xf4
33
34 #define S_OBJNAME               0x1101
35 #define S_COMPILE3              0x113c
36
37 #define CV_CFL_MASM             0x03
38
39 #define CV_CFL_80386            0x03
40 #define CV_CFL_X64              0xD0
41
42 #define CHKSUM_TYPE_MD5         1
43
44 /* OBJNAMESYM in cvinfo.h */
45 struct OBJNAMESYM
46 {
47   uint16_t length;
48   uint16_t type;
49   uint32_t signature;
50 };
51
52 /* COMPILESYM3 in cvinfo.h */
53 struct COMPILESYM3
54 {
55   uint16_t length;
56   uint16_t type;
57   uint32_t flags;
58   uint16_t machine;
59   uint16_t frontend_major;
60   uint16_t frontend_minor;
61   uint16_t frontend_build;
62   uint16_t frontend_qfe;
63   uint16_t backend_major;
64   uint16_t backend_minor;
65   uint16_t backend_build;
66   uint16_t backend_qfe;
67 } ATTRIBUTE_PACKED;
68
69 /* filedata in dumpsym7.cpp */
70 struct file_checksum
71 {
72   uint32_t file_id;
73   uint8_t checksum_length;
74   uint8_t checksum_type;
75 } ATTRIBUTE_PACKED;
76
77 /* CV_DebugSLinesHeader_t in cvinfo.h */
78 struct cv_lines_header
79 {
80   uint32_t offset;
81   uint16_t section;
82   uint16_t flags;
83   uint32_t length;
84 };
85
86 /* CV_DebugSLinesFileBlockHeader_t in cvinfo.h */
87 struct cv_lines_block
88 {
89   uint32_t file_id;
90   uint32_t num_lines;
91   uint32_t length;
92 };
93
94 /* CV_Line_t in cvinfo.h */
95 struct cv_line
96 {
97   uint32_t offset;
98   uint32_t line_no;
99 };
100
101 extern void codeview_finish (void);
102 extern void codeview_generate_asm_lineno (void);
103
104 #endif
This page took 0.029463 seconds and 4 git commands to generate.