carpathian_wolf n00b
Joined: 28 Apr 2005 Posts: 6
|
Posted: Fri Jul 08, 2005 3:05 pm Post subject: PTrace on PPC (how can i get the PC/IP??) |
|
|
Well, first of all this isn't strictly anything to do with Gentoo... But since I'm using Gentoo and Gentoo users are generally knowledgeable about this stuff...
Has anyone used the PPC implementation of the PTrace system call? I have used it with great success on x86, x86_64 & sparc to produce dynamic program traces however I'm running into a problem on PPC. All I really need to do is use the memory reading methods of PTrace (PEEK_TEXT) to read a child process' text BUT I want to read words from memory at the location of the PC/IP (program counter/instruction pointer). On the previously mentioned architecture this was achieved by using the value stored inside the appropriate register returned by the GET_REGS flag as a parameter to PTrace, however it seems the PPC implementation doesn't include this exactly (No GET_REGS flag and I've looked at the source code ptrace.c in the kernel source).
Could a PPC geek help me please?! How can I get the value of the PC/IP on ppc during a ptrace step?
I'm not familiar with the specifics of the ppc arch but I should be able to keep up with any technical information you provide.
Thanks in advance to all those (any?) who can help! |
|