|automatic hooks generation email@example.com (Roman Shaposhnick) (2002-11-07)|
|Re: automatic hooks generation firstname.lastname@example.org (Ira Baxter) (2002-11-08)|
|Re: automatic hooks generation email@example.com (Ralph Corderoy) (2002-12-01)|
|From:||"Roman Shaposhnick" <firstname.lastname@example.org>|
|Date:||7 Nov 2002 00:54:02 -0500|
|Keywords:||debug, tools, question|
|Posted-Date:||07 Nov 2002 00:54:02 EST|
I'm looking for any suggestions on what would be the most easy way to
implement something that is similar to "tracing" using existing
compilers like gcc. Let me explain a little bit what I mean by tracing
-- for example, a lot of compilers have a special feature for
testcoverage support. Enabling this during compilation will insert
additional code into your executable which will keep track of how many
times any given linear block of code was executed. When the process is
finished this information can be obtained by looking at a special file
that was created by the runtime part of this feature. Another example
would be prof(1) based approach where we have more coarse information
based on function calls.
What I'm looking for is a logical extension of these methods where I
can ask compiler to put probes ( calls to a specific function ) at
places like entry/exit from functions, etc.
Once approach that I have in mind is a c2c translator, which is not
an excellent option, given that it requires an extra step during a
compilation process and is highly vulnerable to non-portable extensions
implemented by FCC and many others.
Any ideas will be highly appreciated!
Thanks in advance,
[People have done this kind of instrumentation many, many times before.
I'd be surprised if there wasn't a GCC version that does it. -John]
Return to the
Search the comp.compilers archives again.