Code execution Tracing

Discussion in 'C++' started by Sabiyur, Aug 16, 2006.

  1. Sabiyur

    Sabiyur Guest

    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
     
    Sabiyur, Aug 16, 2006
    #1
    1. Advertising

  2. Sabiyur

    Jim Langston Guest

    "Sabiyur" <> wrote in message
    news:...
    > 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.
     
    Jim Langston, Aug 17, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bruce Wayne

    Re: ASP 3 Debugging and Tracing in VB.Net

    Bruce Wayne, Oct 8, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    729
    Sue Parker
    Oct 30, 2003
  2. Graham Cottle

    Tracing Execution in Class Library

    Graham Cottle, Jan 21, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    379
    Daniel Bass
    Jan 21, 2004
  3. Michael B. Trausch

    Tracing the execution of scripts?

    Michael B. Trausch, Oct 27, 2006, in forum: Python
    Replies:
    10
    Views:
    476
    Ben Finney
    Oct 28, 2006
  4. Nikhil

    Dynamic tracing of C code execution

    Nikhil, May 12, 2006, in forum: C Programming
    Replies:
    5
    Views:
    1,632
    Frank Pittel
    May 16, 2006
  5. Jarek Blakarz

    tracing code line executions

    Jarek Blakarz, Sep 26, 2013, in forum: C++
    Replies:
    3
    Views:
    394
    Öö Tiib
    Sep 27, 2013
Loading...

Share This Page