On 6/17/24 6:17 PM, Mark Harmstone wrote:
Translates DW_TAG_enumeration_type DIEs into LF_ENUM symbols.

     gcc/
             * dwarf2codeview.cc (MAX_FIELDLIST_SIZE): Define.
             (struct codeview_integer): New structure.
             (struct codeview_subtype): Likewise
             (struct codeview_custom_type): Add lf_fieldlist and lf_enum
                 to union.
             (write_cv_integer, cv_integer_len): New functions.
             (write_lf_fieldlist, write_lf_enum): Likewise.
             (write_custom_types): Call write_lf_fieldlist and write_lf_enum.
             (add_enum_forward_def): New function.
             (get_type_num_enumeration_type): Likewise.
             (get_type_num): Handle DW_TAG_enumeration_type DIEs.
             * dwarf2codeview.h (LF_FIELDLIST, LF_INDEX, LF_ENUMERATE): Define.
             (LF_ENUM, LF_CHAR, LF_SHORT, LF_USHORT, LF_LONG): Likewise.
             (LF_ULONG, LF_QUADWORD, LF_UQUADWORD): Likewise.
             (CV_ACCESS_PRIVATE, CV_ACCESS_PROTECTED): Likewise.
             (CV_ACCESS_PUBLIC, CV_PROP_FWDREF): Likewise.
---
  gcc/dwarf2codeview.cc | 524 ++++++++++++++++++++++++++++++++++++++++++
  gcc/dwarf2codeview.h  |  17 ++
  2 files changed, 541 insertions(+)


@@ -978,6 +1022,292 @@ write_lf_modifier (codeview_custom_type *t)
    asm_fprintf (asm_out_file, "%LLcv_type%x_end:\n", t->num);
  }
+/* Write a CodeView extensible integer. If the value is non-negative and
+   < 0x8000, the value gets written directly as an uint16_t.  Otherwise, we
+   output two bytes for the integer type (LF_CHAR, LF_SHORT, ...), and the
+   actual value follows.  */
As a follow-up, can you include a brief description of the return value?

Pushed to the trunk.  Thanks!

jeff

Reply via email to