This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]


I am using gcc as a cross compiler (386-linux to powerpc-eabi) to
generate code for an embedded power pc app.  There is no operating
system running on the target and I am using newlib instead of glibc, but
I would still like to do code coverage analysis.  Adding -ftest-coverage
to the compile options generates the necessary .bb and .bbg files.
Adding -fprofile-arcs causes the output code to contain space for the
counts and each basic block has the necessary instructions for properly
incrementing the counts.  Of course, this doesn't work because I get a
few unresolved symbols like "__bb_init_func"

My target doesn't have a filesystem so there is no way to write the .da
files.  What I would like to do is supply my own library of functions to
support -fprofile-arcs so the counts still end up being generated
correctly in memory.  I can then send the .da files over a serial port
back to the host or use the gdb remote protocol to retrieve then and run

I tried to figure out how to do this by looking at the assembly and map
files generated for a simple program using the native compiler (running
RedHat 7.1).  However, I am having a hard time figuring out what
functions I need to supply and what they should do.  I found some of it
in the gcc source code but there aren't many comments.  Is there some
documentation of how this works somewhere?  Can somebody help me figure
it out?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]