Re: How can i read the stack frames of running process?
- From: Mark Bluemel <mark_bluemel@xxxxxxxxx>
- Date: Wed, 17 Oct 2007 13:56:07 +0100
harshal wrote:
On Oct 17, 4:09 pm, r...@xxxxxxxxxxxxxxxxxxxxxx (Richard Bos) wrote:
Can you please explain this in simple words.OK - simple words follow:-
It is very difficult to do in any particular implementation.
It is impossible to produce a general solution.
from what you are saying it looks like it is nearly impossible.
That's about right.
but my question is that if a function can print its name with
__FUNCTION__
macro then why it can not print its callers name.
The __FUNCTION__ macro is handled by the preprocessor and is simply a textual replacement at compile time. It's not (terribly) difficult for the preprocessor to track which function it's processing at a time.
actually i thought of this thing because i want to resolve some memory
leak issues.
It can be a useful approach. But unless someone else has already implemented it, it won't be at all easy...
and for that purpose i was thinking to print the callers name in
kmalloc.
I've never heard of kmalloc...
by the way i am using eCos as operating system.
Then perhaps you could ask in a newsgroup or forum related to that operating system.
.
- Follow-Ups:
- Re: How can i read the stack frames of running process?
- From: Philip Potter
- Re: How can i read the stack frames of running process?
- References:
- How can i read the stack frames of running process?
- From: harshal
- 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?
- From: harshal
- How can i read the stack frames of running process?
- Prev by Date: Re: How can i read the stack frames of running process?
- Next by Date: Re: How can i read the stack frames of running process?
- Previous by thread: Re: How can i read the stack frames of running process?
- Next by thread: Re: How can i read the stack frames of running process?
- Index(es):
Relevant Pages
|