aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-06-17 11:32:26 +0100
committerGary Benson <gbenson@redhat.com>2014-06-18 10:15:08 +0100
commit6e62758f0249b3b8e4f2f82af6074eed44246cb5 (patch)
tree46844dad47c39f139e14005b199cbecd480232fd /gdb/gdbserver
parent51c79e94b2a4572cd983e47089f6b7beea7c5ea9 (diff)
downloadgdb-6e62758f0249b3b8e4f2f82af6074eed44246cb5.zip
gdb-6e62758f0249b3b8e4f2f82af6074eed44246cb5.tar.gz
gdb-6e62758f0249b3b8e4f2f82af6074eed44246cb5.tar.bz2
Comment changes
This commit fixes various comment differences between i386-nat.[ch] and i386-low.[ch]. gdb/ 2014-06-18 Gary Benson <gbenson@redhat.com> * i386-nat.c: Comment changes. gdb/gdbserver/ 2014-06-18 Gary Benson <gbenson@redhat.com> * i386-low.h: Comment changes. * i386-low.c: Likewise.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/i386-low.c24
-rw-r--r--gdb/gdbserver/i386-low.h6
3 files changed, 25 insertions, 10 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index b3bf319..78cf89b 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,10 @@
2014-06-18 Gary Benson <gbenson@redhat.com>
+ * i386-low.h: Comment changes.
+ * i386-low.c: Likewise.
+
+2014-06-18 Gary Benson <gbenson@redhat.com>
+
* i386-low.c: Whitespace changes.
2014-06-12 Tom Tromey <tromey@redhat.com>
diff --git a/gdb/gdbserver/i386-low.c b/gdb/gdbserver/i386-low.c
index 304d6f3..d122ff7 100644
--- a/gdb/gdbserver/i386-low.c
+++ b/gdb/gdbserver/i386-low.c
@@ -21,6 +21,17 @@
#include "target.h"
#include "i386-low.h"
+/* Support for hardware watchpoints and breakpoints using the i386
+ debug registers.
+
+ This provides several functions for inserting and removing
+ hardware-assisted breakpoints and watchpoints, testing if one or
+ more of the watchpoints triggered and at what address, checking
+ whether a given region can be watched, etc.
+
+ The functions below implement debug registers sharing by reference
+ counts, and allow to watch regions up to 16 bytes long. */
+
/* Support for 8-byte wide hw watchpoints. */
#ifndef TARGET_HAS_DR_LEN_8
/* NOTE: sizeof (long) == 4 on win64. */
@@ -156,8 +167,7 @@ i386_low_init_dregs (struct i386_debug_reg_state *state)
state->dr_status_mirror = 0;
}
-/* Print the values of the mirrored debug registers. This is enabled via
- the "set debug-hw-points 1" monitor command. */
+/* Print the values of the mirrored debug registers. */
static void
i386_show_dr (struct i386_debug_reg_state *state,
@@ -427,7 +437,7 @@ i386_update_inferior_debug_regs (struct i386_debug_reg_state *inf_state,
/* Insert a watchpoint to watch a memory region which starts at
address ADDR and whose length is LEN bytes. Watch memory accesses
- of the type TYPE_FROM_PACKET. Return 0 on success, -1 on failure. */
+ of the type TYPE. Return 0 on success, -1 on failure. */
int
i386_low_insert_watchpoint (struct i386_debug_reg_state *state,
@@ -523,8 +533,8 @@ i386_low_region_ok_for_watchpoint (struct i386_debug_reg_state *state,
}
/* If the inferior has some break/watchpoint that triggered, set the
- address associated with that break/watchpoint and return true.
- Otherwise, return false. */
+ address associated with that break/watchpoint and return non-zero.
+ Otherwise, return zero. */
int
i386_low_stopped_data_address (struct i386_debug_reg_state *state,
@@ -603,8 +613,8 @@ i386_low_stopped_data_address (struct i386_debug_reg_state *state,
return rc;
}
-/* Return true if the inferior has some watchpoint that triggered.
- Otherwise return false. */
+/* Return non-zero if the inferior has some watchpoint that triggered.
+ Otherwise return zero. */
int
i386_low_stopped_by_watchpoint (struct i386_debug_reg_state *state)
diff --git a/gdb/gdbserver/i386-low.h b/gdb/gdbserver/i386-low.h
index 8d8e73f..681ade0 100644
--- a/gdb/gdbserver/i386-low.h
+++ b/gdb/gdbserver/i386-low.h
@@ -32,9 +32,9 @@
/* Debug registers' indices. */
#define DR_FIRSTADDR 0
#define DR_LASTADDR 3
-#define DR_NADDR 4 /* The number of debug address registers. */
-#define DR_STATUS 6
-#define DR_CONTROL 7
+#define DR_NADDR 4 /* The number of debug address registers. */
+#define DR_STATUS 6 /* Index of debug status register (DR6). */
+#define DR_CONTROL 7 /* Index of debug control register (DR7). */
/* Global state needed to track h/w watchpoints. */