From 6b6aa828818fa4a5754fb8520751077146d9d16c Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Fri, 10 Jan 2014 14:11:59 +0800 Subject: [PATCH] Change len's type to ULONGEST: remote_read_bytes and get_core_siginfo Functions remote_read_bytes and get_core_siginfo are the callees of target to_xfer_partial interface, so argument 'len' should be changed to type ULONGEST. gdb: 2014-01-24 Yao Qi * remote.c (remote_read_bytes): Change type of len to ULONGEST. * corelow.c (get_core_siginfo): Likewise. --- gdb/ChangeLog | 5 +++++ gdb/corelow.c | 2 +- gdb/remote.c | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bc69dc5f813..504858d6dc3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-01-24 Yao Qi + + * remote.c (remote_read_bytes): Change type of len to ULONGEST. + * corelow.c (get_core_siginfo): Likewise. + 2014-01-24 Yao Qi * remote.c (remote_write_bytes_aux): Change type of 'len' to diff --git a/gdb/corelow.c b/gdb/corelow.c index d4c1c16c25b..2d4a7198774 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -649,7 +649,7 @@ add_to_spuid_list (bfd *abfd, asection *asect, void *list_p) the to_xfer_partial interface. */ static LONGEST -get_core_siginfo (bfd *abfd, gdb_byte *readbuf, ULONGEST offset, LONGEST len) +get_core_siginfo (bfd *abfd, gdb_byte *readbuf, ULONGEST offset, ULONGEST len) { asection *section; char *section_name; diff --git a/gdb/remote.c b/gdb/remote.c index 15e739472d7..7297df01e75 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7039,7 +7039,7 @@ remote_write_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr, ULONGEST len) target_xfer_error' value) for error. */ static LONGEST -remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len) +remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, ULONGEST len) { struct remote_state *rs = get_remote_state (); int max_buf_size; /* Max size of packet output buffer. */ @@ -7047,7 +7047,7 @@ remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len) int todo; int i; - if (len <= 0) + if (len == 0) return 0; max_buf_size = get_memory_read_packet_size (); -- 2.30.2