Subject: Re: deficiency in PowerPC ptrace(2)
To: None <port-powerpc@netbsd.org>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-powerpc
Date: 12/09/2001 12:37:22
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;
 > 	};
 > 
 > ...and the registers will appear in that format in ELF core dumps, as well.
 > (And, yes, I will update gdb to work with both formats, and auto-detect
 > which format corresponds to PT_GETREGS.)

...I suppose the other option is to leave ptrace(2) alone and just make
the new ELF coredump format use the existing "reg" structure, rather than
the one used by the historic core dump format.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>