Re: How can i read the stack frames of running process?




"Philip Potter" <pgp@xxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:ff5aea$g83$3@xxxxxxxxxxx
Mark Bluemel wrote:
Philip Potter wrote:
Mark Bluemel wrote:
harshal wrote:
but my question is that if a function can print its name with
__FUNCTION__
macro then why it can not print its callers name.

The __FUNCTION__ macro is handled by the preprocessor and is simply a
textual replacement at compile time. It's not (terribly) difficult for
the preprocessor to track which function it's processing at a time.

I can't find any mention of __FUNCTION__ in n1256. I *can* find
__func__. Is __FUNCTION__ at all standard?

It doesn't matter - the point that needed to be made to the OP was that
macros are processed by the precompiler. The guy didn't need (as far as I
can see) to worry about whether the particular macro he was referring to
was part of the standard.

Yes, that's why I replied to you and not to him. I wasn't nitpicking, I
was asking a question, because I'm not certain enough of Acrobat's
searching functionality to be sure that __FUNCTION__ isn't in there.
__func__ is not a marco

The identifier __func_ _ shall be implicitly declared by the translator as
if,

immediately following the opening brace of each function definition, the
declaration

static const char _ _func_ _[] = "function-name";

appeared, where function-name is the name of the lexically-enclosing
function.61)



Bye, Jojo


.



Relevant Pages

  • Re: How can i read the stack frames of running process?
    ... textual replacement at compile time. ... It's not difficult for the preprocessor to track which function it's processing at a time. ... The guy didn't need to worry about whether the particular macro he was referring to was part of the standard. ...
    (comp.lang.c)
  • Re: How can i read the stack frames of running process?
    ... simply a textual replacement at compile time. ... macro he was referring to was part of the standard. ...
    (comp.lang.c)
  • Re: How can i read the stack frames of running process?
    ... textual replacement at compile time. ... It's not difficult for the preprocessor to track which function it's processing at a time. ... The guy didn't need to worry about whether the particular macro he was referring to was part of the standard. ...
    (comp.lang.c)
  • Wheres the beef?
    ... Is it possible to define a macro substitution in the C++ preprocessor so ... heavily invested in MFC, and certain capabilities (Class Wizard & Browser ... no longer usable under previous development systems. ...
    (microsoft.public.vsnet.ide)
  • Re: Sacla loop: a new loop implementation
    ... way without demanding that the necessary type information is available ... necessary information for the macro to expand. ... > available at compile time" ... A statically typed language is a language where types are known at ...
    (comp.lang.lisp)