mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-18 13:23:10 +08:00
-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.
This commit is contained in:
@ -1,3 +1,13 @@
|
|||||||
|
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>
|
2013-04-19 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* record.c (validate_history_size): Make parameter 'setting'
|
* record.c (validate_history_size): Make parameter 'setting'
|
||||||
|
@ -1439,7 +1439,7 @@ monitor_files_info (struct target_ops *ops)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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 ());
|
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
|
||||||
unsigned int val, hostval;
|
unsigned int val, hostval;
|
||||||
@ -1542,7 +1542,7 @@ monitor_write_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
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;
|
unsigned char val;
|
||||||
int written = 0;
|
int written = 0;
|
||||||
@ -1638,7 +1638,7 @@ longlong_hexchars (unsigned long long value,
|
|||||||
Which possably entails endian conversions. */
|
Which possably entails endian conversions. */
|
||||||
|
|
||||||
static int
|
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. */
|
static char hexstage[20]; /* At least 16 digits required, plus null. */
|
||||||
char *endstring;
|
char *endstring;
|
||||||
@ -1646,7 +1646,7 @@ monitor_write_memory_longlongs (CORE_ADDR memaddr, char *myaddr, int len)
|
|||||||
long long value;
|
long long value;
|
||||||
int written = 0;
|
int written = 0;
|
||||||
|
|
||||||
llptr = (unsigned long long *) myaddr;
|
llptr = (long long *) myaddr;
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return 0;
|
return 0;
|
||||||
monitor_printf (current_monitor->setmem.cmdll, memaddr);
|
monitor_printf (current_monitor->setmem.cmdll, memaddr);
|
||||||
@ -1686,7 +1686,7 @@ monitor_write_memory_longlongs (CORE_ADDR memaddr, char *myaddr, int len)
|
|||||||
monitor variations. */
|
monitor variations. */
|
||||||
|
|
||||||
static int
|
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;
|
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. */
|
which can only read a single byte/word/etc. at a time. */
|
||||||
|
|
||||||
static int
|
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 ());
|
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
|
||||||
unsigned int val;
|
unsigned int val;
|
||||||
@ -1837,7 +1837,7 @@ monitor_read_memory_single (CORE_ADDR memaddr, char *myaddr, int len)
|
|||||||
than 16 bytes at a time. */
|
than 16 bytes at a time. */
|
||||||
|
|
||||||
static int
|
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;
|
unsigned int val;
|
||||||
char buf[512];
|
char buf[512];
|
||||||
|
Reference in New Issue
Block a user