Hi,
Inside a kernel function I want to find which function called that function at run time.
For example: If function x() calls y(), I want to get x's address inside y.
Is there any way without back tracing the stack?
Thanks
Sam
How to find caller address in i386?
- samueldotj
- Member
- Posts: 32
- Joined: Mon Nov 13, 2006 12:24 am
-
- Member
- Posts: 391
- Joined: Wed Jul 25, 2007 8:45 am
- Libera.chat IRC: aejsmith
- Location: London, UK
- Contact:
Re: How to find caller address in i386?
If you're using GCC, you can use the builtin function __builtin_return_address() to get the address of the instruction after the call in x()
- samueldotj
- Member
- Posts: 32
- Joined: Mon Nov 13, 2006 12:24 am