aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2013-04-30 11:52:13 +0000
committerJoel Brobecker <brobecker@gnat.com>2013-04-30 11:52:13 +0000
commit019c1128ac20f7a8eb2d1eaeb4f69278948dd7bd (patch)
tree2df8f4eb23818f7d76bb7bc0c9e7d17dce63d6a7
parent5812197ca1f549b2a66374def03537638326e8c0 (diff)
downloadbinutils-019c1128ac20f7a8eb2d1eaeb4f69278948dd7bd.zip
binutils-019c1128ac20f7a8eb2d1eaeb4f69278948dd7bd.tar.gz
binutils-019c1128ac20f7a8eb2d1eaeb4f69278948dd7bd.tar.bz2
Fix -Wpointer-sign warning in sol-thread.c
This fixes a couple of compiler warnings in rw_common when calling target_read_memory/target_write_memory due to the type of parameter "buf" (char *) not matching what these function expect (gdb_byte *). gdb/ChangeLog: * sol-thread.c (rw_common): Change type of parameter "buf" to "gdb_byte *". (ps_pdwrite, ps_ptwrite): Cast parameter "buf" in call to rw_common to "gdb_byte *" instead of "char *".
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/sol-thread.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 05f431d..2c272fd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -4,6 +4,13 @@
2013-04-30 Joel Brobecker <brobecker@adacore.com>
+ * sol-thread.c (rw_common): Change type of parameter "buf"
+ to "gdb_byte *".
+ (ps_pdwrite, ps_ptwrite): Cast parameter "buf" in call to
+ rw_common to "gdb_byte *" instead of "char *".
+
+2013-04-30 Joel Brobecker <brobecker@adacore.com>
+
* sol-thread.c (info_cb) [ti.ti_startfunc != 0]: Change type
of local variable msym to const struct bound_minimal_symbol.
Adjust use accordingly.
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index fd29100..969bfaf 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -782,7 +782,7 @@ ps_pglobal_lookup (gdb_ps_prochandle_t ph, const char *ld_object_name,
static ps_err_e
rw_common (int dowrite, const struct ps_prochandle *ph, gdb_ps_addr_t addr,
- char *buf, int size)
+ gdb_byte *buf, int size)
{
int ret;
struct cleanup *old_chain;
@@ -831,7 +831,7 @@ ps_err_e
ps_pdwrite (gdb_ps_prochandle_t ph, gdb_ps_addr_t addr,
gdb_ps_write_buf_t buf, gdb_ps_size_t size)
{
- return rw_common (1, ph, addr, (char *) buf, size);
+ return rw_common (1, ph, addr, (gdb_byte *) buf, size);
}
/* Copies SIZE bytes from target process .text segment to debugger memory. */
@@ -849,7 +849,7 @@ ps_err_e
ps_ptwrite (gdb_ps_prochandle_t ph, gdb_ps_addr_t addr,
gdb_ps_write_buf_t buf, gdb_ps_size_t size)
{
- return rw_common (1, ph, addr, (char *) buf, size);
+ return rw_common (1, ph, addr, (gdb_byte *) buf, size);
}
/* Get general-purpose registers for LWP. */