From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: rth@twiddle.net, amodra@bigpond.net.au, gdb-patches@gcc.gnu.org
Subject: Re: ppc32 debugging ppc64, part 1
Date: Mon, 12 Sep 2005 20:32:00 -0000 [thread overview]
Message-ID: <20050912203220.GA10796@nevyn.them.org> (raw)
In-Reply-To: <200509121947.j8CJlT1H030779@elgar.sibelius.xs4all.nl>
On Mon, Sep 12, 2005 at 09:47:29PM +0200, Mark Kettenis wrote:
> Hmm, this is really odd. From what I see above and the changes to the
> code you made, the implementation of ptrace seems to be just plain
> broken, either in the kernel or in glibc, probably both.
>
> Anyway, I'd really like to see people moving away from using
> PTRACE_XFER_TYPE and PTRACE_ARG3_TYPE in favour of PTRACE_TYPE_RET and
> PTRACE_TYPE_ARG3. I wouldn't be surprised if it became clear what's
> wrong with ptrace(2) on Linux ppc if you realize that PTRACE_XFER_TYPE
> really is the return type of ptrace(2).
>
> This code really should be using PTRACE_GETREGS and friends (like you
> indicate in the patch) but those are not implemented I assume?
>
> I'd really wish this would be fixed in the kernel, instead of being
> worked around in GDB :-(.
Mark, you seem to be very big on assuming GNU/Linux systems are broken;
I'm sensing a real recurring theme here. Could you explain exactly
what it is that you think is broken now?
Richard's trying to do something fairly different from GDB's ordinary
usage model of ptrace here. PTRACE_PEEKDATA_3264 allows a 32-bit
process to request four bytes of memory from the inferior by specifying
a full 64-bit address. If I'm reading it right, it does this by
passing the address by reference, instead of in arg3. Similarly
there's a way to read the 64-bit registers in two different 32-bit
pieces.
Hmm, this is a much cleaner way than I'd been using for MIPS n32. That
bears some thinking about.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-09-12 20:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-12 12:52 Richard Henderson
2005-09-12 19:47 ` Mark Kettenis
2005-09-12 20:32 ` Daniel Jacobowitz [this message]
2005-09-12 21:07 ` David S. Miller
2005-09-12 21:20 ` Mark Kettenis
2005-09-12 22:37 ` Richard Henderson
2005-09-12 23:20 ` Richard Henderson
2005-09-12 22:39 ` Richard Henderson
2005-09-17 21:24 ` Daniel Jacobowitz
2005-09-18 2:02 ` Richard Henderson
2005-09-18 2:14 ` Daniel Jacobowitz
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=20050912203220.GA10796@nevyn.them.org \
--to=drow@false.org \
--cc=amodra@bigpond.net.au \
--cc=gdb-patches@gcc.gnu.org \
--cc=mark.kettenis@xs4all.nl \
--cc=rth@twiddle.net \
/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