* What's the correct type for {supply,fill}_fpregset?
@ 2001-11-08 19:15 Elena Zannoni
2001-11-09 2:05 ` Kevin Buettner
0 siblings, 1 reply; 6+ messages in thread
From: Elena Zannoni @ 2001-11-08 19:15 UTC (permalink / raw)
To: gdb
In compiling natively on a ppc linux system, using -Werror, I get this:
gcc -c -g -O2 -I. -I/home/ezannoni/uberbaum/src/gdb -I/home/ezannoni/uberbaum/src/gdb/config -DHAVE_CONFIG_H -I/home/ezannoni/uberbaum/src/gdb/../include/opcode -I/home/ezannoni/uberbaum/src/gdb/../readline/.. -I../bfd -I/home/ezannoni/uberbaum/src/gdb/../bfd -I/home/ezannoni/uberbaum/src/gdb/../include -I../intl -I/home/ezannoni/uberbaum/src/gdb/../intl -DMI_OUT=1 -DGDBTK -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Werror /home/ezannoni/uberbaum/src/gdb/thread-db.c
cc1: warnings being treated as errors
/home/ezannoni/uberbaum/src/gdb/thread-db.c: In function `thread_db_fetch_registers':
/home/ezannoni/uberbaum/src/gdb/thread-db.c:802: warning: passing arg 1 of `supply_fpregset' from incompatible pointer type
/home/ezannoni/uberbaum/src/gdb/thread-db.c: In function `thread_db_store_registers':
/home/ezannoni/uberbaum/src/gdb/thread-db.c:835: warning: passing arg 1 of `fill_fpregset' from incompatible pointer type
/home/ezannoni/uberbaum/src/gdb/thread-db.c:841: warning: passing arg 2 of pointer to function from incompatible pointer type
What is the correct/preferred solution here?
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?
If this is too hard to get right for all systems, I'll submit a patch
to Makefile.in that disables -Werror for thread-db.c.
Thanks
Elena
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What's the correct type for {supply,fill}_fpregset?
2001-11-08 19:15 What's the correct type for {supply,fill}_fpregset? Elena Zannoni
@ 2001-11-09 2:05 ` Kevin Buettner
2001-11-19 13:36 ` Andrew Cagney
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Buettner @ 2001-11-09 2:05 UTC (permalink / raw)
To: Elena Zannoni, gdb
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What's the correct type for {supply,fill}_fpregset?
2001-11-27 23:27 ` Daniel Jacobowitz
@ 2001-11-19 8:35 ` Daniel Jacobowitz
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2001-11-19 8:35 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Kevin Buettner, Elena Zannoni, gdb
On Wed, Nov 28, 2001 at 02:21:47AM -0500, Andrew Cagney wrote:
> >>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.
>
> DanielJ, did you recently hit this problem with, er, MIPS? Something
> about trying to fix it but getting a patch bounced?
This is in the same area, but not really related, I think. My problem
was prgregset_t not matching gdb_gregset_t, and likewise for
prfpregset_t (complicated by gdb_prfpregset_t). I'm going to post a
patch for that as soon as I remember to finish it.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What's the correct type for {supply,fill}_fpregset?
2001-11-09 2:05 ` Kevin Buettner
@ 2001-11-19 13:36 ` Andrew Cagney
2001-11-27 23:27 ` Daniel Jacobowitz
2001-11-27 23:53 ` Andrew Cagney
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Cagney @ 2001-11-19 13:36 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Kevin Buettner, Elena Zannoni, gdb
>> 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.
DanielJ, did you recently hit this problem with, er, MIPS? Something
about trying to fix it but getting a patch bounced?
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What's the correct type for {supply,fill}_fpregset?
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
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2001-11-27 23:27 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Kevin Buettner, Elena Zannoni, gdb
On Wed, Nov 28, 2001 at 02:21:47AM -0500, Andrew Cagney wrote:
> >>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.
>
> DanielJ, did you recently hit this problem with, er, MIPS? Something
> about trying to fix it but getting a patch bounced?
This is in the same area, but not really related, I think. My problem
was prgregset_t not matching gdb_gregset_t, and likewise for
prfpregset_t (complicated by gdb_prfpregset_t). I'm going to post a
patch for that as soon as I remember to finish it.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What's the correct type for {supply,fill}_fpregset?
2001-11-19 13:36 ` Andrew Cagney
2001-11-27 23:27 ` Daniel Jacobowitz
@ 2001-11-27 23:53 ` Andrew Cagney
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2001-11-27 23:53 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Kevin Buettner, Elena Zannoni, gdb
>> 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.
DanielJ, did you recently hit this problem with, er, MIPS? Something
about trying to fix it but getting a patch bounced?
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-11-28 7:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-08 19:15 What's the correct type for {supply,fill}_fpregset? Elena Zannoni
2001-11-09 2:05 ` Kevin Buettner
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox