| 1 |
/* dwarf2codeview.h - DWARF interface for CodeView generation. |
| 2 |
Copyright (C) 2023-2025 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
This file is part of GCC. |
| 5 |
|
| 6 |
GCC is free software; you can redistribute it and/or modify it under |
| 7 |
the terms of the GNU General Public License as published by the Free |
| 8 |
Software Foundation; either version 3, or (at your option) any later |
| 9 |
version. |
| 10 |
|
| 11 |
GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
| 12 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 |
for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with GCC; see the file COPYING3. If not see |
| 18 |
<http://www.gnu.org/licenses/>. */ |
| 19 |
|
| 20 |
#ifndef GCC_DWARF2CODEVIEW_H |
| 21 |
#define GCC_DWARF2CODEVIEW_H 1 |
| 22 |
|
| 23 |
#include "dwarf2out.h" |
| 24 |
#include "flags.h" |
| 25 |
|
| 26 |
/* Constants for in-built types. */ |
| 27 |
|
| 28 |
#define T_VOID 0x0003 |
| 29 |
#define T_HRESULT 0x0008 |
| 30 |
#define T_CHAR 0x0010 |
| 31 |
#define T_SHORT 0x0011 |
| 32 |
#define T_LONG 0x0012 |
| 33 |
#define T_QUAD 0x0013 |
| 34 |
#define T_UCHAR 0x0020 |
| 35 |
#define T_USHORT 0x0021 |
| 36 |
#define T_ULONG 0x0022 |
| 37 |
#define T_UQUAD 0x0023 |
| 38 |
#define T_BOOL08 0x0030 |
| 39 |
#define T_REAL32 0x0040 |
| 40 |
#define T_REAL64 0x0041 |
| 41 |
#define T_REAL80 0x0042 |
| 42 |
#define T_REAL128 0x0043 |
| 43 |
#define T_RCHAR 0x0070 |
| 44 |
#define T_WCHAR 0x0071 |
| 45 |
#define T_INT4 0x0074 |
| 46 |
#define T_UINT4 0x0075 |
| 47 |
#define T_CHAR16 0x007a |
| 48 |
#define T_CHAR32 0x007b |
| 49 |
#define T_CHAR8 0x007c |
| 50 |
|
| 51 |
#define CV_POINTER_32 0x0400 |
| 52 |
#define CV_POINTER_64 0x0600 |
| 53 |
#define T_32PVOID (T_VOID | CV_POINTER_32) |
| 54 |
#define T_64PVOID (T_VOID | CV_POINTER_64) |
| 55 |
|
| 56 |
/* LF_POINTER attributes. */ |
| 57 |
#define CV_PTR_NEAR32 0x0a |
| 58 |
#define CV_PTR_64 0x0c |
| 59 |
|
| 60 |
/* enum CV_ptrmode_e in cvinfo.h, shifted by 5 for the lfPointerAttr bitfield */ |
| 61 |
#define CV_PTR_MODE_MASK 0xe0 |
| 62 |
#define CV_PTR_MODE_LVREF 0x20 |
| 63 |
#define CV_PTR_MODE_PMEM 0x40 |
| 64 |
#define CV_PTR_MODE_PMFUNC 0x60 |
| 65 |
#define CV_PTR_MODE_RVREF 0x80 |
| 66 |
|
| 67 |
/* enum CV_pmtype_e in in cvinfo.h */ |
| 68 |
#define CV_PMTYPE_D_Single 0x01 |
| 69 |
#define CV_PMTYPE_F_Single 0x05 |
| 70 |
|
| 71 |
/* LF_MODIFIER values. */ |
| 72 |
#define MOD_const 0x1 |
| 73 |
#define MOD_volatile 0x2 |
| 74 |
|
| 75 |
#define CV_ACCESS_PRIVATE 1 |
| 76 |
#define CV_ACCESS_PROTECTED 2 |
| 77 |
#define CV_ACCESS_PUBLIC 3 |
| 78 |
|
| 79 |
/* CV_methodprop_e values in cvinfo.h, shifted by 2 for CV_fldattr_t. */ |
| 80 |
#define CV_METHOD_VANILLA 0x00 |
| 81 |
#define CV_METHOD_VIRTUAL 0x04 |
| 82 |
#define CV_METHOD_STATIC 0x08 |
| 83 |
#define CV_METHOD_FRIEND 0x0c |
| 84 |
#define CV_METHOD_INTRO 0x10 |
| 85 |
#define CV_METHOD_PUREVIRT 0x14 |
| 86 |
#define CV_METHOD_PUREINTRO 0x18 |
| 87 |
|
| 88 |
#define CV_PROP_FWDREF 0x80 |
| 89 |
|
| 90 |
/* Debug Format Interface. Used in dwarf2out.cc. */ |
| 91 |
|
| 92 |
extern void codeview_debug_finish (void); |
| 93 |
extern void codeview_source_line (unsigned int, const char *); |
| 94 |
extern void codeview_start_source_file (const char *); |
| 95 |
extern void codeview_switch_text_section (); |
| 96 |
extern void codeview_end_epilogue (void); |
| 97 |
extern void codeview_debug_early_finish (dw_die_ref die); |
| 98 |
extern void codeview_begin_block (unsigned int, unsigned int, tree); |
| 99 |
extern void codeview_end_block (unsigned int, unsigned int); |
| 100 |
extern void codeview_abstract_function (tree); |
| 101 |
|
| 102 |
#endif /* GCC_DWARF2CODEVIEW_H */ |