tracing function calls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DigitalDragon

    tracing function calls

    hi,

    i would like to trace the function that called the "current" function. i
    need a type char name of that function. is that posibile?

    eg.

    void function()
    {
    char string[256];
    GetCallerName(s tring);
    printf(string);
    }

    void call()
    {
    function();
    }

    --
    --------------------------------
    Kre¹imir ©pes
    B.B. & Idol Graphics
    http:// bb.gamer.hr


  • Rolf Magnus

    #2
    Re: tracing function calls

    DigitalDragon wrote:
    [color=blue]
    > hi,
    >
    > i would like to trace the function that called the "current" function.
    > i need a type char name of that function. is that posibile?[/color]

    Not with standard C++.

    Comment

    • Jesper Madsen

      #3
      Re: tracing function calls

      There is a macro called __FUNCTION__ or __PRETTYFUNCTIO N__, but it is not
      standard C++, I know for sure Visual C++ 6 does not implement it, but Visual
      C++ 7, MW CodeWarrior and GCC does.. So when VC6 is phased out it will be
      defacto standard i guess..

      "DigitalDra gon" <kresimir.spes@ zg.hinet.hr> wrote in message
      news:bh63jd$61n $1@ls219.htnet. hr...[color=blue]
      > hi,
      >
      > i would like to trace the function that called the "current" function. i
      > need a type char name of that function. is that posibile?
      >
      > eg.
      >
      > void function()
      > {
      > char string[256];
      > GetCallerName(s tring);
      > printf(string);
      > }
      >
      > void call()
      > {
      > function();
      > }
      >
      > --
      > --------------------------------
      > Kre¹imir ©pes
      > B.B. & Idol Graphics
      > http:// bb.gamer.hr
      >
      >[/color]


      Comment

      Working...