[Bug gcov-profile/96092] New: Should --coverage respect -ffile-prefix-map?
i at maskray dot me
gcc-bugzilla@gcc.gnu.org
Tue Jul 7 05:20:11 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96092
Bug ID: 96092
Summary: Should --coverage respect -ffile-prefix-map?
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
Assignee: unassigned at gcc dot gnu.org
Reporter: i at maskray dot me
CC: marxin at gcc dot gnu.org
Target Milestone: ---
% gcc-10 -ffile-prefix-map=/tmp/c=/src --coverage -c -g /tmp/c/a.c
# -ffile-prefix-map implies -fdebug-prefix-map
% llvm-dwarfdump -debug-info a.o | grep /src
DW_AT_name ("/src/a.c")
DW_AT_comp_dir ("/src")
DW_AT_decl_file ("/src/a.c")
# --coverage is not affected
% r2 -qc 'pxw `?v $s`' a.gcno
0x00000000 0x67636e6f 0x42303065 0x27b4c272 0x00000002 oncge00Br..'....
0x00000010 0x706d742f 0x0000632f 0x00000001 0x01000000 /tmp/c..........
0x00000020 0x0000000f 0x067072eb 0x40058857 0xdb5de9e8 .....rp.W..@..].
0x00000030 0x00000002 0x6e69616d 0x00000000 0x00000000 ....main........
0x00000040 0x00000003 0x706d742f 0x612f632f 0x0000632e ..../tmp/c/a.c..
0x00000050 0x00000001 0x00000005 0x00000001 0x0000000c ................
0x00000060 0x01410000 0x00000001 0x00000004 0x01430000 ..A...........C.
0x00000070 0x00000003 0x00000000 0x00000002 0x00000004 ................
0x00000080 0x01430000 0x00000003 0x00000002 0x00000003 ..C.............
0x00000090 0x00000005 0x01430000 0x00000003 0x00000003 ......C.........
0x000000a0 0x00000001 0x00000001 0x01450000 0x00000009 ..........E.....
0x000000b0 0x00000002 0x00000000 0x00000003 0x706d742f ............/tmp
0x000000c0 0x612f632f 0x0000632e 0x00000001 0x00000000 /c/a.c..........
0x000000d0 0x00000000
I created this issue because I saw a clang-side proposal
https://reviews.llvm.org/D83154 (add -fcoverage-prefix-map) today.
More information about the Gcc-bugs
mailing list