Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@wins.uva.nl>
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	[thread overview]
Message-ID: <200102091655.f19GtFK06000@debye.wins.uva.nl> (raw)
In-Reply-To: <200102091459.JAA00914@indy.delorie.com>

   Date: Fri, 9 Feb 2001 09:59:15 -0500 (EST)
   From: Eli Zaretskii <eliz@delorie.com>

   > From: Mark Kettenis <kettenis@wins.uva.nl>
   > 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


  reply	other threads:[~2001-02-09  8:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-08 10:28 Eli Zaretskii
2001-02-09  5:47 ` Mark Kettenis
2001-02-09  6:59   ` Eli Zaretskii
2001-02-09  8:55     ` Mark Kettenis [this message]
2001-02-10  3:42       ` Eli Zaretskii
2001-02-10 14:59         ` Mark Kettenis
2001-02-16  9:33           ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200102091655.f19GtFK06000@debye.wins.uva.nl \
    --to=kettenis@wins.uva.nl \
    --cc=eliz@is.elta.co.il \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox