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



Philip Potter wrote:
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.

One more reason to use the text version of N869. There is no
__FUNCTION__. However, __func__ does exist.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>



--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • 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)
  • Re: macrology
    ... I'm trying to build a macro, pat-case, which is a case for patterns. ... takes a pattern, and input, and a list of forms to be executed (with ... Should return "LION TIGER" ... which will be all fixed in place at compile time, ...
    (comp.lang.lisp)
  • Re: Open stack and colon definitions as a features (was: Of course it IS!!!)
    ... forth and macro. ... execute at compile time like immediate words did thirty years ... design point I am interested in what it should/could do. ... found I only used each of the instructions RA SA RE SE once!!!! ...
    (comp.lang.forth)
  • Re: Sacla loop: a new loop implementation
    ... >> portably in common lisp, because the facilities just aren't there. ... No, macro expansion is a macroexpand-time operation, which occurs at ... > information must be produced at compile time. ... type information. ...
    (comp.lang.lisp)
  • Re: encrypting with preprocessor
    ... Here is a macro which compute the FNV hash function of the first 32 characters of a litteral string at compile time. ... The original litteral string 'str' does not appear in the binary. ... I let you adapt this macro to do encryption instead of computing hash code. ...
    (comp.lang.c)