From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH c++ 11/12] target.c: Add a cast and change a type
Date: Mon, 26 Oct 2015 10:23:00 -0000 [thread overview]
Message-ID: <1445831362-18789-1-git-send-email-simon.marchi@polymtl.ca> (raw)
Fixes some errors in C++ build.
gdb/ChangeLog:
* target.c (memory_xfer_partial): Change type of buf to gdb_byte
pointer.
(simple_search_memory): Cast return of memmem.
---
gdb/target.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/target.c b/gdb/target.c
index b8b1e9b..d7653c4 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1235,7 +1235,7 @@ memory_xfer_partial (struct target_ops *ops, enum target_object object,
}
else
{
- void *buf;
+ gdb_byte *buf;
struct cleanup *old_chain;
/* A large write request is likely to be partially satisfied
@@ -1245,7 +1245,7 @@ memory_xfer_partial (struct target_ops *ops, enum target_object object,
subset of it. Cap writes to 4KB to mitigate this. */
len = min (4096, len);
- buf = xmalloc (len);
+ buf = (gdb_byte *) xmalloc (len);
old_chain = make_cleanup (xfree, buf);
memcpy (buf, writebuf, len);
@@ -2391,8 +2391,8 @@ simple_search_memory (struct target_ops *ops,
gdb_byte *found_ptr;
unsigned nr_search_bytes = min (search_space_len, search_buf_size);
- found_ptr = memmem (search_buf, nr_search_bytes,
- pattern, pattern_len);
+ found_ptr = (gdb_byte *) memmem (search_buf, nr_search_bytes,
+ pattern, pattern_len);
if (found_ptr != NULL)
{
--
2.6.2
next reply other threads:[~2015-10-26 3:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 10:23 Simon Marchi [this message]
2015-10-26 10:38 ` [PATCH c++ 12/12] ada-lang.h: Add cast in GROW_VECT Simon Marchi
2015-10-26 23:09 ` Pedro Alves
2015-10-27 9:54 ` Simon Marchi
2015-10-27 14:55 ` Pedro Alves
2015-10-27 16:00 ` Simon Marchi
2015-10-27 9:54 ` [PATCH c++ 11/12] target.c: Add a cast and change a type 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=1445831362-18789-1-git-send-email-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
/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