https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113453

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Cupertino Miranda <[email protected]>:

https://gcc.gnu.org/g:bf3a264121fe3ba1ed69eda7a11951d10e8c4ae5

commit r16-7846-gbf3a264121fe3ba1ed69eda7a11951d10e8c4ae5
Author: Cupertino Miranda <[email protected]>
Date:   Wed Feb 25 18:04:56 2026 +0000

    bpf: add line_info support to BTF.ext section

    This patch adds line_info debug information support to .BTF.ext
    sections.

    Line info information is used by the BPF verifier to improve error
    reporting and give more precise source code referenced errors.

    gcc/ChangeLog:
            PR target/113453
            * config/bpf/bpf-protos.h (bpf_output_call): Change prototype.
            * config/bpf/bpf.cc (bpf_output_call): Change to adapt operands
            and return
            the instruction template instead of immediately emit asm and
            not allow proper final expected execution flow.
            (bpf_output_line_info): Add function to introduce line info
            entries in respective structures
            (bpf_asm_out_unwind_emit): Add function as hook to
            TARGET_ASM_UNWIND_EMIT. This hook is called before any
            instruction is emitted.
            * config/bpf/bpf.md: Change calls to bpf_output_call.
            * config/bpf/btfext-out.cc (struct btf_ext_lineinfo): Add fields
            to struct.
            (bpf_create_lineinfo, btf_add_line_info_for): Add support
            function to insert line_info data in respective structures.
            (output_btfext_line_info): Function to emit line_info data in
            .BTF.ext section.
            (btf_ext_output): Call output_btfext_line_info.
            * config/bpf/btfext-out.h: Add prototype for
            btf_add_line_info_for.

    gcc/testsuite/ChangeLog:
            PR target/113453
            * gcc.target/bpf/btfext-funcinfo.c: Adapt test.
            * gcc.target/bpf/btfext-lineinfo.c: New test.

Reply via email to