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

Similar Threads

Tracing Perl 0
Code sharing 2
Age gate code 0
Functioning website now fails 0
Tracing an address 1
How to fix this code? 1
Can D simulated by H terminate normally? 4
Code help please 4

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top