This is the mail archive of the gdb@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]
Other format: [Raw text]

What's the correct type for {supply,fill}_fpregset?




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


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