This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ppc32 debugging ppc64, part 1


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]