]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/avr-tdep.c
gdb: remove current_top_target function
[thirdparty/binutils-gdb.git] / gdb / avr-tdep.c
index 815c6d451434db63479efc76b6e2d5df85bbfecf..018b18f3dfd31bf289a15d0e8667dfee75d06749 100644 (file)
@@ -1561,7 +1561,8 @@ avr_io_reg_read_command (const char *args, int from_tty)
 
   /* Find out how many io registers the target has.  */
   gdb::optional<gdb::byte_vector> buf
-    = target_read_alloc (current_top_target (), TARGET_OBJECT_AVR, "avr.io_reg");
+    = target_read_alloc (current_inferior ()->top_target (),
+                        TARGET_OBJECT_AVR, "avr.io_reg");
 
   if (!buf)
     {
@@ -1595,7 +1596,8 @@ avr_io_reg_read_command (const char *args, int from_tty)
        j = nreg - i;           /* last block is less than 8 registers */
 
       snprintf (query, sizeof (query) - 1, "avr.io_reg:%x,%x", i, j);
-      buf = target_read_alloc (current_top_target (), TARGET_OBJECT_AVR, query);
+      buf = target_read_alloc (current_inferior ()->top_target (),
+                              TARGET_OBJECT_AVR, query);
 
       if (!buf)
        {