On Fri, Dec 02, 2005 at 16:56:11 +0530, Saumender Dash wrote:
Well, you can freely access the userland memory (ok, you have to use
copy_from_user and such to handle page faults for you) and you have the
stack pointer available in the task struct, which you obtain from
current. The rest is making sense out of that stack.
I'm geting the stack pointer in the kernel, and unwind the stack till it's
empty or I get the program text
and report the PC. The thing is I should be able to report the correct PC,
for a perticular sys call, in a program. But I'm missing out something in
this, which is my concern. Any pointer on that will
simply be great.
That being said, I don't really think you should do this from kernel.
My requirement is in the kernel space. I will use the derived PC to be used
in the other part of the
KLM. So doing it from user space is not the idea.
--
Jan 'Bulb' Hudec <bulb@xxxxxx>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/