GNU Binutils with patches for OS216
Revision | fd9f0aad46c9deb53e8541d4a139183ddb3eb174 (tree) |
---|---|
Time | 2004-03-10 09:22:45 |
Author | Kazuhiro Inaoka <inaoka.kazuhiro@rene...> |
Commiter | Kazuhiro Inaoka |
2004-03-10 Kei Sakamoto <sakamoto.kei@renesas.com>
* remote-m32r-sdi.c: Support hardware watchpoint.
@@ -1,3 +1,7 @@ | ||
1 | +2004-03-10 Kei Sakamoto <sakamoto.kei@renesas.com> | |
2 | + | |
3 | + * remote-m32r-sdi.c: Support hardware watchpoint. | |
4 | + | |
1 | 5 | 2004-03-09 Daniel Jacobowitz <drow@mvista.com> |
2 | 6 | |
3 | 7 | * user-regs.c: Update copyright years. |
@@ -1434,13 +1434,14 @@ m32r_stop (void) | ||
1434 | 1434 | } |
1435 | 1435 | |
1436 | 1436 | |
1437 | -/* Tell whether this target can support a hardware breakpoint. | |
1438 | - This implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */ | |
1437 | +/* Tell whether this target can support a hardware breakpoint. CNT | |
1438 | + is the number of hardware breakpoints already installed. This | |
1439 | + implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */ | |
1439 | 1440 | |
1440 | 1441 | int |
1441 | -m32r_can_use_hardware_watchpoint (void) | |
1442 | +m32r_can_use_hw_watchpoint (int type, int cnt, int othertype) | |
1442 | 1443 | { |
1443 | - return max_access_breaks; | |
1444 | + return sdi_desc != NULL && cnt < max_access_breaks; | |
1444 | 1445 | } |
1445 | 1446 | |
1446 | 1447 | /* Set a data watchpoint. ADDR and LEN should be obvious. TYPE is 0 |
@@ -1448,12 +1449,12 @@ m32r_can_use_hardware_watchpoint (void) | ||
1448 | 1449 | watchpoint. */ |
1449 | 1450 | |
1450 | 1451 | int |
1451 | -m32r_set_watchpoint (CORE_ADDR addr, int len, int type) | |
1452 | +m32r_insert_watchpoint (CORE_ADDR addr, int len, int type) | |
1452 | 1453 | { |
1453 | 1454 | int i; |
1454 | 1455 | |
1455 | 1456 | if (remote_debug) |
1456 | - fprintf_unfiltered (gdb_stdlog, "m32r_set_watchpoint(%08lx,%d,%d)\n", | |
1457 | + fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%08lx,%d,%d)\n", | |
1457 | 1458 | addr, len, type); |
1458 | 1459 | |
1459 | 1460 | for (i = 0; i < MAX_ACCESS_BREAKS; i++) |
@@ -1618,6 +1619,11 @@ init_m32r_ops (void) | ||
1618 | 1619 | m32r_ops.to_files_info = m32r_files_info; |
1619 | 1620 | m32r_ops.to_insert_breakpoint = m32r_insert_breakpoint; |
1620 | 1621 | m32r_ops.to_remove_breakpoint = m32r_remove_breakpoint; |
1622 | + m32r_ops.to_can_use_hw_breakpoint = m32r_can_use_hw_watchpoint; | |
1623 | + m32r_ops.to_insert_watchpoint = m32r_insert_watchpoint; | |
1624 | + m32r_ops.to_remove_watchpoint = m32r_remove_watchpoint; | |
1625 | + m32r_ops.to_stopped_by_watchpoint = m32r_stopped_by_watchpoint; | |
1626 | + m32r_ops.to_stopped_data_address = m32r_stopped_data_address; | |
1621 | 1627 | m32r_ops.to_kill = m32r_kill; |
1622 | 1628 | m32r_ops.to_load = m32r_load; |
1623 | 1629 | m32r_ops.to_create_inferior = m32r_create_inferior; |