From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: eliz@is.elta.co.il Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA]: New function to supply only one x87 register Date: Fri, 09 Feb 2001 08:55:00 -0000 Message-id: <200102091655.f19GtFK06000@debye.wins.uva.nl> References: <200102081828.NAA25559@indy.delorie.com> <200102091459.JAA00914@indy.delorie.com> X-SW-Source: 2001-02/msg00153.html Date: Fri, 9 Feb 2001 09:59:15 -0500 (EST) From: Eli Zaretskii > From: Mark Kettenis > Date: 09 Feb 2001 14:47:25 +0100 I don't know enough about GDB's register cache to feel safe with such assumptions. What I'm trying to do is be consistent with the documented API. Since target.h's `to_fetch_registers' method says "fetch register REGNO, or all regs if regno == -1", I'm trying to do just that and nothing else. Isn't it dangerous to have functions in the infrastructure with built-in implicit assumptions that are not documented anywhere, and only hold because the current application-level code does what it does? Of course it is, but in this particular case it is wide-spread. All systems with a SVR4-like /proc file system do this, as well as most systems that have a ptrace request that fetches a whole bunch of registers in one go. By supplying all those registers at once, the cache becomes some sort of read-ahead cache. This makes sense since GDB hardly ever needs only one register, and pre-fetching those saves a few system calls. This probably doesn't matter much on go32, but I think you should do it anyway, at least for the FPU. We probably should document this somewhere. Mark