From: Simon Marchi <simon.marchi@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH c++ 06/12] gdbserver arm: Add casts
Date: Tue, 03 Nov 2015 14:27:00 -0000 [thread overview]
Message-ID: <1446560804-18858-6-git-send-email-simon.marchi@ericsson.com> (raw)
In-Reply-To: <1446560804-18858-1-git-send-email-simon.marchi@ericsson.com>
From: Simon Marchi <simon.marchi@polymtl.ca>
Trivial casts for C++.
Fixes things like
In file included from /home/simark/src/binutils-gdb/gdb/gdbserver/../common/common-defs.h:39:0,
from /home/simark/src/binutils-gdb/gdb/gdbserver/server.h:22,
from /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:19:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c: In function âint arm_get_hwcap(long unsigned int*)â:
/home/simark/src/binutils-gdb/gdb/gdbserver/../../include/libiberty.h:711:38: error: invalid conversion from âvoid*â to âunsigned char*â [-fpermissive]
# define alloca(x) __builtin_alloca(x)
^
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:807:25: note: in expansion of macro âallocaâ
unsigned char *data = alloca (8);
^
gdb/gdbserver/ChangeLog:
* linux-aarch32-low.c (arm_fill_gregset): Add cast.
(arm_store_gregset): Likewise.
* linux-arm-low.c (arm_get_hwcap): Likewise.
(arm_read_description): Likewise.
---
gdb/gdbserver/linux-aarch32-low.c | 4 ++--
gdb/gdbserver/linux-arm-low.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/gdbserver/linux-aarch32-low.c b/gdb/gdbserver/linux-aarch32-low.c
index 891f8cd..221b5b9 100644
--- a/gdb/gdbserver/linux-aarch32-low.c
+++ b/gdb/gdbserver/linux-aarch32-low.c
@@ -39,7 +39,7 @@ void
arm_fill_gregset (struct regcache *regcache, void *buf)
{
int i;
- uint32_t *regs = buf;
+ uint32_t *regs = (uint32_t *) buf;
for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
collect_register (regcache, i, ®s[i]);
@@ -54,7 +54,7 @@ arm_store_gregset (struct regcache *regcache, const void *buf)
{
int i;
char zerobuf[8];
- const uint32_t *regs = buf;
+ const uint32_t *regs = (const uint32_t *) buf;
memset (zerobuf, 0, 8);
for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index e10955f..ae659dd 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -804,7 +804,7 @@ arm_prepare_to_resume (struct lwp_info *lwp)
static int
arm_get_hwcap (unsigned long *valp)
{
- unsigned char *data = alloca (8);
+ unsigned char *data = (unsigned char *) alloca (8);
int offset = 0;
while ((*the_target->read_auxv) (offset, data, 8) == 8)
@@ -855,7 +855,7 @@ arm_read_description (void)
/* Now make sure that the kernel supports reading these
registers. Support was added in 2.6.30. */
errno = 0;
- buf = xmalloc (32 * 8 + 4);
+ buf = (char *) xmalloc (32 * 8 + 4);
if (ptrace (PTRACE_GETVFPREGS, pid, 0, buf) < 0
&& errno == EIO)
result = tdesc_arm;
--
2.5.1
next prev parent reply other threads:[~2015-11-03 14:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 14:26 [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Simon Marchi
2015-11-03 14:26 ` [PATCH c++ 02/12] linux-ppc-low.c: Add casts Simon Marchi
2015-11-03 16:06 ` Pedro Alves
2015-11-03 14:26 ` [PATCH c++ 04/12] target_ops masK_watchpoint: change int to target_hw_bp_type Simon Marchi
2015-11-03 16:14 ` Pedro Alves
2015-11-03 14:26 ` [PATCH c++ 03/12] remote-sim.c: Add casts Simon Marchi
2015-11-03 16:12 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 07/12] Change return type of raw_bkpt_type_to_arm_hwbp_type Simon Marchi
2015-11-03 16:16 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 10/12] linux-mips-low.c: Change "private" variable name Simon Marchi
2015-11-03 16:17 ` Pedro Alves
2015-11-03 14:27 ` Simon Marchi [this message]
2015-11-03 16:15 ` [PATCH c++ 06/12] gdbserver arm: Add casts Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 05/12] linux-aarch32-low.c: Use NULL_REGSET Simon Marchi
2015-11-03 16:14 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 11/12] linux-mips-low.c: Add casts Simon Marchi
2015-11-03 16:18 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 12/12] xtensa: Add missing statics Simon Marchi
2015-11-03 16:19 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 09/12] linux-mips-low.c: Fix type of mips_add_watchpoint parameter Simon Marchi
2015-11-03 16:17 ` Pedro Alves
2015-11-03 14:27 ` [PATCH c++ 08/12] arm-linux-nat.c: Add cast Simon Marchi
2015-11-03 16:16 ` Pedro Alves
2015-11-03 16:06 ` [PATCH c++ 01/12] linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower Pedro Alves
2015-11-03 18:35 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446560804-18858-6-git-send-email-simon.marchi@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).