aboutsummaryrefslogtreecommitdiff
path: root/gdb/monitor.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-04-19 17:44:18 +0000
committerPedro Alves <palves@redhat.com>2013-04-19 17:44:18 +0000
commit12ff8552b9d6e9adf04d1b0443c9a77e27bf0d82 (patch)
tree582e22c47fe79bbefabef003642c5e18dd331299 /gdb/monitor.c
parent9c37696b249b48558ff2162259fc77360c38f28e (diff)
downloadgdb-12ff8552b9d6e9adf04d1b0443c9a77e27bf0d82.zip
gdb-12ff8552b9d6e9adf04d1b0443c9a77e27bf0d82.tar.gz
gdb-12ff8552b9d6e9adf04d1b0443c9a77e27bf0d82.tar.bz2
-Wpointer-sign: monitor.c.
This fixes -Wpointer-sign issues in monitor.c. Tested by building on x86_64 Fedora 17 w/ --enable-targets=all. gdb/ 2013-04-19 Pedro Alves <palves@redhat.com> * monitor.c (monitor_write_memory, monitor_write_memory_bytes): Change type of 'myaddr' parameter to gdb_byte pointer. (monitor_write_memory_longlongs): Likewise. Cast 'myaddr' pointer to 'long long' pointer instead of to 'unsigned long long'. (monitor_write_memory_block, monitor_read_memory_single) (monitor_read_memory): Change type of 'myaddr' parameter to gdb_byte pointer.
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r--gdb/monitor.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 0337075..beca4e4 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -1439,7 +1439,7 @@ monitor_files_info (struct target_ops *ops)
}
static int
-monitor_write_memory (CORE_ADDR memaddr, char *myaddr, int len)
+monitor_write_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
{
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
unsigned int val, hostval;
@@ -1542,7 +1542,7 @@ monitor_write_memory (CORE_ADDR memaddr, char *myaddr, int len)
static int
-monitor_write_memory_bytes (CORE_ADDR memaddr, char *myaddr, int len)
+monitor_write_memory_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
{
unsigned char val;
int written = 0;
@@ -1638,7 +1638,7 @@ longlong_hexchars (unsigned long long value,
Which possably entails endian conversions. */
static int
-monitor_write_memory_longlongs (CORE_ADDR memaddr, char *myaddr, int len)
+monitor_write_memory_longlongs (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
{
static char hexstage[20]; /* At least 16 digits required, plus null. */
char *endstring;
@@ -1646,7 +1646,7 @@ monitor_write_memory_longlongs (CORE_ADDR memaddr, char *myaddr, int len)
long long value;
int written = 0;
- llptr = (unsigned long long *) myaddr;
+ llptr = (long long *) myaddr;
if (len == 0)
return 0;
monitor_printf (current_monitor->setmem.cmdll, memaddr);
@@ -1686,7 +1686,7 @@ monitor_write_memory_longlongs (CORE_ADDR memaddr, char *myaddr, int len)
monitor variations. */
static int
-monitor_write_memory_block (CORE_ADDR memaddr, char *myaddr, int len)
+monitor_write_memory_block (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
{
int written;
@@ -1706,7 +1706,7 @@ monitor_write_memory_block (CORE_ADDR memaddr, char *myaddr, int len)
which can only read a single byte/word/etc. at a time. */
static int
-monitor_read_memory_single (CORE_ADDR memaddr, char *myaddr, int len)
+monitor_read_memory_single (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
{
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
unsigned int val;
@@ -1837,7 +1837,7 @@ monitor_read_memory_single (CORE_ADDR memaddr, char *myaddr, int len)
than 16 bytes at a time. */
static int
-monitor_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
+monitor_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
{
unsigned int val;
char buf[512];