Make gdb_bfd_open able to open BFDs using target fileio
[deliverable/binutils-gdb.git] / gdb / dcache.c
index d3b546b5bb571720419269930cfa40b761ac06a0..3c8319f929f510fd48e2430b47ea78cffe8301e4 100644 (file)
@@ -1,6 +1,6 @@
 /* Caching code for GDB, the GNU debugger.
 
-   Copyright (C) 1992-2014 Free Software Foundation, Inc.
+   Copyright (C) 1992-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,6 @@
 #include "defs.h"
 #include "dcache.h"
 #include "gdbcmd.h"
-#include <string.h>
 #include "gdbcore.h"
 #include "target-dcache.h"
 #include "inferior.h"
@@ -497,8 +496,11 @@ dcache_read_memory_partial (struct target_ops *ops, DCACHE *dcache,
 
   if (i == 0)
     {
-      /* FIXME: We lose the real error status.  */
-      return TARGET_XFER_E_IO;
+      /* Even though reading the whole line failed, we may be able to
+        read a piece starting where the caller wanted.  */
+      return ops->to_xfer_partial (ops, TARGET_OBJECT_MEMORY, NULL,
+                                  myaddr, NULL, memaddr, len,
+                                  xfered_len);
     }
   else
     {
@@ -678,7 +680,7 @@ set_dcache_command (char *arg, int from_tty)
 {
   printf_unfiltered (
      "\"set dcache\" must be followed by the name of a subcommand.\n");
-  help_list (dcache_set_list, "set dcache ", -1, gdb_stdout);
+  help_list (dcache_set_list, "set dcache ", all_commands, gdb_stdout);
 }
 
 static void
This page took 0.024848 seconds and 4 git commands to generate.