aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2006-11-22 10:43:34 +0000
committerVladimir Prus <vladimir@codesourcery.com>2006-11-22 10:43:34 +0000
commit765dc01564a52c8e8ef896ec4acef04a38d60377 (patch)
tree674bdf203ea1fe68db5d117564e93ed5cb944843 /gdb/doc
parent221ca4668b01b2fe675f7734fbb4279c2c9fd0b9 (diff)
downloadfsf-binutils-gdb-765dc01564a52c8e8ef896ec4acef04a38d60377.zip
fsf-binutils-gdb-765dc01564a52c8e8ef896ec4acef04a38d60377.tar.gz
fsf-binutils-gdb-765dc01564a52c8e8ef896ec4acef04a38d60377.tar.bz2
2006-11-22 Vladimir Prus <vladimir@codesourcery.com>
* breakpoint.c: Include "memattr.h". (automatic_hardware_breakpoints): New. (show_automatic_hardware_breakpoints): New. (insert_bp_location): Automatically use hardware breakpoints. (_initialize_breakpoint): Register the "auto-hw" variable. * Makefile.in (breakpoint.o): Update dependencies.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/gdb.texinfo26
2 files changed, 32 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 71f30c1..e217675 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,9 @@
+2006-11-22 Vladimir Prus <vladimir@codesourcery.com>
+
+ * gdb.texinfo (Setting breakpoints): Document
+ automatic software/hardware breakpoint usage and
+ the "set breakpoint auto-hw" command.
+
2006-11-21 Vladimir Prus <vladimir@codesourcery.com>
* gdb.texinfo (Memory Access Checking): New.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index f89cc09..82571b6 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3099,6 +3099,32 @@ This is done because any number of shared library loads could have
occurred since the time the breakpoint was disabled and one or more
of these loads could resolve the location.
+@cindex automatic hardware breakpoints
+For some targets, @value{GDBN} can automatically decide if hardware or
+software breakpoints should be used, depending on whether the
+breakpoint address is read-only or read-write. This applies to
+breakpoints set with the @code{break} command as well as to internal
+breakpoints set by commands like @code{next} and @code{finish}. For
+breakpoints set with @code{hbreak}, @value{GDBN} will always use hardware
+breakpoints.
+
+You can control this automatic behaviour with the following commands::
+
+@kindex set breakpoint auto-hw
+@kindex show breakpoint auto-hw
+@table @code
+@item set breakpoint auto-hw on
+This is the default behavior. When @value{GDBN} sets a breakpoint, it
+will try to use the target memory map to decide if software or hardware
+breakpoint must be used.
+
+@item set breakpoint auto-hw off
+This indicates @value{GDBN} should not automatically select breakpoint
+type. If the target provides a memory map, @value{GDBN} will warn when
+trying to set software breakpoint at a read-only address.
+@end table
+
+
@cindex negative breakpoint numbers
@cindex internal @value{GDBN} breakpoints
@value{GDBN} itself sometimes sets breakpoints in your program for