1 /* codeview.h - CodeView debug support
2 Copyright (C) 2022-2023 Free Software Foundation, Inc.
4 This file is part of GAS, the GNU Assembler.
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)
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.
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
21 /* Header files referred to below can be found in Microsoft's PDB
22 repository: https://github.com/microsoft/microsoft-pdb. */
24 #ifndef GAS_CODEVIEW_H
25 #define GAS_CODEVIEW_H
27 #define CV_SIGNATURE_C13 4
29 #define DEBUG_S_SYMBOLS 0xf1
30 #define DEBUG_S_LINES 0xf2
31 #define DEBUG_S_STRINGTABLE 0xf3
32 #define DEBUG_S_FILECHKSMS 0xf4
34 #define S_OBJNAME 0x1101
35 #define S_COMPILE3 0x113c
37 #define CV_CFL_MASM 0x03
39 #define CV_CFL_80386 0x03
40 #define CV_CFL_X64 0xD0
41 #define CV_CFL_ARM64 0xF6
43 #define CHKSUM_TYPE_MD5 1
45 /* OBJNAMESYM in cvinfo.h */
53 /* COMPILESYM3 in cvinfo.h */
60 uint16_t frontend_major
;
61 uint16_t frontend_minor
;
62 uint16_t frontend_build
;
63 uint16_t frontend_qfe
;
64 uint16_t backend_major
;
65 uint16_t backend_minor
;
66 uint16_t backend_build
;
70 /* filedata in dumpsym7.cpp */
74 uint8_t checksum_length
;
75 uint8_t checksum_type
;
78 /* CV_DebugSLinesHeader_t in cvinfo.h */
79 struct cv_lines_header
87 /* CV_DebugSLinesFileBlockHeader_t in cvinfo.h */
95 /* CV_Line_t in cvinfo.h */
102 extern void codeview_finish (void);
103 extern void codeview_generate_asm_lineno (void);