From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Jason Thorpe Cc: Kevin Buettner , gdb-patches@sources.redhat.com Subject: Re: RFA: handle missing fpregs Date: Mon, 10 May 2004 22:16:00 -0000 Message-id: References: <20040507131804.7c9325d6@saguaro> <20040507155610.43b806ff@saguaro> X-SW-Source: 2004-05/msg00312.html Jason Thorpe writes: > On May 10, 2004, at 12:00 PM, Jim Blandy wrote: > > > Actually, I just realized that the NetBSD stuff needs Jason Thorpe's > > approval. Since the change needs to go in all at once or not at all, > > I've backed out whole change, pending Jason's review. > > Sorry for the delay -- I was traveling when you sent the mail. > > I've just looked over the patches. These bits are problematic: > > + /* FIXME: jimb/2004-05-05: Some PPC variants don't have > + floating-point registers. For such variants, > + tdep->ppc_fp0_regnum and tdep->ppc_fpscr_regnum will be -1. I > + don't think NetBSD runs on any of those chips, but we can at > + least make sure that if someone tries it, they'll get a proper > + notification. */ > > NetBSD does, in fact, run on the IBM405 and other FPU-less PowerPC > variants. We have an FPU emulation module in the kernel that provides > compatibility with PowerPC variants that have FPUs, but we can also > build the system for soft-float only. Thanks for looking at this. How about changing the comment to this: /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating point registers. Traditionally, GDB's register set has still listed the floating point registers for such machines, so this code is harmless. However, the new E500 port actually omits the floating point registers entirely from the register set --- they don't even have register numbers assigned to them. It's not clear to me how best to update this code, so this assert will alert the first person to encounter the NetBSD/E500 combination to the problem. */ How is the change to the code itself? The present code, if run when the current architecture is the E500, will just inappropriate numbers for the floating-point registers and hit the assert in regcache_raw_supply, if you're lucky. So the change is an improvement over the current state of affairs.