From patchwork Tue Apr 19 21:40:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 11809 Received: (qmail 127786 invoked by alias); 19 Apr 2016 21:41:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 127694 invoked by uid 89); 19 Apr 2016 21:41:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=array_size, *tp, thread_info, fbsdnatc X-HELO: bigwig.baldwin.cx Received: from bigwig.baldwin.cx (HELO bigwig.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 19 Apr 2016 21:41:15 +0000 Received: from ralph.com (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A0077B9B2 for ; Tue, 19 Apr 2016 17:41:12 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 2/2] Handle void * conversions in FreeBSD/x86 native code to fix C++ build. Date: Tue, 19 Apr 2016 14:40:03 -0700 Message-Id: <5638160c1a3a562cfd7b0b2bb02e5fc652ed6050.1461101705.git.jhb@FreeBSD.org> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes 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 | 12 ++++++++++++ gdb/amd64bsd-nat.c | 4 ++-- gdb/fbsd-nat.c | 4 ++-- gdb/i386bsd-nat.c | 8 ++++---- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6f681b9..a3d0500 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,17 @@ 2016-04-19 John Baldwin + * 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 + * main.c (setup_alternate_signal_stack): Cast to char *. 2016-04-19 Doug Evans diff --git a/gdb/amd64bsd-nat.c b/gdb/amd64bsd-nat.c index fb7e4fa..e278a91 100644 --- a/gdb/amd64bsd-nat.c +++ b/gdb/amd64bsd-nat.c @@ -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) { diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index bdf078e..b582abe 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -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; diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c index 5d45c33..f5f4a0f 100644 --- a/gdb/i386bsd-nat.c +++ b/gdb/i386bsd-nat.c @@ -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),