From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFA] W.I.P. AltiVec ppc registers support. Date: Wed, 28 Nov 2001 22:27:00 -0000 Message-ID: <20011129012730.A19781@nevyn.them.org> References: <15365.39495.801289.497931@krustylu.cygnus.com> X-SW-Source: 2001-11/msg00550.html Message-ID: <20011128222700.IYwZdfFcJCEhJvri0uLM150pNkxNhUnK87PeIhpe0ZI@z> On Wed, Nov 28, 2001 at 09:15:35PM -0500, Elena Zannoni wrote: > > AltiVec registers are 32 128-bit wide registers found on the G4 > powerpc processor family. This patch adds some initial support for > such registers to gdb on a linux ppc platform. > > The Altivec registers are not displayed in a normal 'info reg' command > output. They are shown (like fp regs) if one says 'info all' instead. > Furthermore I added a specific 'info power altivec' command to display > just the Altivec registers. (I am not sure that the word 'power' is > the best choice, maybe simply 'ppc' or 'powerpc' is better). This way > the command as just a specific powerpc info command, w/o it being a > generic info command avaliable on every platform. > > If there is no kernel support for ptrace to handle the AltiVec > registers, they will display as 0's. Wait, I knew I was forgetting something important. There is no kernel support for this feature in any public PowerPC kernel tree, and to my knowledge there has been no suggested patch for it on any of the public LinuxPPC forums. As such, the interface to it is still up in the air. I've discussed this with other kernel folk at various times, and the general consensus is that, instead of adding them to the user area and using PEEKUSR, someone should simply implement PTRACE_GETFPXREGS (perhaps just PTRACE_GETXREGS, as the FP does not really apply, but consistency...). We almost never want to fetch just one altivec register, excepting maybe VRSAVE, and GETFPXREGS takes negligibly more time than a single PEEKUSR call. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer