This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: ppc32 debugging ppc64, part 1
- From: Daniel Jacobowitz <drow at false dot org>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: amodra at bigpond dot net dot au, gdb-patches at gcc dot gnu dot org
- Date: Sat, 17 Sep 2005 17:24:03 -0400
- Subject: Re: ppc32 debugging ppc64, part 1
- References: <20050912125047.GA5411@twiddle.net>
On Mon, Sep 12, 2005 at 05:50:47AM -0700, Richard Henderson wrote:
> This is just enough modifications to not immediately fail
> debugging a 64-bit process from a 32-bit debugger.
> * ppc-linux-nat.c (PTRACE_XFER_TYPE): Set to long.
You don't need this; PTRACE_TYPE_RET should work OK. We get that from
autoconf (even if the autoconf bits are a bit broken on Linux at the
moment, they'll choose long anyway).
> (ppc_register_u_addr): Compute wordsize correctly for 64-bit target.
> (ptrace_read_u, ptrace_write_u): New.
> (fetch_register): Simplify. Use PPC_PTRACE_PEEKUSR_3264 when needed.
> (store_register): Similarly with PPC_PTRACE_POKEUSR_3264.
> (default_xfer_partial, ppc32_linux_xfer_partial): New.
> (_initialize_ppc_linux_nat): Use them.
The rest of this I'm basically OK with, although it needs to go past
Kevin or Andrew.
I think it's safe to do away with the syscalls; the current userspace
ptrace interface where glibc has to special-case PEEKTEXT/PEEKDATA/PEEKUSER
is nasty enough, so I'm willing to declare glibc broken if it is ever
"fixed" to handle the PEEK*_3264 operations specially. Just my two
cents.
--
Daniel Jacobowitz
CodeSourcery, LLC