From: supriya kannery <supriyak@in.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, David Woodhouse <dwmw2@infradead.org>
Subject: Re: Incorrect order of last two arguments of ptrace for requests PPC_PTRACE_GETREGS, SETREGS, GETFPREGS, SETFPREGS
Date: Thu, 23 Nov 2006 12:40:30 +0530 [thread overview]
Message-ID: <45654966.2050108@in.ibm.com> (raw)
In-Reply-To: <1164231343.5653.30.camel@localhost.localdomain>
Benjamin Herrenschmidt wrote:
>On Wed, 2006-11-22 at 18:36 +0000, David Woodhouse wrote:
>
>
>>On
>>
>>
>>>This is because PPC_PTRACE_GETREGS option for powerpc is implemented
>>>such that general purpose
>>>registers of the child process get copied to the address variable
>>>instead of data variable. Same is
>>>the case with other PPC request options PPC_PTRACE_SETREGS, GETFPREGS
>>>and SETFPREGS.
>>>
>>>Prepared a patch for this problem and tested with 2.6.18-rc6 kernel.
>>>This patch can be applied directly to 2.6.19-rc3 kernel.
>>>
>>>
>>A more appropriate place to send this would be the linux-ppc development
>>list.
>>
>>
>
>Also it's possible that existing code like gcc relies on that "feature"
>no ?
>
>Ben.
>
>
>
>
Thanks David for posting this in ppc-dev list.
I checked in GDB and ltrace which uses ptrace(). None of them are
using PPC_PTRACE* options to get register values. The reasons for its
less (or no) usage could be
1. These options are not documented in manpage
2. The usage is different from the general format of ptrace
3. These are used for copying all the registers. Most applications will
require data from a single addr/register at a time and can get this data
from a specific register/address using PEEKTEXT or POKETEXT options.
Supriya
next prev parent reply other threads:[~2006-11-23 6:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <453F421A.6070507@in.ibm.com>
2006-11-22 18:36 ` Incorrect order of last two arguments of ptrace for requests PPC_PTRACE_GETREGS, SETREGS, GETFPREGS, SETFPREGS David Woodhouse
2006-11-22 21:35 ` Benjamin Herrenschmidt
2006-11-23 7:10 ` supriya kannery [this message]
2006-12-04 21:58 ` Anton Blanchard
2007-04-30 5:42 ` Paul Mackerras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45654966.2050108@in.ibm.com \
--to=supriyak@in.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=dwmw2@infradead.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).