]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/breakpoint.c
gdb: remove current_top_target function
[thirdparty/binutils-gdb.git] / gdb / breakpoint.c
index de1e79ba5d0f1c389554d1a77f0762ea1643dff6..16cf7977b62a41ea04858c4b7488a1a6986f0aaf 100644 (file)
@@ -3598,8 +3598,8 @@ create_exception_master_breakpoint_hook (objfile *objfile)
     }
 
   addr = BMSYMBOL_VALUE_ADDRESS (bp_objfile_data->exception_msym);
-  addr = gdbarch_convert_from_func_ptr_addr (gdbarch, addr,
-                                            current_top_target ());
+  addr = gdbarch_convert_from_func_ptr_addr
+    (gdbarch, addr, current_inferior ()->top_target ());
   b = create_internal_breakpoint (gdbarch, addr, bp_exception_master,
                                  &internal_breakpoint_ops);
   initialize_explicit_location (&explicit_loc);
@@ -4869,7 +4869,7 @@ watchpoints_triggered (struct target_waitstatus *ws)
       return 0;
     }
 
-  if (!target_stopped_data_address (current_top_target (), &addr))
+  if (!target_stopped_data_address (current_inferior ()->top_target (), &addr))
     {
       /* We were stopped by a watchpoint, but we don't know where.
         Mark all watchpoints as unknown.  */
@@ -4909,9 +4909,9 @@ watchpoints_triggered (struct target_waitstatus *ws)
                  }
              }
            /* Exact match not required.  Within range is sufficient.  */
-           else if (target_watchpoint_addr_within_range (current_top_target (),
-                                                        addr, loc->address,
-                                                        loc->length))
+           else if (target_watchpoint_addr_within_range
+                      (current_inferior ()->top_target (), addr, loc->address,
+                       loc->length))
              {
                w->watchpoint_triggered = watch_triggered_yes;
                break;