ODR warning for "enum string_repr_result"
[binutils-gdb.git] / gdb / target-memory.c
index 670576de188e323586b4f90932a0574f98bfeebc..ba618d0146f8ec68382597574ec41442ef44eb3e 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-2022 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 "inferior.h"
 
-#include "gdb_sys_time.h"
+#include "gdbsupport/gdb_sys_time.h"
 #include <algorithm>
 
 static bool
@@ -336,7 +336,7 @@ target_write_memory_blocks (const std::vector<memory_write_request> &requests,
     {
       LONGEST len;
 
-      len = target_write_with_progress (current_top_target (),
+      len = target_write_with_progress (current_inferior ()->top_target (),
                                        TARGET_OBJECT_MEMORY, NULL,
                                        iter.data, iter.begin,
                                        iter.end - iter.begin,
@@ -359,7 +359,7 @@ target_write_memory_blocks (const std::vector<memory_write_request> &requests,
        {
          LONGEST len;
 
-         len = target_write_with_progress (current_top_target (),
+         len = target_write_with_progress (current_inferior ()->top_target (),
                                            TARGET_OBJECT_FLASH, NULL,
                                            iter.data, iter.begin,
                                            iter.end - iter.begin,