diff options
author | Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> | 2004-03-10 00:18:44 +0000 |
---|---|---|
committer | Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> | 2004-03-10 00:18:44 +0000 |
commit | 37814c187414a0bacf16a3d2a659240b728fa983 (patch) | |
tree | a1b8ed904b28c1ed9be39bfab9130cc62a19e7e3 /gdb/remote-m32r-sdi.c | |
parent | 85f969cd0f642e5dea27e55c4bc64a88de8d6614 (diff) | |
download | gdb-37814c187414a0bacf16a3d2a659240b728fa983.zip gdb-37814c187414a0bacf16a3d2a659240b728fa983.tar.gz gdb-37814c187414a0bacf16a3d2a659240b728fa983.tar.bz2 |
2004-03-10 Kei Sakamoto <sakamoto.kei@renesas.com>
* remote-m32r-sdi.c: Support hardware watchpoint.
Diffstat (limited to 'gdb/remote-m32r-sdi.c')
-rw-r--r-- | gdb/remote-m32r-sdi.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index 7f0b90c..e211858 100644 --- a/gdb/remote-m32r-sdi.c +++ b/gdb/remote-m32r-sdi.c @@ -1434,13 +1434,14 @@ m32r_stop (void) } -/* Tell whether this target can support a hardware breakpoint. - This implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */ +/* Tell whether this target can support a hardware breakpoint. CNT + is the number of hardware breakpoints already installed. This + implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */ int -m32r_can_use_hardware_watchpoint (void) +m32r_can_use_hw_watchpoint (int type, int cnt, int othertype) { - return max_access_breaks; + return sdi_desc != NULL && cnt < max_access_breaks; } /* Set a data watchpoint. ADDR and LEN should be obvious. TYPE is 0 @@ -1448,12 +1449,12 @@ m32r_can_use_hardware_watchpoint (void) watchpoint. */ int -m32r_set_watchpoint (CORE_ADDR addr, int len, int type) +m32r_insert_watchpoint (CORE_ADDR addr, int len, int type) { int i; if (remote_debug) - fprintf_unfiltered (gdb_stdlog, "m32r_set_watchpoint(%08lx,%d,%d)\n", + fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%08lx,%d,%d)\n", addr, len, type); for (i = 0; i < MAX_ACCESS_BREAKS; i++) @@ -1618,6 +1619,11 @@ init_m32r_ops (void) m32r_ops.to_files_info = m32r_files_info; m32r_ops.to_insert_breakpoint = m32r_insert_breakpoint; m32r_ops.to_remove_breakpoint = m32r_remove_breakpoint; + m32r_ops.to_can_use_hw_breakpoint = m32r_can_use_hw_watchpoint; + m32r_ops.to_insert_watchpoint = m32r_insert_watchpoint; + m32r_ops.to_remove_watchpoint = m32r_remove_watchpoint; + m32r_ops.to_stopped_by_watchpoint = m32r_stopped_by_watchpoint; + m32r_ops.to_stopped_data_address = m32r_stopped_data_address; m32r_ops.to_kill = m32r_kill; m32r_ops.to_load = m32r_load; m32r_ops.to_create_inferior = m32r_create_inferior; |