build/2404: gdb 6.7.1 fails to build with gcc-4.2.2 on aix 5.2

Joel Brobecker brobecker@adacore.com
Fri Mar 21 20:14:00 GMT 2008


Thomas,

> >>    The code looks a bit different now, though perhaps not
> >>    different enough.
> >>    Could you send this patch to gdb-patches, as a unidiff
> >>    or a context diff?  that way someone will see it and
> >>    respond.  Thanks.

Thanks for bringing this to our attention. It's usually better if
you send a patch against CVS head, but in this case I got the idea :).
Attached is what I ended up checking in - this is very very close to
what you suggested, except for the first hunk, which where you introduced
a local variable which I thought was unnecessary (as well as being
different from your other changes).

Given the small size of your change and the fact that we don't seem
to have any other change from you in our records, I checked the patch
in without requiring an FSF copyright assignment.  But if you are
interested in contributing to the GDB project, you might want to have
one in place. Please contact me if you are interested.

2008-03-21  Thomas Mittelstaedt  <T.Mittelstaedt@cadenas.de>  (tiny change)

        * aix-thread.c (pdc_read_regs): Fix compiler warning.
        (pdc_write_regs, aix_thread_resume, fetch_regs_kernel_thread)
        (store_regs_kernel_thread): Likewise.

Checked in HEAD and branch (in other words, 6.8 will include this change).
Tested on ppc-aix with GCC 4.2.3.

-- 
Joel
-------------- next part --------------
Index: aix-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/aix-thread.c,v
retrieving revision 1.55
diff -u -p -r1.55 aix-thread.c
--- aix-thread.c	17 Mar 2008 19:00:30 -0000	1.55
+++ aix-thread.c	21 Mar 2008 20:02:24 -0000
@@ -363,7 +363,7 @@ pdc_read_regs (pthdb_user_t user, 
   /* Floating-point registers.  */
   if (flags & PTHDB_FLAG_FPRS)
     {
-      if (!ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))
+      if (!ptrace32 (PTT_READ_FPRS, tid, (void *) fprs, 0, NULL))
 	memset (fprs, 0, sizeof (fprs));
       memcpy (context->fpr, fprs, sizeof(fprs));
     }
@@ -434,7 +434,7 @@ pdc_write_regs (pthdb_user_t user,
 	}
       else
 	{
-	  ptrace32 (PTT_WRITE_SPRS, tid, (int *) &context->msr, 0, NULL);
+	  ptrace32 (PTT_WRITE_SPRS, tid, (void *) &context->msr, 0, NULL);
 	}
     }
   return 0;
@@ -984,10 +984,10 @@ aix_thread_resume (ptid_t ptid, int step
 
       if (arch64)
 	ptrace64aix (PTT_CONTINUE, tid[0], 1, 
-		     target_signal_to_host (sig), (int *) tid);
+		     target_signal_to_host (sig), (void *) tid);
       else
 	ptrace32 (PTT_CONTINUE, tid[0], (int *) 1,
-		  target_signal_to_host (sig), (int *) tid);
+		  target_signal_to_host (sig), (void *) tid);
     }
 }
 
@@ -1230,7 +1230,7 @@ fetch_regs_kernel_thread (struct regcach
           || (regno >= tdep->ppc_fp0_regnum
               && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)))
     {
-      if (!ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))
+      if (!ptrace32 (PTT_READ_FPRS, tid, (void *) fprs, 0, NULL))
 	memset (fprs, 0, sizeof (fprs));
       supply_fprs (regcache, fprs);
     }
@@ -1547,9 +1547,9 @@ store_regs_kernel_thread (const struct r
               && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)))
     {
       /* Pre-fetch: some regs may not be in the cache.  */
-      ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL);
+      ptrace32 (PTT_READ_FPRS, tid, (void *) fprs, 0, NULL);
       fill_fprs (regcache, fprs);
-      ptrace32 (PTT_WRITE_FPRS, tid, (int *) fprs, 0, NULL);
+      ptrace32 (PTT_WRITE_FPRS, tid, (void *) fprs, 0, NULL);
     }
 
   /* Special-purpose registers.  */


More information about the Gdb-patches mailing list