Change to_xfer_partial 'len' type to ULONGEST.
authorYao Qi <yao@codesourcery.com>
Fri, 3 Jan 2014 13:11:46 +0000 (21:11 +0800)
committerYao Qi <yao@codesourcery.com>
Tue, 14 Jan 2014 14:20:44 +0000 (22:20 +0800)
This patch changes to_xfer_partial's len's type to ULONGEST, and
adjust its implementations.

gdb:

2014-01-14  Yao Qi  <yao@codesourcery.com>

* target.h (target_xfer_partial_ftype): Update.
(struct target_ops) <to_xfer_partial>: Change 'len' type to
ULONGEST.
* aix-thread.c (aix_thread_xfer_partial): Change type of
argument 'len' to ULONGEST.
* auxv.c (procfs_xfer_auxv): Likewise.
(ld_so_xfer_auxv): Likewise.
(memory_xfer_auxv): Likewise.
* bfd-target.c (target_bfd_xfer_partial): Likewise.
* bsd-kvm.c (bsd_kvm_xfer_partial): Likewise.
* bsd-uthread.c (bsd_uthread_xfer_partial): Likewise.
* corelow.c (core_xfer_partial): Likewise.
* ctf.c (ctf_xfer_partial): Likewise.
* darwin-nat.c (darwin_read_write_inferior): Likewise.  Use
'%u'.
(darwin_read_dyld_info): Likewise.
(darwin_xfer_partial): Likewise.
* exec.c (section_table_xfer_memory_partial): Likewise.
(exec_xfer_partial): Likewise.
* exec.h (section_table_xfer_memory_partial): Update
declaration.
* gnu-nat.c (gnu_xfer_memory): Likewise.  Call pulongest
instead of plongest.
(gnu_xfer_partial): Likewise.
* ia64-hpux-nat.c (ia64_hpux_xfer_memory): Likewise.
(ia64_hpux_xfer_solib_got): Likewise.
(ia64_hpux_xfer_partial): Likewise.
* ia64-linux-nat.c (ia64_linux_xfer_partial):
* inf-ptrace.c (inf_ptrace_xfer_partial):
* inf-ttrace.c (inf_ttrace_xfer_partial):
* linux-nat.c (linux_xfer_siginfo): Likewise.
(linux_nat_xfer_partial): Likewise.
(spu_enumerate_spu_ids, linux_proc_xfer_spu): Likewise.
(linux_nat_xfer_osdata, linux_xfer_partial): Likewise.
* monitor.c (monitor_xfer_memory): Likewise.
(monitor_xfer_partial): Likewise.
* procfs.c (procfs_xfer_partial): Likewise.
* record-full.c (record_full_xfer_partial): Likewise.
(record_full_core_xfer_partial): Likewise.
* remote-sim.c (gdbsim_xfer_memory): Likewise.  Call pulongest
instead of plongest.
(gdbsim_xfer_partial): Likewise.
* remote.c (remote_xfer_partial): Likewise.
* rs6000-aix-tdep.c (rs6000_aix_ld_info_to_xml): Likewise.
* rs6000-aix-tdep.h (rs6000_aix_ld_info_to_xml): Update
declaration.
* rs6000-nat.c (rs6000_xfer_partial): Likewise.
(rs6000_xfer_shared_libraries): Likewise.
* sol-thread.c (sol_thread_xfer_partial): Likewise.
* sparc-nat.c (sparc_xfer_wcookie): Likewise.
(sparc_xfer_partial): Likewise.
* spu-linux-nat.c (spu_proc_xfer_spu): Likewise.
(spu_xfer_partial): Likewise.
* spu-multiarch.c (spu_xfer_partial): Likewise.
* target.c (target_read_live_memory): Likewise.
(memory_xfer_live_readonly_partial): Likewise.
(memory_xfer_partial, memory_xfer_partial_1): Likewise.
(target_xfer_partial, default_xfer_partial): Likewise.
(current_xfer_partial): Likewise.
* tracepoint.c (tfile_xfer_partial): Likewise.
* windows-nat.c (windows_xfer_memory): Likewise.  Call
pulongest instead of plongest.
(windows_xfer_partial): Likewise.
(windows_xfer_shared_libraries): Likewise.

33 files changed:
gdb/ChangeLog
gdb/aix-thread.c
gdb/auxv.c
gdb/bfd-target.c
gdb/bsd-kvm.c
gdb/bsd-uthread.c
gdb/corelow.c
gdb/ctf.c
gdb/darwin-nat.c
gdb/exec.c
gdb/exec.h
gdb/gnu-nat.c
gdb/ia64-hpux-nat.c
gdb/ia64-linux-nat.c
gdb/inf-ptrace.c
gdb/inf-ttrace.c
gdb/linux-nat.c
gdb/monitor.c
gdb/procfs.c
gdb/record-full.c
gdb/remote-sim.c
gdb/remote.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-aix-tdep.h
gdb/rs6000-nat.c
gdb/sol-thread.c
gdb/sparc-nat.c
gdb/spu-linux-nat.c
gdb/spu-multiarch.c
gdb/target.c
gdb/target.h
gdb/tracepoint.c
gdb/windows-nat.c

index e5028672e78a6ce63cff5f9bc5019fb03876d54a..f157c9982bc6b9e4485d6abb51c35cf111e7db5a 100644 (file)
@@ -1,3 +1,70 @@
+2014-01-14  Yao Qi  <yao@codesourcery.com>
+
+       * target.h (target_xfer_partial_ftype): Update.
+       (struct target_ops) <to_xfer_partial>: Change 'len' type to
+       ULONGEST.
+       * aix-thread.c (aix_thread_xfer_partial): Change type of
+       argument 'len' to ULONGEST.
+       * auxv.c (procfs_xfer_auxv): Likewise.
+       (ld_so_xfer_auxv): Likewise.
+       (memory_xfer_auxv): Likewise.
+       * bfd-target.c (target_bfd_xfer_partial): Likewise.
+       * bsd-kvm.c (bsd_kvm_xfer_partial): Likewise.
+       * bsd-uthread.c (bsd_uthread_xfer_partial): Likewise.
+       * corelow.c (core_xfer_partial): Likewise.
+       * ctf.c (ctf_xfer_partial): Likewise.
+       * darwin-nat.c (darwin_read_write_inferior): Likewise.  Use
+       '%u'.
+       (darwin_read_dyld_info): Likewise.
+       (darwin_xfer_partial): Likewise.
+       * exec.c (section_table_xfer_memory_partial): Likewise.
+       (exec_xfer_partial): Likewise.
+       * exec.h (section_table_xfer_memory_partial): Update
+       declaration.
+       * gnu-nat.c (gnu_xfer_memory): Likewise.  Call pulongest
+       instead of plongest.
+       (gnu_xfer_partial): Likewise.
+       * ia64-hpux-nat.c (ia64_hpux_xfer_memory): Likewise.
+       (ia64_hpux_xfer_solib_got): Likewise.
+       (ia64_hpux_xfer_partial): Likewise.
+       * ia64-linux-nat.c (ia64_linux_xfer_partial):
+       * inf-ptrace.c (inf_ptrace_xfer_partial):
+       * inf-ttrace.c (inf_ttrace_xfer_partial):
+       * linux-nat.c (linux_xfer_siginfo): Likewise.
+       (linux_nat_xfer_partial): Likewise.
+       (spu_enumerate_spu_ids, linux_proc_xfer_spu): Likewise.
+       (linux_nat_xfer_osdata, linux_xfer_partial): Likewise.
+       * monitor.c (monitor_xfer_memory): Likewise.
+       (monitor_xfer_partial): Likewise.
+       * procfs.c (procfs_xfer_partial): Likewise.
+       * record-full.c (record_full_xfer_partial): Likewise.
+       (record_full_core_xfer_partial): Likewise.
+       * remote-sim.c (gdbsim_xfer_memory): Likewise.  Call pulongest
+       instead of plongest.
+       (gdbsim_xfer_partial): Likewise.
+       * remote.c (remote_xfer_partial): Likewise.
+       * rs6000-aix-tdep.c (rs6000_aix_ld_info_to_xml): Likewise.
+       * rs6000-aix-tdep.h (rs6000_aix_ld_info_to_xml): Update
+       declaration.
+       * rs6000-nat.c (rs6000_xfer_partial): Likewise.
+       (rs6000_xfer_shared_libraries): Likewise.
+       * sol-thread.c (sol_thread_xfer_partial): Likewise.
+       * sparc-nat.c (sparc_xfer_wcookie): Likewise.
+       (sparc_xfer_partial): Likewise.
+       * spu-linux-nat.c (spu_proc_xfer_spu): Likewise.
+       (spu_xfer_partial): Likewise.
+       * spu-multiarch.c (spu_xfer_partial): Likewise.
+       * target.c (target_read_live_memory): Likewise.
+       (memory_xfer_live_readonly_partial): Likewise.
+       (memory_xfer_partial, memory_xfer_partial_1): Likewise.
+       (target_xfer_partial, default_xfer_partial): Likewise.
+       (current_xfer_partial): Likewise.
+       * tracepoint.c (tfile_xfer_partial): Likewise.
+       * windows-nat.c (windows_xfer_memory): Likewise.  Call
+       pulongest instead of plongest.
+       (windows_xfer_partial): Likewise.
+       (windows_xfer_shared_libraries): Likewise.
+
 2014-01-14  Yao Qi  <yao@codesourcery.com>
 
        * rs6000-nat.c (rs6000_xfer_shared_libraries): Use
index 20c787286597338ba6030fbca2ceabb8e8de14aa..d6f9f7b742f8d700db5b99ef6ce40dff62020539 100644 (file)
@@ -1686,7 +1686,7 @@ static LONGEST
 aix_thread_xfer_partial (struct target_ops *ops, enum target_object object,
                         const char *annex, gdb_byte *readbuf,
                         const gdb_byte *writebuf,
-                        ULONGEST offset, LONGEST len)
+                        ULONGEST offset, ULONGEST len)
 {
   struct cleanup *old_chain = save_inferior_ptid ();
   LONGEST xfer;
index 6223de2682425b007e96c14acfa219e075a58f8f..dacad10412db4f9443e7163118cf85af637668a0 100644 (file)
@@ -42,7 +42,7 @@ static LONGEST
 procfs_xfer_auxv (gdb_byte *readbuf,
                  const gdb_byte *writebuf,
                  ULONGEST offset,
-                 LONGEST len)
+                 ULONGEST len)
 {
   char *pathname;
   int fd;
@@ -73,7 +73,7 @@ static LONGEST
 ld_so_xfer_auxv (gdb_byte *readbuf,
                 const gdb_byte *writebuf,
                 ULONGEST offset,
-                LONGEST len)
+                ULONGEST len)
 {
   struct minimal_symbol *msym;
   CORE_ADDR data_address, pointer_address;
@@ -209,7 +209,7 @@ memory_xfer_auxv (struct target_ops *ops,
                  gdb_byte *readbuf,
                  const gdb_byte *writebuf,
                  ULONGEST offset,
-                 LONGEST len)
+                 ULONGEST len)
 {
   gdb_assert (object == TARGET_OBJECT_AUXV);
   gdb_assert (readbuf || writebuf);
index 559ca635f4193831f1a4709b89957bb521e6a70d..657de357d5f1bd23a7876dd51a40722b072a1f98 100644 (file)
@@ -41,7 +41,7 @@ target_bfd_xfer_partial (struct target_ops *ops,
                         enum target_object object,
                         const char *annex, gdb_byte *readbuf,
                         const gdb_byte *writebuf,
-                        ULONGEST offset, LONGEST len)
+                        ULONGEST offset, ULONGEST len)
 {
   switch (object)
     {
index aade96edd0dbecb84d3a457bcb891914e64512b6..20d6a1c4d2a4842708bf21526b27232f9cc27685 100644 (file)
@@ -134,7 +134,7 @@ static LONGEST
 bsd_kvm_xfer_partial (struct target_ops *ops, enum target_object object,
                      const char *annex, gdb_byte *readbuf,
                      const gdb_byte *writebuf,
-                     ULONGEST offset, LONGEST len)
+                     ULONGEST offset, ULONGEST len)
 {
   switch (object)
     {
index af522fa4994026f6a0da703de7fdd9008ffa7d08..4683abfdde38c2d2be7f2bdc0b7d5fb1c720d358 100644 (file)
@@ -338,7 +338,7 @@ static LONGEST
 bsd_uthread_xfer_partial (struct target_ops *ops, enum target_object object,
                          const char *annex, gdb_byte *readbuf,
                          const gdb_byte *writebuf,
-                         ULONGEST offset, LONGEST len)
+                         ULONGEST offset, ULONGEST len)
 {
   gdb_assert (ops->beneath->to_xfer_partial);
   return ops->beneath->to_xfer_partial (ops->beneath, object, annex, readbuf,
index 8b20d3f5a08e6266189b3857499bae07cac0b3d6..6f59d31459961b3dacb4b5767002eadb02baba94 100644 (file)
@@ -676,7 +676,7 @@ static LONGEST
 core_xfer_partial (struct target_ops *ops, enum target_object object,
                   const char *annex, gdb_byte *readbuf,
                   const gdb_byte *writebuf, ULONGEST offset,
-                  LONGEST len)
+                  ULONGEST len)
 {
   switch (object)
     {
index f4aa65782bbbd5b2e921e979568c9d65801ebd27..a22937f09658a8fc3b25edb548300464ebd3e61c 100644 (file)
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -1349,7 +1349,7 @@ static LONGEST
 ctf_xfer_partial (struct target_ops *ops, enum target_object object,
                  const char *annex, gdb_byte *readbuf,
                  const gdb_byte *writebuf, ULONGEST offset,
-                 LONGEST len)
+                 ULONGEST len)
 {
   /* We're only doing regular memory for now.  */
   if (object != TARGET_OBJECT_MEMORY)
index f0935a6a53f15a29f024af52728574c2695f66b5..53622ce9e79babc72580076fe67a6a6b8c872dbf 100644 (file)
@@ -1760,7 +1760,7 @@ darwin_thread_alive (struct target_ops *ops, ptid_t ptid)
 static int
 darwin_read_write_inferior (task_t task, CORE_ADDR addr,
                            gdb_byte *rdaddr, const gdb_byte *wraddr,
-                           int length)
+                           ULONGEST length)
 {
   kern_return_t kret;
   mach_vm_address_t offset = addr & (mach_page_size - 1);
@@ -1772,8 +1772,8 @@ darwin_read_write_inferior (task_t task, CORE_ADDR addr,
   mach_vm_address_t region_address;
   mach_vm_size_t region_length;
 
-  inferior_debug (8, _("darwin_read_write_inferior(task=0x%x, %s, len=%d)\n"),
-                 task, core_addr_to_string (addr), length);
+  inferior_debug (8, _("darwin_read_write_inferior(task=0x%x, %s, len=%s)\n"),
+                 task, core_addr_to_string (addr), pulongest (length));
 
   /* Get memory from inferior with page aligned addresses.  */
   kret = mach_vm_read (task, low_address, aligned_length,
@@ -1894,7 +1894,7 @@ out:
 /* This is not available in Darwin 9.  */
 static int
 darwin_read_dyld_info (task_t task, CORE_ADDR addr, gdb_byte *rdaddr,
-                      int length)
+                      ULONGEST length)
 {
   struct task_dyld_info task_dyld_info;
   mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT;
@@ -1922,13 +1922,13 @@ static LONGEST
 darwin_xfer_partial (struct target_ops *ops,
                     enum target_object object, const char *annex,
                     gdb_byte *readbuf, const gdb_byte *writebuf,
-                    ULONGEST offset, LONGEST len)
+                    ULONGEST offset, ULONGEST len)
 {
   struct inferior *inf = current_inferior ();
 
   inferior_debug
-    (8, _("darwin_xfer_partial(%s, %d, rbuf=%s, wbuf=%s) pid=%u\n"),
-     core_addr_to_string (offset), (int)len,
+    (8, _("darwin_xfer_partial(%s, %s, rbuf=%s, wbuf=%s) pid=%u\n"),
+     core_addr_to_string (offset), pulongest (len),
      host_address_to_string (readbuf), host_address_to_string (writebuf),
      inf->pid);
 
index 2d2949ff196f2d5ea0ca963602834202e9067e3d..809a0b2f8fe10b728dda4f81364a8ba8148785e9 100644 (file)
@@ -568,7 +568,7 @@ section_table_available_memory (VEC(mem_range_s) *memory,
 
 int
 section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
-                                  ULONGEST offset, LONGEST len,
+                                  ULONGEST offset, ULONGEST len,
                                   struct target_section *sections,
                                   struct target_section *sections_end,
                                   const char *section_name)
@@ -578,7 +578,7 @@ section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
   ULONGEST memaddr = offset;
   ULONGEST memend = memaddr + len;
 
-  if (len <= 0)
+  if (len == 0)
     internal_error (__FILE__, __LINE__,
                    _("failed internal consistency check"));
 
@@ -639,7 +639,7 @@ static LONGEST
 exec_xfer_partial (struct target_ops *ops, enum target_object object,
                   const char *annex, gdb_byte *readbuf,
                   const gdb_byte *writebuf,
-                  ULONGEST offset, LONGEST len)
+                  ULONGEST offset, ULONGEST len)
 {
   struct target_section_table *table = target_get_section_table (ops);
 
index 4c9d624a8bedacd5081c01a49ec6a1a5370de8c3..dbe5ea7b7a7d81a6ee2adbebba88f2916ad76863 100644 (file)
@@ -75,7 +75,7 @@ extern VEC(mem_range_s) *
    One, and only one, of readbuf or writebuf must be non-NULL.  */
 
 extern int section_table_xfer_memory_partial (gdb_byte *, const gdb_byte *,
-                                             ULONGEST, LONGEST,
+                                             ULONGEST, ULONGEST,
                                              struct target_section *,
                                              struct target_section *,
                                              const char *);
index 3da27d3f68fe2a92c40eb5710f0b40fc56763439..ca61c11306a4e895c88cdda361f67e1a7101ffb5 100644 (file)
@@ -2477,7 +2477,7 @@ out:
 
 static LONGEST
 gnu_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
-                CORE_ADDR memaddr, LONGEST len)
+                CORE_ADDR memaddr, ULONGEST len)
 {
   task_t task = (gnu_current_inf
                 ? (gnu_current_inf->task
@@ -2491,14 +2491,14 @@ gnu_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
   if (writebuf != NULL)
     {
       inf_debug (gnu_current_inf, "writing %s[%s] <-- %s",
-                paddress (target_gdbarch (), memaddr), plongest (len),
+                paddress (target_gdbarch (), memaddr), pulongest (len),
                 host_address_to_string (writebuf));
       res = gnu_write_inferior (task, memaddr, writebuf, len);
     }
   else
     {
       inf_debug (gnu_current_inf, "reading %s[%s] --> %s",
-                paddress (target_gdbarch (), memaddr), plongest (len),
+                paddress (target_gdbarch (), memaddr), pulongest (len),
                 host_address_to_string (readbuf));
       res = gnu_read_inferior (task, memaddr, readbuf, len);
     }
@@ -2512,7 +2512,7 @@ gnu_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
 static LONGEST
 gnu_xfer_partial (struct target_ops *ops, enum target_object object,
                  const char *annex, gdb_byte *readbuf,
-                 const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                 const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   switch (object)
     {
index fb760673660bff4ed1776231de4187e1f8ec71c5..2b0e88990fcf713769fe55ba0d26957fccb34917 100644 (file)
@@ -520,7 +520,7 @@ ia64_hpux_get_register_from_save_state_t (int regnum, int reg_size)
 static LONGEST
 ia64_hpux_xfer_memory (struct target_ops *ops, const char *annex,
                       gdb_byte *readbuf, const gdb_byte *writebuf,
-                      CORE_ADDR addr, LONGEST len)
+                      CORE_ADDR addr, ULONGEST len)
 {
   CORE_ADDR bsp, bspstore;
   CORE_ADDR start_addr, short_len;
@@ -643,7 +643,7 @@ ia64_hpux_xfer_uregs (struct target_ops *ops, const char *annex,
 static LONGEST
 ia64_hpux_xfer_solib_got (struct target_ops *ops, const char *annex,
                          gdb_byte *readbuf, const gdb_byte *writebuf,
-                         ULONGEST offset, LONGEST len)
+                         ULONGEST offset, ULONGEST len)
 {
   CORE_ADDR fun_addr;
   /* The linkage pointer.  We use a uint64_t to make sure that the size
@@ -673,7 +673,7 @@ ia64_hpux_xfer_solib_got (struct target_ops *ops, const char *annex,
 static LONGEST
 ia64_hpux_xfer_partial (struct target_ops *ops, enum target_object object,
                        const char *annex, gdb_byte *readbuf,
-                       const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                       const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   LONGEST val;
 
index af35829d76ee4b2ad0e05f368bf2856b9d638399..072c8fd90d29d0b01b4aea3846b26c7cfd2efc65 100644 (file)
@@ -840,7 +840,7 @@ ia64_linux_xfer_partial (struct target_ops *ops,
                         enum target_object object,
                         const char *annex,
                         gdb_byte *readbuf, const gdb_byte *writebuf,
-                        ULONGEST offset, LONGEST len)
+                        ULONGEST offset, ULONGEST len)
 {
   if (object == TARGET_OBJECT_UNWIND_TABLE && writebuf == NULL && offset == 0)
     return syscall (__NR_getunwind, readbuf, len);
index e0d198fbbfacce75981d3e845c844bdc0580047c..a64c8764ed1b75309b160ab9f70007aeb4f257f5 100644 (file)
@@ -463,7 +463,7 @@ static LONGEST
 inf_ptrace_xfer_partial (struct target_ops *ops, enum target_object object,
                         const char *annex, gdb_byte *readbuf,
                         const gdb_byte *writebuf,
-                        ULONGEST offset, LONGEST len)
+                        ULONGEST offset, ULONGEST len)
 {
   pid_t pid = ptid_get_pid (inferior_ptid);
 
index fbc7ed3193ff5b43ae55bcef43a14049250b3186..ea76153c6ecd305eead009e5d70f9d4e0099f37d 100644 (file)
@@ -1226,7 +1226,7 @@ static LONGEST
 inf_ttrace_xfer_partial (struct target_ops *ops, enum target_object object,
                         const char *annex, gdb_byte *readbuf,
                         const gdb_byte *writebuf,
-                        ULONGEST offset, LONGEST len)
+                        ULONGEST offset, ULONGEST len)
 {
   switch (object)
     {
index 4dfb3ff280128221822981aaf1350ef589e25eae..2371ad4db37b179a56cf1710bc74f5cc011b3b95 100644 (file)
@@ -3865,7 +3865,7 @@ siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
 static LONGEST
 linux_xfer_siginfo (struct target_ops *ops, enum target_object object,
                     const char *annex, gdb_byte *readbuf,
-                   const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                   const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   int pid;
   siginfo_t siginfo;
@@ -3919,7 +3919,7 @@ static LONGEST
 linux_nat_xfer_partial (struct target_ops *ops, enum target_object object,
                        const char *annex, gdb_byte *readbuf,
                        const gdb_byte *writebuf,
-                       ULONGEST offset, LONGEST len)
+                       ULONGEST offset, ULONGEST len)
 {
   struct cleanup *old_chain;
   LONGEST xfer;
@@ -4155,7 +4155,7 @@ linux_proc_xfer_partial (struct target_ops *ops, enum target_object object,
 
 /* Enumerate spufs IDs for process PID.  */
 static LONGEST
-spu_enumerate_spu_ids (int pid, gdb_byte *buf, ULONGEST offset, LONGEST len)
+spu_enumerate_spu_ids (int pid, gdb_byte *buf, ULONGEST offset, ULONGEST len)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
   LONGEST pos = 0;
@@ -4209,7 +4209,7 @@ static LONGEST
 linux_proc_xfer_spu (struct target_ops *ops, enum target_object object,
                     const char *annex, gdb_byte *readbuf,
                     const gdb_byte *writebuf,
-                    ULONGEST offset, LONGEST len)
+                    ULONGEST offset, ULONGEST len)
 {
   char buf[128];
   int fd = 0;
@@ -4332,7 +4332,7 @@ linux_proc_pending_signals (int pid, sigset_t *pending,
 static LONGEST
 linux_nat_xfer_osdata (struct target_ops *ops, enum target_object object,
                       const char *annex, gdb_byte *readbuf,
-                      const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                      const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   gdb_assert (object == TARGET_OBJECT_OSDATA);
 
@@ -4342,7 +4342,7 @@ linux_nat_xfer_osdata (struct target_ops *ops, enum target_object object,
 static LONGEST
 linux_xfer_partial (struct target_ops *ops, enum target_object object,
                     const char *annex, gdb_byte *readbuf,
-                   const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                   const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   LONGEST xfer;
 
index c86f040b55cba9f746c93ec7f7977c93f1262096..94b3a75dd5d00443e874042f49365171f4c11591 100644 (file)
@@ -2020,7 +2020,7 @@ monitor_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
 
 static LONGEST
 monitor_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
-                    ULONGEST memaddr, LONGEST len)
+                    ULONGEST memaddr, ULONGEST len)
 {
   int res;
 
@@ -2046,7 +2046,7 @@ monitor_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
 static LONGEST
 monitor_xfer_partial (struct target_ops *ops, enum target_object object,
                      const char *annex, gdb_byte *readbuf,
-                     const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                     const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   switch (object)
     {
index 4fa520a285160c287d0c50851ecf2a9e28eb340b..0ed788e5247d8c770f79cb58a795785323bcc737 100644 (file)
@@ -3976,7 +3976,7 @@ wait_again:
 static LONGEST
 procfs_xfer_partial (struct target_ops *ops, enum target_object object,
                     const char *annex, gdb_byte *readbuf,
-                    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                    const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   switch (object)
     {
index 3fb77ef422ae5c870cd8b9b83077739eac323d12..a9fc018ff0f29190d8f68ae9b17fa03cb8324ead 100644 (file)
@@ -1627,7 +1627,7 @@ static LONGEST
 record_full_xfer_partial (struct target_ops *ops, enum target_object object,
                          const char *annex, gdb_byte *readbuf,
                          const gdb_byte *writebuf, ULONGEST offset,
-                         LONGEST len)
+                         ULONGEST len)
 {
   if (!record_full_gdb_operation_disable
       && (object == TARGET_OBJECT_MEMORY
@@ -2160,7 +2160,7 @@ record_full_core_xfer_partial (struct target_ops *ops,
                               enum target_object object,
                               const char *annex, gdb_byte *readbuf,
                               const gdb_byte *writebuf, ULONGEST offset,
-                              LONGEST len)
+                              ULONGEST len)
 {
   if (object == TARGET_OBJECT_MEMORY)
     {
index 726372729238d41b4e24011710a61a0313b0d3be..fbb8fb6ba346b1695eac59f13523b7fec3000451 100644 (file)
@@ -1063,10 +1063,11 @@ gdbsim_prepare_to_store (struct regcache *regcache)
 static LONGEST
 gdbsim_xfer_memory (struct target_ops *target,
                    gdb_byte *readbuf, const gdb_byte *writebuf,
-                   ULONGEST memaddr, LONGEST len)
+                   ULONGEST memaddr, ULONGEST len)
 {
   struct sim_inferior_data *sim_data
     = get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NOT_NEEDED);
+  int l;
 
   /* If this target doesn't have memory yet, return 0 causing the
      request to be passed to a lower target, hopefully an exec
@@ -1092,21 +1093,21 @@ gdbsim_xfer_memory (struct target_ops *target,
                        host_address_to_string (readbuf),
                        host_address_to_string (writebuf),
                        paddress (target_gdbarch (), memaddr),
-                       plongest (len));
+                       pulongest (len));
 
   if (writebuf)
     {
       if (remote_debug && len > 0)
        dump_mem (writebuf, len);
-      len = sim_write (sim_data->gdbsim_desc, memaddr, writebuf, len);
+      l = sim_write (sim_data->gdbsim_desc, memaddr, writebuf, len);
     }
   else
     {
-      len = sim_read (sim_data->gdbsim_desc, memaddr, readbuf, len);
+      l = sim_read (sim_data->gdbsim_desc, memaddr, readbuf, len);
       if (remote_debug && len > 0)
        dump_mem (readbuf, len);
     }
-  return len;
+  return l;
 }
 
 /* Target to_xfer_partial implementation.  */
@@ -1114,7 +1115,7 @@ gdbsim_xfer_memory (struct target_ops *target,
 static LONGEST
 gdbsim_xfer_partial (struct target_ops *ops, enum target_object object,
                     const char *annex, gdb_byte *readbuf,
-                    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                    const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   switch (object)
     {
index 6560918e3ac271353808c1b9260de3a297c75219..563f7b7f2eb1274f70e1112fa68fe4df6ab88547 100644 (file)
@@ -8862,7 +8862,7 @@ remote_read_qxfer (struct target_ops *ops, const char *object_name,
 static LONGEST
 remote_xfer_partial (struct target_ops *ops, enum target_object object,
                     const char *annex, gdb_byte *readbuf,
-                    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                    const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   struct remote_state *rs;
   int i;
index b6bb3edb0b08849360c5e7ab6b2d0ca8b686fc83..ed13859fc81c439c5384bba56d73837bef71c6d4 100644 (file)
@@ -967,7 +967,7 @@ rs6000_aix_shared_library_to_xml (struct ld_info *ldi,
 
 LONGEST
 rs6000_aix_ld_info_to_xml (struct gdbarch *gdbarch, const gdb_byte *ldi_buf,
-                          gdb_byte *readbuf, ULONGEST offset, LONGEST len,
+                          gdb_byte *readbuf, ULONGEST offset, ULONGEST len,
                           int close_ldinfo_fd)
 {
   struct obstack obstack;
index c856b421a8e075c2af04007289c9ba1cf75c9352..76765f11d8c335312f57f54075a412c34349d538 100644 (file)
@@ -22,7 +22,7 @@ extern LONGEST rs6000_aix_ld_info_to_xml (struct gdbarch *gdbarch,
                                          const gdb_byte *ldi_buf,
                                          gdb_byte *readbuf,
                                          ULONGEST offset,
-                                         LONGEST len,
+                                         ULONGEST len,
                                          int close_ldinfo_fd);
 
 #endif /* RS6000_AIX_TDEP_H */
index da17b94d0bc701bebf5aecc1ef94aac5bb44ce60..676edd9be5e68cdec56e7b45a09a6d321b4488c3 100644 (file)
@@ -383,7 +383,7 @@ static LONGEST
 rs6000_xfer_partial (struct target_ops *ops, enum target_object object,
                     const char *annex, gdb_byte *readbuf,
                     const gdb_byte *writebuf,
-                    ULONGEST offset, LONGEST len)
+                    ULONGEST offset, ULONGEST len)
 {
   pid_t pid = ptid_get_pid (inferior_ptid);
   int arch64 = ARCH64 ();
@@ -686,7 +686,7 @@ static LONGEST
 rs6000_xfer_shared_libraries
   (struct target_ops *ops, enum target_object object,
    const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf,
-   ULONGEST offset, LONGEST len)
+   ULONGEST offset, ULONGEST len)
 {
   gdb_byte *ldi_buf;
   ULONGEST result;
index f1933495a0c42931e0a87600186b0dbbe33d9afd..f39f8bb775c28a6148ec11ff3e027f9b5471f7ef 100644 (file)
@@ -546,7 +546,7 @@ static LONGEST
 sol_thread_xfer_partial (struct target_ops *ops, enum target_object object,
                          const char *annex, gdb_byte *readbuf,
                          const gdb_byte *writebuf,
-                        ULONGEST offset, LONGEST len)
+                        ULONGEST offset, ULONGEST len)
 {
   int retval;
   struct cleanup *old_chain;
index ca4b3bba11ae861f3c63b67b9c6dc0bc9e364378..2953c7c0c5b69a61740df289981162801b3d1d18 100644 (file)
@@ -261,7 +261,7 @@ sparc_store_inferior_registers (struct target_ops *ops,
 static LONGEST
 sparc_xfer_wcookie (struct target_ops *ops, enum target_object object,
                    const char *annex, gdb_byte *readbuf,
-                   const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                   const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   unsigned long wcookie = 0;
   char *buf = (char *)&wcookie;
@@ -318,7 +318,7 @@ target_xfer_partial_ftype *inf_ptrace_xfer_partial;
 static LONGEST
 sparc_xfer_partial (struct target_ops *ops, enum target_object object,
                    const char *annex, gdb_byte *readbuf,
-                   const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                   const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   if (object == TARGET_OBJECT_WCOOKIE)
     return sparc_xfer_wcookie (ops, object, annex, readbuf, writebuf, 
index 4c62ec7457489490dbd7c5c6037c5998742fce14..784939be419e20bfa853f2d5758eaa872dd43174 100644 (file)
@@ -231,7 +231,7 @@ parse_spufs_run (int *fd, ULONGEST *addr)
 static LONGEST
 spu_proc_xfer_spu (const char *annex, gdb_byte *readbuf,
                   const gdb_byte *writebuf,
-                  ULONGEST offset, LONGEST len)
+                  ULONGEST offset, ULONGEST len)
 {
   char buf[128];
   int fd = 0;
@@ -563,7 +563,7 @@ static LONGEST
 spu_xfer_partial (struct target_ops *ops,
                  enum target_object object, const char *annex,
                  gdb_byte *readbuf, const gdb_byte *writebuf,
-                 ULONGEST offset, LONGEST len)
+                 ULONGEST offset, ULONGEST len)
 {
   if (object == TARGET_OBJECT_SPU)
     return spu_proc_xfer_spu (annex, readbuf, writebuf, offset, len);
index 9b6f0a6b8c3c52a402026c26a133b9e28bf4349b..11a566afcee741969952825f6489cd3e1e5943e8 100644 (file)
@@ -248,7 +248,7 @@ spu_store_registers (struct target_ops *ops,
 static LONGEST
 spu_xfer_partial (struct target_ops *ops, enum target_object object,
                  const char *annex, gdb_byte *readbuf,
-                 const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                 const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   struct target_ops *ops_beneath = find_target_beneath (ops);
   while (ops_beneath && !ops_beneath->to_xfer_partial)
index 42a8741e3a1a2aec0c436544bb016725ce312ab6..25002b3d347130938167780feeb0e6b794972595 100644 (file)
@@ -1317,7 +1317,7 @@ target_section_by_addr (struct target_ops *target, CORE_ADDR addr)
 
 static LONGEST
 target_read_live_memory (enum target_object object,
-                        ULONGEST memaddr, gdb_byte *myaddr, LONGEST len)
+                        ULONGEST memaddr, gdb_byte *myaddr, ULONGEST len)
 {
   LONGEST ret;
   struct cleanup *cleanup;
@@ -1347,7 +1347,7 @@ static LONGEST
 memory_xfer_live_readonly_partial (struct target_ops *ops,
                                   enum target_object object,
                                   gdb_byte *readbuf, ULONGEST memaddr,
-                                  LONGEST len)
+                                  ULONGEST len)
 {
   struct target_section *secp;
   struct target_section_table *table;
@@ -1427,7 +1427,7 @@ raw_memory_xfer_partial (struct target_ops *ops, void *readbuf,
 static LONGEST
 memory_xfer_partial_1 (struct target_ops *ops, enum target_object object,
                       void *readbuf, const void *writebuf, ULONGEST memaddr,
-                      LONGEST len)
+                      ULONGEST len)
 {
   LONGEST res;
   int reg_len;
@@ -1625,7 +1625,7 @@ memory_xfer_partial_1 (struct target_ops *ops, enum target_object object,
 static LONGEST
 memory_xfer_partial (struct target_ops *ops, enum target_object object,
                     void *readbuf, const void *writebuf, ULONGEST memaddr,
-                    LONGEST len)
+                    ULONGEST len)
 {
   int res;
 
@@ -1690,7 +1690,7 @@ LONGEST
 target_xfer_partial (struct target_ops *ops,
                     enum target_object object, const char *annex,
                     gdb_byte *readbuf, const gdb_byte *writebuf,
-                    ULONGEST offset, LONGEST len)
+                    ULONGEST offset, ULONGEST len)
 {
   LONGEST retval;
 
@@ -1729,7 +1729,7 @@ target_xfer_partial (struct target_ops *ops,
                          host_address_to_string (readbuf),
                          host_address_to_string (writebuf),
                          core_addr_to_string_nz (offset),
-                         plongest (len), plongest (retval));
+                         pulongest (len), plongest (retval));
 
       if (readbuf)
        myaddr = readbuf;
@@ -1964,7 +1964,7 @@ show_trust_readonly (struct ui_file *file, int from_tty,
 static LONGEST
 default_xfer_partial (struct target_ops *ops, enum target_object object,
                      const char *annex, gdb_byte *readbuf,
-                     const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                     const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   if (object == TARGET_OBJECT_MEMORY
       && ops->deprecated_xfer_memory != NULL)
@@ -2010,7 +2010,7 @@ default_xfer_partial (struct target_ops *ops, enum target_object object,
 static LONGEST
 current_xfer_partial (struct target_ops *ops, enum target_object object,
                      const char *annex, gdb_byte *readbuf,
-                     const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                     const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   if (ops->beneath != NULL)
     return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
index ab985e4f9fa2f25291bffe09e3967ce6d046a0ea..9a39839f428f756077daa2ed5c40ddb6ab64f98d 100644 (file)
@@ -245,7 +245,7 @@ typedef LONGEST
                             gdb_byte *readbuf,
                             const gdb_byte *writebuf,
                             ULONGEST offset,
-                            LONGEST len);
+                            ULONGEST len);
 
 /* Request that OPS transfer up to LEN 8-bit bytes of the target's
    OBJECT.  The OFFSET, for a seekable object, specifies the
@@ -537,7 +537,7 @@ struct target_ops
     LONGEST (*to_xfer_partial) (struct target_ops *ops,
                                enum target_object object, const char *annex,
                                gdb_byte *readbuf, const gdb_byte *writebuf,
-                               ULONGEST offset, LONGEST len);
+                               ULONGEST offset, ULONGEST len);
 
     /* Returns the memory map for the target.  A return value of NULL
        means that no memory map is available.  If a memory address
index 4b472820e51edf79cbef8472d8445cb26594c64b..f3b9bfca6870db6859840266c112e46ef15d03e5 100644 (file)
@@ -5104,7 +5104,7 @@ tfile_fetch_registers (struct target_ops *ops,
 static LONGEST
 tfile_xfer_partial (struct target_ops *ops, enum target_object object,
                    const char *annex, gdb_byte *readbuf,
-                   const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                   const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   /* We're only doing regular memory for now.  */
   if (object != TARGET_OBJECT_MEMORY)
index b42e5df1557a1f9509fa4afad085d64c00204a89..e8544acfda205472e7cd197c7b1cb1a8839fc431 100644 (file)
@@ -2415,7 +2415,7 @@ windows_stop (ptid_t ptid)
 
 static LONGEST
 windows_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
-                    ULONGEST memaddr, LONGEST len)
+                    ULONGEST memaddr, ULONGEST len)
 {
   SIZE_T done = 0;
   BOOL success;
@@ -2424,7 +2424,7 @@ windows_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
   if (writebuf != NULL)
     {
       DEBUG_MEM (("gdb: write target memory, %s bytes at %s\n",
-                 plongest (len), core_addr_to_string (memaddr)));
+                 pulongest (len), core_addr_to_string (memaddr)));
       success = WriteProcessMemory (current_process_handle,
                                    (LPVOID) (uintptr_t) memaddr, writebuf,
                                    len, &done);
@@ -2436,7 +2436,7 @@ windows_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
   else
     {
       DEBUG_MEM (("gdb: read target memory, %s bytes at %s\n",
-                 plongest (len), core_addr_to_string (memaddr)));
+                 pulongest (len), core_addr_to_string (memaddr)));
       success = ReadProcessMemory (current_process_handle,
                                   (LPCVOID) (uintptr_t) memaddr, readbuf,
                                   len, &done);
@@ -2506,7 +2506,7 @@ static LONGEST
 windows_xfer_shared_libraries (struct target_ops *ops,
                             enum target_object object, const char *annex,
                             gdb_byte *readbuf, const gdb_byte *writebuf,
-                            ULONGEST offset, LONGEST len)
+                            ULONGEST offset, ULONGEST len)
 {
   struct obstack obstack;
   const char *buf;
@@ -2542,7 +2542,7 @@ windows_xfer_shared_libraries (struct target_ops *ops,
 static LONGEST
 windows_xfer_partial (struct target_ops *ops, enum target_object object,
                    const char *annex, gdb_byte *readbuf,
-                   const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                   const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   switch (object)
     {