How can i read the stack frames of running process?
- From: harshal <harshalshete@xxxxxxxxx>
- Date: Wed, 17 Oct 2007 03:56:32 -0700
Hi all,
Can we read the stack frame's of the current process.
as we know that whenever a function call is made in c new functions
stack frame
is created and pushed on to the stack. and when the function returns
it is popped out from the stack. i want to know the caller functions
name.
i mean i want something like this
int a()
{
printf("File = %s\n",__FILE__);
/* i want to print the callers name over here. something like this
printf("Caller function = %s\n",__CALLER_FUN__); it should print
b*/
return 0;
}
int b()
{
a();
return 0;
}
int main()
{
b();
}
if there is any way please tell me.
Thanks and Regards
Harshal Shete
.
- Follow-Ups:
- Re: How can i read the stack frames of running process?
- From: Chris Hills
- Re: How can i read the stack frames of running process?
- From: Tor Rustad
- Re: How can i read the stack frames of running process?
- From: Iwo Mergler
- Re: How can i read the stack frames of running process?
- From: karthikbalaguru
- Re: How can i read the stack frames of running process?
- From: karthikbalaguru
- Re: How can i read the stack frames of running process?
- From: karthikbalaguru
- Re: How can i read the stack frames of running process?
- From: karthikbalaguru
- Re: How can i read the stack frames of running process?
- From: karthikbalaguru
- Re: How can i read the stack frames of running process?
- From: karthikbalaguru
- Re: How can i read the stack frames of running process?
- From: Richard Bos
- Re: How can i read the stack frames of running process?
- Prev by Date: AIX C compiler message unexplainable
- Next by Date: Re: C (functional programming) VS C++ (object oriented programming)
- Previous by thread: AIX C compiler message unexplainable
- Next by thread: Re: How can i read the stack frames of running process?
- Index(es):
Relevant Pages
|