diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-06-05 21:22:31 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-06-05 21:22:31 +0000 |
commit | 45aa465930d4e197d35a856df57ba2720ffa036d (patch) | |
tree | caec6b7fff4ae083836c56c8f1d5f5d70c8ac580 /gdb | |
parent | 1b162304d12fb239357849951093adf48609265a (diff) | |
download | binutils-45aa465930d4e197d35a856df57ba2720ffa036d.zip binutils-45aa465930d4e197d35a856df57ba2720ffa036d.tar.gz binutils-45aa465930d4e197d35a856df57ba2720ffa036d.tar.bz2 |
gdb/
* corefile.c (read_memory, read_stack, write_memory): Accept LEN
argument as ssize_t.
* gdbcore.h (read_memory, read_stack, write_memory): Likewise.
* remote.c (remote_write_bytes_aux, remote_write_bytes): Likewise.
* target.c (target_read_stack, target_write_memory)
(target_write_raw_memory): Likewise.
* target.h (target_read_stack, target_write_memory)
(target_write_raw_memory): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/corefile.c | 6 | ||||
-rw-r--r-- | gdb/gdbcore.h | 7 | ||||
-rw-r--r-- | gdb/remote.c | 4 | ||||
-rw-r--r-- | gdb/target.c | 6 | ||||
-rw-r--r-- | gdb/target.h | 6 |
6 files changed, 26 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bf9a266..4ccf1b2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2012-06-05 Siddhesh Poyarekar <siddhesh@redhat.com> + + * corefile.c (read_memory, read_stack, write_memory): Accept LEN + argument as ssize_t. + * gdbcore.h (read_memory, read_stack, write_memory): Likewise. + * remote.c (remote_write_bytes_aux, remote_write_bytes): Likewise. + * target.c (target_read_stack, target_write_memory) + (target_write_raw_memory): Likewise. + * target.h (target_read_stack, target_write_memory) + (target_write_raw_memory): Likewise. + 2012-06-05 Jan Kratochvil <jan.kratochvil@redhat.com> * symfile-mem.c: Change gdb_static_assert to ssize_t. diff --git a/gdb/corefile.c b/gdb/corefile.c index 986e4f5..611cd62 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -213,7 +213,7 @@ memory_error (int status, CORE_ADDR memaddr) /* Same as target_read_memory, but report an error if can't read. */ void -read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len) +read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len) { int status; @@ -225,7 +225,7 @@ read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len) /* Same as target_read_stack, but report an error if can't read. */ void -read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len) +read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len) { int status; @@ -352,7 +352,7 @@ read_memory_typed_address (CORE_ADDR addr, struct type *type) write. */ void write_memory (CORE_ADDR memaddr, - const bfd_byte *myaddr, int len) + const bfd_byte *myaddr, ssize_t len) { int status; diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h index 776ce9f..1081f3f 100644 --- a/gdb/gdbcore.h +++ b/gdb/gdbcore.h @@ -45,11 +45,11 @@ extern void memory_error (int status, CORE_ADDR memaddr); /* Like target_read_memory, but report an error if can't read. */ -extern void read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len); +extern void read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len); /* Like target_read_stack, but report an error if can't read. */ -extern void read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len); +extern void read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len); /* Read an integer from debugged memory, given address and number of bytes. */ @@ -83,7 +83,8 @@ CORE_ADDR read_memory_typed_address (CORE_ADDR addr, struct type *type); byteswapping, alignment, different sizes for host vs. target types, etc. */ -extern void write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len); +extern void write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, + ssize_t len); /* Store VALUE at ADDR in the inferior as a LEN-byte unsigned integer. */ extern void write_memory_unsigned_integer (CORE_ADDR addr, int len, diff --git a/gdb/remote.c b/gdb/remote.c index 565de19..38ecd08 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -6450,7 +6450,7 @@ check_binary_download (CORE_ADDR addr) static int remote_write_bytes_aux (const char *header, CORE_ADDR memaddr, - const gdb_byte *myaddr, int len, + const gdb_byte *myaddr, ssize_t len, char packet_format, int use_length) { struct remote_state *rs = get_remote_state (); @@ -6611,7 +6611,7 @@ remote_write_bytes_aux (const char *header, CORE_ADDR memaddr, error. Only transfer a single packet. */ static int -remote_write_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr, int len) +remote_write_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len) { char *packet_format = 0; diff --git a/gdb/target.c b/gdb/target.c index f63291d..fe1f9a1 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -1772,7 +1772,7 @@ target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len) the target's stack. This may trigger different cache behavior. */ int -target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len) +target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len) { /* Dispatch to the topmost target, not the flattened current_target. Memory accesses check target->to_has_(all_)memory, and the @@ -1791,7 +1791,7 @@ target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len) Callers that can deal with partial writes should call target_write. */ int -target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len) +target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len) { /* Dispatch to the topmost target, not the flattened current_target. Memory accesses check target->to_has_(all_)memory, and the @@ -1810,7 +1810,7 @@ target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len) should call target_write. */ int -target_write_raw_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len) +target_write_raw_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len) { /* Dispatch to the topmost target, not the flattened current_target. Memory accesses check target->to_has_(all_)memory, and the diff --git a/gdb/target.h b/gdb/target.h index de96bcd..233d355 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -999,13 +999,13 @@ extern int target_read_string (CORE_ADDR, char **, int, int *); extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len); -extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len); +extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len); extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, - int len); + ssize_t len); extern int target_write_raw_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, - int len); + ssize_t len); /* Fetches the target's memory map. If one is found it is sorted and returned, after some consistency checking. Otherwise, NULL |