This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Update comments to target_can_use_hardware_watchpoint
- From: Yao Qi <qiyao at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 17 Apr 2015 12:49:09 -0000
- Subject: [binutils-gdb] Update comments to target_can_use_hardware_watchpoint
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=059790a0c8f4672da9ed5a6289d1fd9edc0f169f
commit 059790a0c8f4672da9ed5a6289d1fd9edc0f169f
Author: Yao Qi <yao.qi@linaro.org>
Date: Fri Apr 17 13:45:53 2015 +0100
Update comments to target_can_use_hardware_watchpoint
The return value of target_can_use_hardware_watchpoint isn't well
documented, so this patch is to update the comments to reflect the
fact. This patch also removes a trailing ";" which is picked up
from Pedro's patch https://sourceware.org/ml/gdb-patches/2015-04/msg00527.html
gdb:
2015-04-17 Yao Qi <yao.qi@linaro.org>
Pedro Alves <palves@redhat.com>
* target.h (target_can_use_hardware_watchpoint): Update comments.
Remove trailing ";".
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/target.h | 13 ++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4478d81..295ef34 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-17 Yao Qi <yao.qi@linaro.org>
+ Pedro Alves <palves@redhat.com>
+
+ * target.h (target_can_use_hardware_watchpoint): Update comments.
+ Remove trailing ";".
+
2015-04-17 Gary Benson <gbenson@redhat.com>
* remote.c (remote_add_inferior): New argument try_open_exec.
diff --git a/gdb/target.h b/gdb/target.h
index 66bf91e..3a0ae7b 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -1812,14 +1812,17 @@ extern char *target_thread_name (struct thread_info *);
/* If the *_hw_beakpoint functions have not been defined
elsewhere use the definitions in the target vector. */
-/* Returns non-zero if we can set a hardware watchpoint of type TYPE. TYPE is
- one of bp_hardware_watchpoint, bp_read_watchpoint, bp_write_watchpoint, or
- bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
- (including this one?). OTHERTYPE is who knows what... */
+/* Returns positive if we can set a hardware watchpoint of type TYPE.
+ Returns negative if the target doesn't have enough hardware debug
+ registers available. Return zero if hardware watchpoint of type
+ TYPE isn't supported. TYPE is one of bp_hardware_watchpoint,
+ bp_read_watchpoint, bp_write_watchpoint, or bp_hardware_breakpoint.
+ CNT is the number of such watchpoints used so far, including this
+ one. OTHERTYPE is who knows what... */
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
(*current_target.to_can_use_hw_breakpoint) (¤t_target, \
- TYPE, CNT, OTHERTYPE);
+ TYPE, CNT, OTHERTYPE)
/* Returns the number of debug registers needed to watch the given
memory region, or zero if not supported. */