Change len's type to ULONGEST: remote_read_bytes and get_core_siginfo
authorYao Qi <yao@codesourcery.com>
Fri, 10 Jan 2014 06:11:59 +0000 (14:11 +0800)
committerYao Qi <yao@codesourcery.com>
Fri, 24 Jan 2014 13:31:30 +0000 (21:31 +0800)
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  <yao@codesourcery.com>

* remote.c (remote_read_bytes): Change type of len to ULONGEST.
* corelow.c (get_core_siginfo): Likewise.

gdb/ChangeLog
gdb/corelow.c
gdb/remote.c

index bc69dc5f813baf210f29bc1d580981637e701f53..504858d6dc3949f617d39a470deb7a1c44377ff7 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-24  Yao Qi  <yao@codesourcery.com>
+
+       * remote.c (remote_read_bytes): Change type of len to ULONGEST.
+       * corelow.c (get_core_siginfo): Likewise.
+
 2014-01-24  Yao Qi  <yao@codesourcery.com>
 
        * remote.c (remote_write_bytes_aux): Change type of 'len' to
index d4c1c16c25bb59e1b14c89213b3ae78d082b49bd..2d4a71987742ddf674da96201f8959ba9040215b 100644 (file)
@@ -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;
index 15e739472d7461935ea373103dc43b1756b72e76..7297df01e7565261d4a879800114e3878fee731a 100644 (file)
@@ -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 ();
This page took 0.051568 seconds and 4 git commands to generate.