]> git.ipfire.org Git - thirdparty/gcc.git/commit
Don't output CodeView line numbers for inlined functions
authorMark Harmstone <mark@harmstone.com>
Tue, 19 Nov 2024 00:52:55 +0000 (00:52 +0000)
committerMark Harmstone <mark@harmstone.com>
Sat, 30 Nov 2024 14:53:42 +0000 (14:53 +0000)
commite908efbf2061c0ad46caed47a54222e894ac2d29
tree1fe7074fefb0b7b23c5b201f15434167754bd0dd
parent4ed189854eae2d243557c9405f654bd9a16dadaa
Don't output CodeView line numbers for inlined functions

If we encounter an inlined function, treat it as another
codeview_function, and skip over these when outputting line numbers.
This information will instead be output as part of the S_INLINESITE
symbols.

gcc/
* dwarf2codeview.cc (struct codeview_function): Add parent and
inline_block fields.
(cur_func): New global variable.
(new_codeview_function): New function.
(codeview_source_line): Call new_codeview_function, and use cur_func
instead of last_func.
(codeview_begin_block): New function.
(codeview_end_block): New function.
(write_line_numbers): No longer free data as we go along.
(codeview_switch_text_section): Call new_codeview_function, and use
cur_func instead of last_func.
(codeview_end_epilogue): Use cur_func instead of last_func.
(codeview_debug_finish): Free funcs list and its contents.
* dwarf2codeview.h (codeview_begin_block): Add declaration.
(codeview_end_block): Add declaration.
* dwarf2out.cc (dwarf2out_begin_block): Call codeview_begin_block if
outputting CodeView debug info.
(dwarf2out_end_block): Call codeview_end_block if outputting CodeView
debug info.
gcc/dwarf2codeview.cc
gcc/dwarf2codeview.h
gcc/dwarf2out.cc