From 765dc01564a52c8e8ef896ec4acef04a38d60377 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 22 Nov 2006 10:43:34 +0000 Subject: 2006-11-22 Vladimir Prus * 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. --- gdb/doc/ChangeLog | 6 ++++++ gdb/doc/gdb.texinfo | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) (limited to 'gdb/doc') 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 + + * gdb.texinfo (Setting breakpoints): Document + automatic software/hardware breakpoint usage and + the "set breakpoint auto-hw" command. + 2006-11-21 Vladimir Prus * 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 -- cgit v1.1