This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Request for more info out of __FUNCTION__
- To: scherrey at proteus-tech dot com
- Subject: Re: Request for more info out of __FUNCTION__
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Wed, 02 Feb 2000 14:18:34 -0500
- cc: gcc <gcc at gcc dot gnu dot org>
>>>>> Benjamin Scherrey writes:
Benjamin> I have a little debug macro that displays where in my code I happen to
Benjamin> be. It uses the __FILE__, __LINE__, and __FUNCTION__ compile-time
Benjamin> variables to show me where the code is executing. One thing I would
Benjamin> find very useful is if the __FUNCTION__ variable would show methods as
Benjamin> "class::function" instead of just "function" as the messages kinda get
Benjamin> hard to differentiate when going through class hierarchies or
Benjamin> templated methods. Is this something that could easily be changed?
Have you looked at the __PRETTY_FUNCTION__ macro provided by GCC?
See "Function Names as Strings" under "C Extensions" in the GCC
documentation.
David