ptrace behavior accessing ar.lc and ar.ec
Hi folks,
I'm using the ptrace interface to create a "architectural" processor state tracing tool. When I access AR.LC and AR.EC, I *usually* get the expected result, but every once and a while it returns a bogus result.
Is there a known bug, or am I using ptrace incorrectly?
Here's how its used:
lc = ptrace (PTRACE_PEEKUSER, state->pid, PT_AR_LC, 0);
The tracing program observes some sort of behavior like:
mov.i ar.lc = r61 (I'm pretty sure r61 is 6), and
ptrace returns 0
sxt4 r22=r60 ptrace returns -1 ..... " (swp kernel code) " ..... "
br.ctop.sptk.few .b9 ptrace returns -1, br taken (p17) st8 [r15]=r34 ptrace returns 5
Many thanks,
-Wei
==************************************************************
Weihaw Chuang
[email protected]
************************************************************
__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com
Quoted 9 lines
Hi folks,
I'm using the ptrace interface to create a "architectural" processor state tracing tool. When I access AR.LC and AR.EC, I *usually* get the expected result, but every once and a while it returns a bogus result.Is there a known bug, or am I using ptrace incorrectly?
Not a known bug.
Quoted 7 lines
Here's how its used:
lc = ptrace (PTRACE_PEEKUSER,state->pid,PT_AR_LC, 0);The tracing program observes some sort of behavior like:
Quoted 8 lines
mov.i ar.lc = r61 (I'm pretty sure r61 is 6), and
ptrace returns 0sxt4 r22=r60 ptrace returns -1 ..... " (swp kernel code) " ..... "br.ctop.sptk.few .b9 ptrace returns -1, br taken (p17) st8 [r15]=r34 ptrace returns 5
Do you have a self-contained and small test program that reproduces the problem? That would make it easier to investigate the problem.
--david
Hi Wei,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Fri, 25 Jan 2002 08:43:28 -0800 (PST), [email protected] said:
Wei> Hi David, Thanks for replying. Here's a reduced testcase that Wei> replicates the result. Its derived from the utrace.c program Wei> you gave me a long time ago.
I can't reproduce the problem with 2.4.17.
Wei> I'm currently using "Linux version 2.4.3-12smp" "Red Hat Linux Wei> 7.1 2.96-85".
That's a very old kernel. Can you try after upgrading to something more recent?
Thanks,
--david