diff options
author | Pedro Alves <palves@redhat.com> | 2013-04-19 17:44:18 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-04-19 17:44:18 +0000 |
commit | 12ff8552b9d6e9adf04d1b0443c9a77e27bf0d82 (patch) | |
tree | 582e22c47fe79bbefabef003642c5e18dd331299 | |
parent | -Wpointer-sign: record.c. (diff) | |
download | binutils-gdb-12ff8552b9d6e9adf04d1b0443c9a77e27bf0d82.tar.gz binutils-gdb-12ff8552b9d6e9adf04d1b0443c9a77e27bf0d82.tar.bz2 binutils-gdb-12ff8552b9d6e9adf04d1b0443c9a77e27bf0d82.zip |
-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.
-rw-r--r-- | gdb/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/monitor.c | 14 |
2 files changed, 17 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 191ef31463e..178ee2b68c8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,15 @@ 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. + +2013-04-19 Pedro Alves <palves@redhat.com> + * record.c (validate_history_size): Make parameter 'setting' unsigned. diff --git a/gdb/monitor.c b/gdb/monitor.c index 0337075959b..beca4e413e6 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]; |