Running Gcov on a target, embedded platform

Frank Ch. Eigler fche@redhat.com
Mon Apr 12 20:35:00 GMT 2004


Hi -

<theagees@cablespeed.com> writes:

> I just heard about the GNU coverage tool, gcov. We are using the
> GNU gcc cross compiler for ARM, and running eCos on our embedded system.
> Is there any way to compile and get the coverage statistics when
> running on a non-native platform like this? [...]

Yes, but it's not up to the compiler.  When you request profiling, a
cross-compiling gcc adds the necessary instrumentation to call the
target stdio libraries.  Not gcc, but an RTOS or board support package
library provides these functions to your application, so your question
is more appropriately directed to their mailing lists.

> It seems as if there was a way to have this information sent to the
> gdb stubs mechanism and communicated to the gdb debug port [...]

GDB was extended to tunnel certain stdio calls across a debugging
protocol connection.  The RTOS/BSP supplier may be elect to use these
to transparently enable profiling data gathering.


- FChE



More information about the Gcc mailing list