Hi all
I have a function and it is being called by many other functions. Is there any method or macro which can return the function name which calls the current function.
EX:
int a()
{
pintf (<required a macro for printing the caller function name>);
/* do operation */
}
int b()
{
/* do operation */
a();
/* do operation */
}
int c()
{
/* do operation */
a();
/* do operation */
}
....
....
....
int main()
{
/* do operation */
a();
b();
c();
/* do operation */
}
Please help me, its very urgent for my assignment debugging.
Thanks in advance
Kandarpa