]> git.ipfire.org Git - thirdparty/gcc.git/commit
BTF: fix PR debug/112656
authorIndu Bhagat <indu.bhagat@oracle.com>
Mon, 4 Dec 2023 09:57:34 +0000 (01:57 -0800)
committerIndu Bhagat <indu.bhagat@oracle.com>
Mon, 4 Dec 2023 10:00:37 +0000 (02:00 -0800)
commitb6abc5dbfa5342347828b9feb4d9060071ff819c
tree5c9a6a7bc8666b80d9c8a9dcf78cec0da81fbd24
parent9b6e2cb7e61ebb7006a89fa75869ec1a3e0a6e33
BTF: fix PR debug/112656

PR debug/112656 - btf: function prototypes generated with name

With this patch, all BTF_KIND_FUNC_PROTO will appear anonymous in the
generated BTF section.

As noted in the discussion in the bugzilla, the number of
BTF_KIND_FUNC_PROTO types output varies across targets (BPF with -mco-re
vs non-BPF targets).  Hence the check in the test case merely checks
that all BTF_KIND_FUNC_PROTO appear anonymous.

gcc/ChangeLog:

PR debug/112656
* btfout.cc (btf_asm_type): Fixup ctti_name for all
BTF types of kind BTF_KIND_FUNC_PROTO.

gcc/testsuite/ChangeLog:

PR debug/112656
* gcc.dg/debug/btf/btf-function-7.c: New test.
gcc/btfout.cc
gcc/testsuite/gcc.dg/debug/btf/btf-function-7.c [new file with mode: 0644]