Archived:Getting the name of the current function in Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Tested with
Devices(s): All (S60)
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Keywords: RDebug, __func__
Created: User:Technical writer 2 (June 25, 2007, updated December 17, 2008)
Last edited: hamishwillee (29 Jun 2012)

The name of the current function can be retrieved for logging purposes in debug builds with the __func__ predefined identifier:

  void LogFunctionName(const char* name)
RDebug::Printf("current function: %s\n", name);

Now the function name can be printed as follows:


See also

Simple-to-use Symbian C++ macros for writing debug log files

This page was last modified on 29 June 2012, at 05:03.
32 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.