aboutsummaryrefslogtreecommitdiff
path: root/gdb/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r--gdb/monitor.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 3b7619e..a6c0823 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -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)