This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA]: New function to supply only one x87 register


> 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 ;-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]