2007-10-23 Pedro Alves * sol-thread.c (sol_thread_fetch_registers): Avoid alias warning. Add assertion to verify correct size of gdb_gregset_t and gdb_fpregset_t. --- gdb/sol-thread.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) Index: src/gdb/sol-thread.c =================================================================== --- src.orig/gdb/sol-thread.c 2007-10-23 15:14:44.529038000 +0100 +++ src/gdb/sol-thread.c 2007-10-23 15:15:49.819263000 +0100 @@ -484,6 +484,10 @@ sol_thread_fetch_registers (struct regca td_err_e val; prgregset_t gregset; prfpregset_t fpregset; + + gdb_assert (sizeof (prgregset_t) == sizeof (gdb_gregset_t)); + gdb_assert (sizeof (prfpregset_t) == sizeof (gdb_fpregset_t)); + #if 0 int xregsize; caddr_t xregset; @@ -530,8 +534,8 @@ sol_thread_fetch_registers (struct regca calling the td routines because the td routines call ps_lget* which affect the values stored in the registers array. */ - supply_gregset (regcache, (const gdb_gregset_t *) &gregset); - supply_fpregset (regcache, (const gdb_fpregset_t *) &fpregset); + supply_gregset (regcache, (const gdb_gregset_t *) (void *) &gregset); + supply_fpregset (regcache, (const gdb_fpregset_t *) (void *) &fpregset); #if 0 /* FIXME: libthread_db doesn't seem to handle this right. */