Re: How to trace function calls?

Discussion in 'C Programming' started by user923005, May 30, 2008.

  1. user923005

    user923005 Guest

    On May 29, 7:54 pm, nospam <> wrote:
    > I have a C binary which is built from numerous .c and .h source files.
    > How can I trace through which functions are being called when I execute
    > the binary?  Ideally I'd like to just see the function names accessed.
    > This is on an HP-UX system, but I'm curious as far as Linux is concerned.


    This is C++ code, but you can probably translate the idea to C:
    http://www.codeproject.com/KB/cpp/cmtrace.aspx

    I guess that for your environment, this is what you want:
    http://www.tlug.org.za/wiki/index.php/Obtaining_a_stack_trace_in_C_upon_SIGSEGV
    user923005, May 30, 2008
    #1
    1. Advertising

  2. user923005

    Richard Guest

    user923005 <> writes:

    > On May 29, 7:54 pm, nospam <> wrote:
    >> I have a C binary which is built from numerous .c and .h source files.
    >> How can I trace through which functions are being called when I execute
    >> the binary?  Ideally I'd like to just see the function names accessed.
    >> This is on an HP-UX system, but I'm curious as far as Linux is concerned.

    >
    > This is C++ code, but you can probably translate the idea to C:
    > http://www.codeproject.com/KB/cpp/cmtrace.aspx
    >
    > I guess that for your environment, this is what you want:
    > http://www.tlug.org.za/wiki/index.php/Obtaining_a_stack_trace_in_C_upon_SIGSEGV


    Just FYI also see "strace".
    Richard, May 31, 2008
    #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. Rukmal Fernando
    Replies:
    4
    Views:
    839
    Richard Grimes [MVP]
    Oct 27, 2003
  2. harold fellermann

    trace function calls to get signatures

    harold fellermann, Jul 2, 2005, in forum: Python
    Replies:
    0
    Views:
    256
    harold fellermann
    Jul 2, 2005
  3. Joerg Schoen
    Replies:
    0
    Views:
    447
    Joerg Schoen
    Jun 28, 2004
  4. Thomas Glanzmann

    Tool to trace function calls

    Thomas Glanzmann, Jun 27, 2005, in forum: C Programming
    Replies:
    3
    Views:
    320
    Morris Dovey
    Jun 29, 2005
  5. Bob
    Replies:
    5
    Views:
    253
Loading...

Share This Page