aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2023-12-04 01:57:25 -0800
committerIndu Bhagat <indu.bhagat@oracle.com>2023-12-04 01:57:25 -0800
commit9b6e2cb7e61ebb7006a89fa75869ec1a3e0a6e33 (patch)
treee1f68474e4b10f6946c725420192534eb25c275c /gcc/function.h
parent462ccc3b9d5625cdc6104322a417bcd1ff1a8ff4 (diff)
downloadgcc-9b6e2cb7e61ebb7006a89fa75869ec1a3e0a6e33.zip
gcc-9b6e2cb7e61ebb7006a89fa75869ec1a3e0a6e33.tar.gz
gcc-9b6e2cb7e61ebb7006a89fa75869ec1a3e0a6e33.tar.bz2
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=13, kflag=0, vlen=2 .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=13, kflag=0, vlen=1 .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=12, kflag=0, linkage=2 .long 0x2 # btt_type: (BTF_KIND_FUNC_PROTO '') .long 0xd # TYPE 5 BTF_KIND_FUNC 'foo' .long 0xc000001 # btt_info: kind=12, kflag=0, linkage=1 .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.
Diffstat (limited to 'gcc/function.h')
0 files changed, 0 insertions, 0 deletions