https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110545

            Bug ID: 110545
           Summary: gcda files not generated for some shared libs
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gejoed at rediffmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

I work on a code where shared libs (xxxlib.so) are being used.
During the build --coverage is used (for compiling, linking and for shared
libs) and the .gcno files are generated correctly for the source files
(involved with the shared libs). 
For one particular module, I could find out that gcda files are not getting
generated on the device. As the binary is loaded on the test device, the gcda
files are generated  using __gcov_dump() call and I could see gcda files being
generated for many files. The __gcov_dump() is invoked through a command on the
device and it completes as usual without any error message.
I did a strings check for the libraries of the particular module of interest
(say A123) and the gcda file paths were embedded in them. I saw that the
hardwired path contained relative paths in between like
/topdir/nextdir/A123/subcomp1/src/../../build/subcomp1/src/filename.gcda

I did make sure that the paths for the component gcda files are made on the
device  like both these dir paths (as ../.. was used in the path) :
  /topdir/nextdir/A123/subcomp1/src/ 
  /topdir/nextdir/A123/build/subcomp1/src/
These files get used during the loading of the image and also during the usage
of some show commands on the test device which was done prior to gcov_dump
execution.The directories have the write permission.

However, I could see gcda files getting generated for source files linked with
some other shared libraries( say /topdir/anotherdir/B123/subcomp1/obj-files/ ).


Sorry that I'm not able to give more info on the original files due to the
company policy. Let me know if I need to check anything further for this
specific module or in the execution place/device OR if anything is not clear
with my description here.

Reply via email to