On 11/30/24 3:39 PM, Mark Harmstone wrote:
Add "binary annotations" at the end of CodeView S_INLINESITE symbols,
which are a series of compressed integers that represent how line
numbers map to addresses.

This requires assembler support; you will need commit b3aa594d ("gas:
add .cv_ucomp and .cv_scomp pseudo-directives") in binutils.

gcc/
        * configure.ac (HAVE_GAS_CV_UCOMP): New check.
        * configure: Regenerate.
        * config.in: Regenerate.
        * dwarf2codeview.cc (enum binary_annotation_opcode): Define.
        (struct codeview_function): Add htab_next and inline_loc;
        (struct cv_func_hasher): Define.
        (cv_func_htab): New global variable.
        (new_codeview_function): Add new codeview_function to hash table.
        (codeview_begin_block): Record location of inline block.
        (codeview_end_block): Add dummy source line at end of inline block.
        (find_line_function): New function.
        (write_binary_annotations): New function.
        (write_s_inlinesite): Call write_binary_annotations.
        (codeview_debug_finish): Delete cv_func_htab.
---
This second version adds a configure check for .cv_ucomp in the
assembler, and prevents the binary annotations from being emitted if
it's not supported. There's no separate check for .cv_scomp, as the same
binutils commit introduced them both.
OK.
Jeff

Reply via email to