gcov can't collect data when process is executed by systemctl start but it can when executed by ./process

Xi Ruoyao ryxi@stu.xidian.edu.cn
Wed Aug 2 09:22:00 GMT 2017


On 2017-08-01 22:55 -0400, Xiaoli Feng wrote:
>   Now I met a issue when start process by systemd:
> 
>      profiling:/root/rpmbuild/BUILD/project/daemon/daemon.gcda:Cannot open
>   
>   I'am sure that the progress have root privilege. I also "chmod 777" this
> directory(daemon). This directory have daemon.c daemon.o daemon.gcno files.
> What else can I check?

I can't reproduce this issue.

I think you should check your unit.service file.  Note that "RootDirectory="
option makes a chroot jail, and "ProtectHome=on" makes /root inaccessible.
-- 
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University



More information about the Gcc-help mailing list