Handle void * conversions in FreeBSD/x86 native code to fix C++ build.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 19 Jan 2016 19:02:09 +0000 (11:02 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 19 Apr 2016 22:42:17 +0000 (15:42 -0700)
gdb/ChangeLog:

* amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Change xstateregs
to void *.
(amd64bsd_store_inferior_registers): Likewise.
* fbsd-nat.c (resume_one_thread_cb): Explicitly cast data to ptid_t *.
(resume_all_threads_cb): Likewise.
* i386bsd-nat.c (i386bsd_supply_gregset): Cast gregs to char *.
(i386bsd_collect_gregset): Likewise.
(i386bsd_fetch_inferior_registers): Change xstateregs to void *.
(i386bsd_store_inferior_registers): Likewise.

gdb/ChangeLog
gdb/amd64bsd-nat.c
gdb/fbsd-nat.c
gdb/i386bsd-nat.c

index 05052c9cd3c2ea46f554314839ff78adad27951b..bd6b06bb42e45d69215daf84017af9271f062b9f 100644 (file)
@@ -1,3 +1,15 @@
+2016-04-19  John Baldwin  <jhb@FreeBSD.org>
+
+       * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Change xstateregs
+       to void *.
+       (amd64bsd_store_inferior_registers): Likewise.
+       * fbsd-nat.c (resume_one_thread_cb): Explicitly cast data to ptid_t *.
+       (resume_all_threads_cb): Likewise.
+       * i386bsd-nat.c (i386bsd_supply_gregset): Cast gregs to char *.
+       (i386bsd_collect_gregset): Likewise.
+       (i386bsd_fetch_inferior_registers): Change xstateregs to void *.
+       (i386bsd_store_inferior_registers): Likewise.
+
 2016-04-19  John Baldwin  <jhb@FreeBSD.org>
 
        * main.c (setup_alternate_signal_stack): Cast to char *.
index fb7e4fa061ff79ef2fcea5c6e0f93a816e969d0c..e278a9102f052900b232c41b58b4053fbc973f3a 100644 (file)
@@ -65,7 +65,7 @@ amd64bsd_fetch_inferior_registers (struct target_ops *ops,
     {
       struct fpreg fpregs;
 #ifdef PT_GETXSTATE_INFO
-      char *xstateregs;
+      void *xstateregs;
 
       if (amd64bsd_xsave_len != 0)
        {
@@ -118,7 +118,7 @@ amd64bsd_store_inferior_registers (struct target_ops *ops,
     {
       struct fpreg fpregs;
 #ifdef PT_GETXSTATE_INFO
-      char *xstateregs;
+      void *xstateregs;
 
       if (amd64bsd_xsave_len != 0)
        {
index bdf078e6cc2e915dde1bedc950a02d370a42d7e4..b582abe72df320934b8d48e2f7c24392414565ab 100644 (file)
@@ -428,7 +428,7 @@ static void (*super_resume) (struct target_ops *,
 static int
 resume_one_thread_cb (struct thread_info *tp, void *data)
 {
-  ptid_t *ptid = data;
+  ptid_t *ptid = (ptid_t *) data;
   int request;
 
   if (ptid_get_pid (tp->ptid) != ptid_get_pid (*ptid))
@@ -447,7 +447,7 @@ resume_one_thread_cb (struct thread_info *tp, void *data)
 static int
 resume_all_threads_cb (struct thread_info *tp, void *data)
 {
-  ptid_t *filter = data;
+  ptid_t *filter = (ptid_t *) data;
 
   if (!ptid_match (tp->ptid, *filter))
     return 0;
index 5d45c3384b2828c7f37bfdcff2c647e728417740..f5f4a0ff2fae0a1a4f07350ecb5faa980ac173f5 100644 (file)
@@ -92,7 +92,7 @@ size_t i386bsd_xsave_len;
 static void
 i386bsd_supply_gregset (struct regcache *regcache, const void *gregs)
 {
-  const char *regs = gregs;
+  const char *regs = (const char *) gregs;
   int regnum;
 
   for (regnum = 0; regnum < ARRAY_SIZE (i386bsd_r_reg_offset); regnum++)
@@ -112,7 +112,7 @@ static void
 i386bsd_collect_gregset (const struct regcache *regcache,
                         void *gregs, int regnum)
 {
-  char *regs = gregs;
+  char *regs = (char *) gregs;
   int i;
 
   for (i = 0; i < ARRAY_SIZE (i386bsd_r_reg_offset); i++)
@@ -157,7 +157,7 @@ i386bsd_fetch_inferior_registers (struct target_ops *ops,
 #ifdef PT_GETXSTATE_INFO
       if (i386bsd_xsave_len != 0)
        {
-         char *xstateregs;
+         void *xstateregs;
 
          xstateregs = alloca (i386bsd_xsave_len);
          if (ptrace (PT_GETXSTATE, get_ptrace_pid (inferior_ptid),
@@ -227,7 +227,7 @@ i386bsd_store_inferior_registers (struct target_ops *ops,
 #ifdef PT_GETXSTATE_INFO
       if (i386bsd_xsave_len != 0)
        {
-         char *xstateregs;
+         void *xstateregs;
 
          xstateregs = alloca (i386bsd_xsave_len);
          if (ptrace (PT_GETXSTATE, get_ptrace_pid (inferior_ptid),
This page took 0.031039 seconds and 4 git commands to generate.