Code execution Tracing

S

Sabiyur

Hi All,
I don't know whether this is the right forum to post this
question.
If not, Please forgive me.

I want to write my own tool which can trace the code execution (print
the sequence of function execution into a file).
But I cannot change the source code. (i.e.) I cannot write some Trace
macros
into source code.

I don't have idea on how to do that?
How does some process can trance the execution of other process?
I know some tools like Rational -Purecoverage is doing that.
How it does?
Any help welcome.

Thanks
Sabiyur
 
J

Jim Langston

Sabiyur said:
Hi All,
I don't know whether this is the right forum to post this
question.
If not, Please forgive me.

I want to write my own tool which can trace the code execution (print
the sequence of function execution into a file).
But I cannot change the source code. (i.e.) I cannot write some Trace
macros
into source code.

I don't have idea on how to do that?
How does some process can trance the execution of other process?
I know some tools like Rational -Purecoverage is doing that.
How it does?
Any help welcome.

Thanks
Sabiyur

Sounds like you want to write your own debugger, but only write the
functions into a file. This is compiler specific but when you compile in
debug code there are "hooks" that are generated that the debugger can catch
and flow accordingly.

You'll need to look at your specific compiler I believe. If you are using
an open source compiler it should be a lot easier.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top