]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/remote-mips.c
gdb/
[thirdparty/binutils-gdb.git] / gdb / remote-mips.c
index e47aa6e8c99e6271c5741fa9f2f92f89d009ede4..1144e8d825edbc0a28f307eb8fa0f8da60c62991 100644 (file)
@@ -2216,27 +2216,28 @@ mips_mourn_inferior (void)
 /* Insert a breakpoint.  On targets that don't have built-in
    breakpoint support, we read the contents of the target location and
    stash it, then overwrite it with a breakpoint instruction.  ADDR is
-   the target location in the target machine.  CONTENTS_CACHE is a
-   pointer to memory allocated for saving the target contents.  It is
-   guaranteed by the caller to be long enough to save the breakpoint
-   length returned by BREAKPOINT_FROM_PC.  */
+   the target location in the target machine.  BPT is the breakpoint
+   being inserted or removed, which contains memory for saving the
+   target contents.  */
 
 static int
-mips_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
+mips_insert_breakpoint (struct bp_target_info *bp_tgt)
 {
   if (monitor_supports_breakpoints)
-    return set_breakpoint (addr, MIPS_INSN32_SIZE, BREAK_FETCH);
+    return set_breakpoint (bp_tgt->placed_address, MIPS_INSN32_SIZE,
+                          BREAK_FETCH);
   else
-    return memory_insert_breakpoint (addr, contents_cache);
+    return memory_insert_breakpoint (bp_tgt);
 }
 
 static int
-mips_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
+mips_remove_breakpoint (struct bp_target_info *bp_tgt)
 {
   if (monitor_supports_breakpoints)
-    return clear_breakpoint (addr, MIPS_INSN32_SIZE, BREAK_FETCH);
+    return clear_breakpoint (bp_tgt->placed_address, MIPS_INSN32_SIZE,
+                            BREAK_FETCH);
   else
-    return memory_remove_breakpoint (addr, contents_cache);
+    return memory_remove_breakpoint (bp_tgt);
 }
 
 /* Tell whether this target can support a hardware breakpoint.  CNT