Add "make pdf" and "make install-pdf", from Brooks Moses
[deliverable/binutils-gdb.git] / gdb / dcache.c
index 43640b0e48e38f9e1bcb9f35ddb87a3027b5756c..10f0f95392e2ddb8375c096c50e6272d81ce693d 100644 (file)
@@ -1,7 +1,7 @@
 /* Caching code for GDB, the GNU debugger.
 
-   Copyright (C) 1992, 1993, 1995, 1996, 1998, 1999, 2000, 2001, 2003 Free
-   Software Foundation, Inc.
+   Copyright (C) 1992, 1993, 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2007
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -302,19 +302,15 @@ dcache_write_line (DCACHE *dcache, struct dcache_block *db)
          }
 
          dirty_len = e - s;
-         while (dirty_len > 0)
-           {
-             res = do_xfer_memory(memaddr, myaddr, dirty_len, 1,
-                                  &region->attrib);
-             if (res <= 0)
-               return 0;
-
-             memset (&db->state[XFORM(memaddr)], ENTRY_OK, res);
-             memaddr   += res;
-             myaddr    += res;
-             len       -= res;
-             dirty_len -= res;
-           }
+         res = target_write (&current_target, TARGET_OBJECT_RAW_MEMORY,
+                             NULL, myaddr, memaddr, dirty_len);
+         if (res < dirty_len)
+           return 0;
+
+         memset (&db->state[XFORM(memaddr)], ENTRY_OK, res);
+         memaddr += res;
+         myaddr += res;
+         len -= res;
        }
     }
 
@@ -361,18 +357,14 @@ dcache_read_line (DCACHE *dcache, struct dcache_block *db)
          continue;
        }
       
-      while (reg_len > 0)
-       {
-         res = do_xfer_memory (memaddr, myaddr, reg_len, 0,
-                               &region->attrib);
-         if (res <= 0)
-           return 0;
+      res = target_read (&current_target, TARGET_OBJECT_RAW_MEMORY,
+                        NULL, myaddr, memaddr, reg_len);
+      if (res < reg_len)
+       return 0;
 
-         memaddr += res;
-         myaddr  += res;
-         len     -= res;
-         reg_len -= res;
-       }
+      memaddr += res;
+      myaddr += res;
+      len -= res;
     }
 
   memset (db->state, ENTRY_OK, sizeof (db->data));
This page took 0.023622 seconds and 4 git commands to generate.