This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: New function to supply only one x87 register
- To: kettenis at wins dot uva dot nl
- Subject: Re: [RFA]: New function to supply only one x87 register
- From: Eli Zaretskii <eliz at delorie dot com>
- Date: Fri, 9 Feb 2001 09:59:15 -0500 (EST)
- CC: gdb-patches at sources dot redhat dot com
- References: <200102081828.NAA25559@indy.delorie.com> <s3izofwklxu.fsf@debye.wins.uva.nl>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> From: Mark Kettenis <kettenis@wins.uva.nl>
> Date: 09 Feb 2001 14:47:25 +0100
>
> Hmm, the asymmetry you're seeing is the same asymmetry that exists
> between supply_gregset() and fill_gregset(). Ultimately this
> asymmetry stems from the fact that GDB's register cache is a
> write-through cache (at least that's what I think). This means that
> it never hurts to supply the full FSAVE/FXSAVE info even if only one
> register is requested, and that is what all other targets that use the
> stuff from i387-nat.c do. Is there a compelling reason you cannot do
> the same in the go32 target?
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?
> PS. Sorry for being so critical about your work. I really don't want
> to discourage you.
No need to apologize. The whole point of an RFA is to draw as much
``friendly fire'' as possible ;-)