gdb/
[deliverable/binutils-gdb.git] / gdb / monitor.c
index 3b7619e67a7fa87991c5d7503b20ce22a79a505f..a6c082342f8b6b8417d74288534b0f782abcbb3d 100644 (file)
@@ -85,8 +85,6 @@ static int monitor_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
                                struct mem_attrib *attrib,
                                struct target_ops *target);
 static void monitor_files_info (struct target_ops *ops);
-static int monitor_insert_breakpoint (CORE_ADDR addr, gdb_byte *shadow);
-static int monitor_remove_breakpoint (CORE_ADDR addr, gdb_byte *shadow);
 static void monitor_kill (void);
 static void monitor_load (char *file, int from_tty);
 static void monitor_mourn_inferior (void);
@@ -2037,8 +2035,9 @@ monitor_mourn_inferior (void)
 /* Tell the monitor to add a breakpoint.  */
 
 static int
-monitor_insert_breakpoint (CORE_ADDR addr, gdb_byte *shadow)
+monitor_insert_breakpoint (struct bp_target_info *bp_tgt)
 {
+  CORE_ADDR addr = bp_tgt->placed_address;
   int i;
   const unsigned char *bp;
   int bplen;
@@ -2052,13 +2051,14 @@ monitor_insert_breakpoint (CORE_ADDR addr, gdb_byte *shadow)
 
   /* Determine appropriate breakpoint size for this address.  */
   bp = gdbarch_breakpoint_from_pc (current_gdbarch, &addr, &bplen);
+  bp_tgt->placed_address = addr;
+  bp_tgt->placed_size = bplen;
 
   for (i = 0; i < current_monitor->num_breakpoints; i++)
     {
       if (breakaddr[i] == 0)
        {
          breakaddr[i] = addr;
-         monitor_read_memory (addr, shadow, bplen);
          monitor_printf (current_monitor->set_break, addr);
          monitor_expect_prompt (NULL, 0);
          return 0;
@@ -2071,17 +2071,15 @@ monitor_insert_breakpoint (CORE_ADDR addr, gdb_byte *shadow)
 /* Tell the monitor to remove a breakpoint.  */
 
 static int
-monitor_remove_breakpoint (CORE_ADDR addr, gdb_byte *shadow)
+monitor_remove_breakpoint (struct bp_target_info *bp_tgt)
 {
+  CORE_ADDR addr = bp_tgt->placed_address;
   int i;
 
   monitor_debug ("MON rmbkpt %s\n", paddr (addr));
   if (current_monitor->clr_break == NULL)
     error (_("No clr_break defined for this monitor"));
 
-  if (current_monitor->flags & MO_ADDR_BITS_REMOVE)
-    addr = ADDR_BITS_REMOVE (addr);
-
   for (i = 0; i < current_monitor->num_breakpoints; i++)
     {
       if (breakaddr[i] == addr)
This page took 0.025363 seconds and 4 git commands to generate.