On 11/17/24 8:40 AM, 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/
        * 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 goes against my patch "Write S_INLINESITE CodeView symbols". I
held off from submitting because I was waiting for the binutils patch to
go in, but I want to get this out there before the code freeze.)
So one of the things we often do in these scenarios is write a configure test which checks if the assembler supports the feature we care about. if not, then we disable the compiler feature that's dependent upon the assembler bits. Look for HAVE_GAS_* and HAVE_AS_*.

I don't have a good sense of how widely the CodeView stuff is being used, so no good sense what the right thing to do WRT that issue would be.


So no concerns on the implementation details, we just need to reach a conclusion on what to do with the assembler dependency.

jeff

Reply via email to