diff options
author | Mark Harmstone <mark@harmstone.com> | 2024-06-23 21:30:08 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2024-06-23 21:30:08 -0600 |
commit | 35cca2ccd908960d789533ddb93bb1bea5e71305 (patch) | |
tree | 2e27c0d6cd5962c21335604205d4b84fe3f5be4b /gcc/dwarf2codeview.h | |
parent | de2ade6908c6f18b821d6d25b4f4833c850fa19c (diff) | |
download | gcc-35cca2ccd908960d789533ddb93bb1bea5e71305.zip gcc-35cca2ccd908960d789533ddb93bb1bea5e71305.tar.gz gcc-35cca2ccd908960d789533ddb93bb1bea5e71305.tar.bz2 |
[PATCH 04/11] Handle pointers for CodeView
Translates DW_TAG_pointer_type DIEs into LF_POINTER symbols, which get
output into the .debug$T section.
gcc/
* dwarf2codeview.cc (FIRST_TYPE): Define.
(struct codeview_custom_type): New structure.
(custom_types, last_custom_type): New variables.
(get_type_num): Prototype.
(write_lf_pointer, write_custom_types): New functions.
(codeview_debug_finish): Call write_custom_types.
(add_custom_type, get_type_num_pointer_type): New functions.
(get_type_num): Handle DW_TAG_pointer_type DIEs.
* dwarf2codeview.h (T_VOID): Define.
(CV_POINTER_32, CV_POINTER_64): Likewise.
(T_32PVOID, T_64PVOID): Likewise.
(CV_PTR_NEAR32, CV_PTR64, LF_POINTER): Likewise.
Diffstat (limited to 'gcc/dwarf2codeview.h')
-rw-r--r-- | gcc/dwarf2codeview.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/dwarf2codeview.h b/gcc/dwarf2codeview.h index 7d8a4c1..0af4c982 100644 --- a/gcc/dwarf2codeview.h +++ b/gcc/dwarf2codeview.h @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see /* Constants for in-built types. */ +#define T_VOID 0x0003 #define T_CHAR 0x0010 #define T_SHORT 0x0011 #define T_LONG 0x0012 @@ -46,6 +47,18 @@ along with GCC; see the file COPYING3. If not see #define T_CHAR32 0x007b #define T_CHAR8 0x007c +#define CV_POINTER_32 0x0400 +#define CV_POINTER_64 0x0600 +#define T_32PVOID (T_VOID | CV_POINTER_32) +#define T_64PVOID (T_VOID | CV_POINTER_64) + +/* LF_POINTER attributes. */ +#define CV_PTR_NEAR32 0x0a +#define CV_PTR_64 0x0c + +/* Constants for type definitions. */ +#define LF_POINTER 0x1002 + /* Debug Format Interface. Used in dwarf2out.cc. */ extern void codeview_debug_finish (void); |