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


Eli Zaretskii <eliz@delorie.com> writes:

> There's a strange asymmetry in i387-nat.c: i387_fill_fsave accepts a
> REGNO argument and can fill only one register's value, but
> i387_supply_fsave cannot.  I needed this to be symmetrical, but I
> didn't want to break existing APIs.  So I added a new function that
> handles one register only.  See below.

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'd really prefer keeping the number of
interfaces as small as possible, and therefore I'd like to avoid
adding the i387_supply_fpreg function.

Mark

PS. Sorry for being so critical about your work.  I really don't want
    to discourage you.  Feel free to show me the code, if you don't
    know what to do with my suggestions.


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