Hi, can anybody tell me how to determine the function name at runtime in C/C++. As per my knowledge there is no standard call to find that. But, i suppose there must be some way to find the function name.
Thanx,
vijay
Printable View
Hi, can anybody tell me how to determine the function name at runtime in C/C++. As per my knowledge there is no standard call to find that. But, i suppose there must be some way to find the function name.
Thanx,
vijay
it is stored in debugging information so that debuggers can use it, but it is not available in release versions.
You can, of course, get all your functions to set a string. You might wish to do this, for example, to create a call stack which you can display to the user if an exception is thrown.
This is useful for debugging on systems that don't offer a simple-to-use debugger, eg UNIX.
No simple to use debugger on UNIX? Debuggers don't come much better than good old text based GDB :)
Oliver