From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H . J . Lu" To: gdb@sources.redhat.com Subject: Re: prgregset_t vs gdb_gregset_t on Linux: not the same! Date: Fri, 08 Jun 2001 22:14:00 -0000 Message-id: <20010608221452.B3344@lucon.org> References: <20010608132730.A4056@nevyn.them.org> <20010608155907.A21698@nevyn.them.org> X-SW-Source: 2001-06/msg00061.html On Fri, Jun 08, 2001 at 03:59:07PM -0700, Daniel Jacobowitz wrote: > On Fri, Jun 08, 2001 at 01:27:30PM -0700, Daniel Jacobowitz wrote: > > In proc-service.c, we call fill_gregset and supply_gregset with a > > prgregset_t cast to a gdb_gregset_t *. The problem is, they really are > > different. We can mostly get away with this, because in almost all cases > > glibc won't do anything with the gregset except pass it back to gdb again > > (if the process has terminated, it will memset something the size of a > > prgregset_t, though...). > > The matching question here is that core-regset.c's fetch_core_registers > calls supply_gregset with a gregset_t, but supply_gregset is prototyped > with a gdb_gregset_t. That doesn't work very well either. I believe your Linux/MIPS patch is wrong. Please follow the examples in linux/alpha, linux/i386 and linux/ppc. Basically, you have to include config/tm-linux.h and config/nm-linux.h from the linux/mips header files. But in order to do that, please make sure you do #include #include not #include "nm-linux.h" #include "tm-linux.h" Otherwise, you may not get the header files you want since mips has both liltle and big endians. Once you have done that, your problem should go away. H.J.