From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CF38E385AC26; Mon, 4 Dec 2023 10:01:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF38E385AC26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701684074; bh=qFtDM0IBUTfWl0LBXZRt6RLSLxTm+Gl04O9AxubNzY8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GPdSoE6unvBEwwQUypFv+OSKLL97T9MD/8MNqorIumfUABuRfGqKJg0omXirm+6Pg b6SEGo8DiGvzBfrHyP4/C9MVdkXRYkv2RYHrLPIMG0WaWWybo92hmMFkE7wN9VXY+o oUm1IUgn4uc5qRgYaVn67JXufrY7GEDsxckeNWR0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/112768] btf: fix asm comment output for BTF_KIND_FUNC* kinds Date: Mon, 04 Dec 2023 10:01:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: btf-debug, wrong-debug X-Bugzilla-Severity: minor X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: ibhagat at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112768 --- Comment #1 from GCC Commits --- The master branch has been updated by Indu Bhagat : https://gcc.gnu.org/g:9b6e2cb7e61ebb7006a89fa75869ec1a3e0a6e33 commit r14-6111-g9b6e2cb7e61ebb7006a89fa75869ec1a3e0a6e33 Author: Indu Bhagat Date: Mon Dec 4 01:57:25 2023 -0800 BTF: fix PR debug/112768 PR debug/112768 - btf: fix asm comment output for BTF_KIND_FUNC* kinds The patch adds a small function to abstract out the detail and return the name of the type. The patch also fixes the issue of BTF_KIND_FUNC appearing in the comments with a 'null' string. For btf-function-6.c testcase, after the patch: .long 0 # TYPE 2 BTF_KIND_FUNC_PROTO '' .long 0xd000002 # btt_info: kind=3D13, kflag=3D0, vlen= =3D2 .long 0x1 # btt_type: (BTF_KIND_INT 'int') .long 0 # farg_name .long 0x1 # farg_type: (BTF_KIND_INT 'int') .long 0 # farg_name .long 0x1 # farg_type: (BTF_KIND_INT 'int') .long 0 # TYPE 3 BTF_KIND_FUNC_PROTO '' .long 0xd000001 # btt_info: kind=3D13, kflag=3D0, vlen= =3D1 .long 0x1 # btt_type: (BTF_KIND_INT 'int') .long 0x68 # farg_name .long 0x1 # farg_type: (BTF_KIND_INT 'int') .long 0x5 # TYPE 4 BTF_KIND_FUNC 'extfunc' .long 0xc000002 # btt_info: kind=3D12, kflag=3D0, linka= ge=3D2 .long 0x2 # btt_type: (BTF_KIND_FUNC_PROTO '') .long 0xd # TYPE 5 BTF_KIND_FUNC 'foo' .long 0xc000001 # btt_info: kind=3D12, kflag=3D0, linka= ge=3D1 .long 0x3 # btt_type: (BTF_KIND_FUNC_PROTO '') gcc/ChangeLog: PR debug/112768 * btfout.cc (get_btf_type_name): New definition. (btf_collect_datasec): Update dtd_name to the original type name string. (btf_asm_type_ref): Use the new get_btf_type_name function instead. (btf_asm_type): Likewise. (btf_asm_func_type): Likewise. gcc/testsuite/ChangeLog: PR debug/112768 * gcc.dg/debug/btf/btf-function-6.c: Empty string expected with BTF_KIND_FUNC_PROTO.=