diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2012-02-24 23:48:37 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2012-02-24 23:48:37 +0000 |
commit | 283002cf5e5f9bd2679d4319769d22b30c6c2881 (patch) | |
tree | 3327f930a3e4e60a8a6c477824b91bcdbfbff637 /gdb | |
parent | 9b3e86b1b66d54e17669285cb60b0e3e2f17468e (diff) | |
download | gdb-283002cf5e5f9bd2679d4319769d22b30c6c2881.zip gdb-283002cf5e5f9bd2679d4319769d22b30c6c2881.tar.gz gdb-283002cf5e5f9bd2679d4319769d22b30c6c2881.tar.bz2 |
* remote.c (remote_watchpoint_addr_within_range): New function.
(init_remote_ops): Use it.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/remote.c | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9750d3b..0772ee8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com> + * remote.c (remote_watchpoint_addr_within_range): New function. + (init_remote_ops): Use it. + +2012-02-24 Maciej W. Rozycki <macro@codesourcery.com> + * target.h (target_watchpoint_addr_within_range): Document macro. 2012-02-24 Pedro Alves <palves@redhat.com> diff --git a/gdb/remote.c b/gdb/remote.c index 68c8fd2..2719241 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7904,6 +7904,15 @@ remote_insert_watchpoint (CORE_ADDR addr, int len, int type, _("remote_insert_watchpoint: reached end of function")); } +static int +remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, + CORE_ADDR start, int length) +{ + CORE_ADDR diff = remote_address_masked (addr - start); + + return diff < length; +} + static int remote_remove_watchpoint (CORE_ADDR addr, int len, int type, @@ -10775,6 +10784,8 @@ Specify the serial device it is connected to\n\ remote_ops.to_remove_breakpoint = remote_remove_breakpoint; remote_ops.to_stopped_by_watchpoint = remote_stopped_by_watchpoint; remote_ops.to_stopped_data_address = remote_stopped_data_address; + remote_ops.to_watchpoint_addr_within_range = + remote_watchpoint_addr_within_range; remote_ops.to_can_use_hw_breakpoint = remote_check_watch_resources; remote_ops.to_insert_hw_breakpoint = remote_insert_hw_breakpoint; remote_ops.to_remove_hw_breakpoint = remote_remove_hw_breakpoint; |