Subject: Re: deficiency in PowerPC ptrace(2)
To: None <thorpej@wasabisystems.com>
From: Andrew Cagney <cagney@mac.com>
List: port-powerpc
Date: 12/09/2001 22:11:00
> On Sun, Dec 09, 2001 at 11:57:35AM -0800, Jason R Thorpe wrote:
>
> > I am planning to fix the PowerPC ptrace(2) (while still maintaining
> > binary compatibility, possible with some other ptrace(2) infrastructure
> > changes I made last week) to provide register info like so:
> > > struct reg {
> > register_t r_fixreg[32];
> > register_t r_srr0; /* PC */
> > register_t r_srr1; /* MSR */
> > register_t r_lr;
> > register_t r_ctr;
> > register_t r_mq; /* unused on PowerPC */
> > int r_cr;
> > int r_xer;
> > };
The proposal to make the core file layout map the ptrace buffer, I think
is a good move. Many targets use the same functions to unpack both.
I suspect that expanding the size of the ptrace() buffer, however, is a
potential ``you loose'' situtation. Consider what happens if someone
tries to debug a process using an existing (eg 1.5.2) GDB binary. As
far as I know, unless you play around with syscall numbers, that binary
will get the tail end of its ptrace buffer smashed by the request.
The extra registers would be useful though!
enjoy,
Andrew