gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / target-memory.c
index 8db64d7284303d310ff7cde4106116f1b27df24c..08d17f9cd180f096d24b1abe955a27e6c7ae7984 100644 (file)
@@ -1,7 +1,7 @@
 /* Parts of target interface that deal with accessing memory and memory-like
    objects.
 
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "vec.h"
 #include "target.h"
 #include "memory-map.h"
 
-#include "gdb_sys_time.h"
+#include "gdbsupport/gdb_sys_time.h"
 #include <algorithm>
 
 static bool
@@ -180,7 +179,6 @@ compute_garbled_blocks (const std::vector<memory_write_request> &erased_blocks,
 
   unsigned j;
   unsigned je = written_blocks.size ();
-  struct memory_write_request *erased_p;
 
   /* Look at each erased memory_write_request in turn, and
      see what part of it is subsequently written to.
@@ -265,7 +263,6 @@ target_write_memory_blocks (const std::vector<memory_write_request> &requests,
                            void (*progress_cb) (ULONGEST, void *))
 {
   std::vector<memory_write_request> blocks = requests;
-  struct memory_write_request *r;
   std::vector<memory_write_request> regular;
   std::vector<memory_write_request> flash;
   std::vector<memory_write_request> erased, garbled;
@@ -338,7 +335,7 @@ target_write_memory_blocks (const std::vector<memory_write_request> &requests,
     {
       LONGEST len;
 
-      len = target_write_with_progress (target_stack,
+      len = target_write_with_progress (current_top_target (),
                                        TARGET_OBJECT_MEMORY, NULL,
                                        iter.data, iter.begin,
                                        iter.end - iter.begin,
@@ -361,7 +358,7 @@ target_write_memory_blocks (const std::vector<memory_write_request> &requests,
        {
          LONGEST len;
 
-         len = target_write_with_progress (target_stack,
+         len = target_write_with_progress (current_top_target (),
                                            TARGET_OBJECT_FLASH, NULL,
                                            iter.data, iter.begin,
                                            iter.end - iter.begin,
This page took 0.025634 seconds and 4 git commands to generate.