Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@cygnus.com>
To: Elena Zannoni <ezannoni@cygnus.com>, gdb@sources.redhat.com
Subject: Re: What's the correct type for {supply,fill}_fpregset?
Date: Fri, 09 Nov 2001 02:05:00 -0000	[thread overview]
Message-ID: <1011120174021.ZM18927@ocotillo.lan> (raw)
In-Reply-To: Elena Zannoni <ezannoni@cygnus.com> "What's the correct type for {supply,fill}_fpregset?" (Nov 20, 11:50am)

On Nov 20, 11:50am, Elena Zannoni wrote:

> Is the type of {supply,fill}_fpregset's argument wrong? It matches
> what in gregset.h, but few other *-linux-nat.c declare those functions
> the same way ppc-linux-nat.c does.
> 
> The defintions in use are from ppc-linux-nat.c:
> void fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
> void supply_fpregset (gdb_fpregset_t * fpregsetp)
> 
> Or should the calls in thread-db.c be changed?

This has frequently been a source of annoyance for me and I had never
really taken a close look to see how things ought to be done...

It seems to me that reason for {supply,fill}_[fp,g}regset()'s existence
is to 1) communicate with /proc on Solaris, Unixware, and AIX5 systems
and 2) to communicate with the thread library.

For the floating point registers, the type used to communicate with this
underlying OS support is prfpregset_t.  Since there's some variablility
in how this is defined, we (quite sensibly) define gdb_prfpregset_t,
but we don't use it everywhere that we should.  In my opinion, it is
this type that ought to be used in the definition of fill_fpregset()
and supply_fpregset().  (And not just for Linux/PPC, but everywhere
else too.)

The other way to approach this is to define gdb_fpregset_t in terms of
prfpregset_t and to use gdb_fpregset_t everywhere.  (It accomplishes
the same thing, but with a different name.)

Kevin


  reply	other threads:[~2001-11-20 17:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-08 19:15 Elena Zannoni
2001-11-09  2:05 ` Kevin Buettner [this message]
2001-11-19 13:36   ` Andrew Cagney
2001-11-27 23:27     ` Daniel Jacobowitz
2001-11-19  8:35       ` Daniel Jacobowitz
2001-11-27 23:53     ` 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=1011120174021.ZM18927@ocotillo.lan \
    --to=kevinb@cygnus.com \
    --cc=ezannoni@cygnus.com \
    --cc=gdb@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