aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2012-02-14 23:28:15 +0000
committerStan Shebs <shebs@codesourcery.com>2012-02-14 23:28:15 +0000
commit816338b5632aeb20e01a18a1d96a59fac6459cd9 (patch)
treea3b34e55155e514aec5502505fe8f53dd9cc537b /gdb/doc
parent9395078e8d48c8a34db048c8247175e3b90107c6 (diff)
downloadgdb-816338b5632aeb20e01a18a1d96a59fac6459cd9.zip
gdb-816338b5632aeb20e01a18a1d96a59fac6459cd9.tar.gz
gdb-816338b5632aeb20e01a18a1d96a59fac6459cd9.tar.bz2
2012-02-14 Stan Shebs <stan@codesourcery.com>
* NEWS: Mention enable count command. * breakpoint.h (struct breakpoint): New field enable_count. * breakpoint.c (enable_breakpoint_disp): Add count argument. (enable_breakpoint): Add arg to call. (struct disp_data): New struct. (do_enable_breakpoint_disp): Interp arg as disp_data and unpack. (do_map_enable_once_breakpoint): Create a struct and pass it. (do_map_enable_delete_breakpoint): Ditto. (do_map_enable_count_breakpoint): New function. (enable_count_command): New function. (bpstat_stop_status): Decrement enable_count. (print_one_breakpoint_location): Report enable count. (_initialize_breakpoint): Add enable count command. * gdb.texinfo (Disabling Breakpoints): Document enable count. * gdb.base/ena-dis-br.exp: Add enable count test.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo20
2 files changed, 22 insertions, 2 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 0aac7d2..6c39494 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2012-02-14 Stan Shebs <stan@codesourcery.com>
+
+ * gdb.texinfo (Disabling Breakpoints): Document enable count.
+
2012-02-13 Pedro Alves <palves@redhat.com>
* gdb.texinfo (MIPS boards): Refer to mips-elf instead of
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 9edc6ad..4373822 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3505,6 +3505,11 @@ has been hit. This is especially useful in conjunction with the
hits, look at the breakpoint info to see how many times the breakpoint
was hit, and then run again, ignoring one less than that number. This
will get you quickly to the last hit of that breakpoint.
+
+@noindent
+For a breakpoints with an enable count (xref) greater than 1,
+@code{info break} also displays that count.
+
@end table
@value{GDBN} allows you to set any number of breakpoints at the same place in
@@ -4252,8 +4257,8 @@ do not know which numbers to use.
Disabling and enabling a breakpoint that has multiple locations
affects all of its locations.
-A breakpoint, watchpoint, or catchpoint can have any of four different
-states of enablement:
+A breakpoint, watchpoint, or catchpoint can have any of several
+different states of enablement:
@itemize @bullet
@item
@@ -4265,6 +4270,9 @@ Disabled. The breakpoint has no effect on your program.
Enabled once. The breakpoint stops your program, but then becomes
disabled.
@item
+Enabled for a count. The breakpoint stops your program for the next
+N times, then becomes disabled.
+@item
Enabled for deletion. The breakpoint stops your program, but
immediately after it does so it is deleted permanently. A breakpoint
set with the @code{tbreak} command starts out in this state.
@@ -4292,6 +4300,14 @@ become effective once again in stopping your program.
Enable the specified breakpoints temporarily. @value{GDBN} disables any
of these breakpoints immediately after stopping your program.
+@item enable @r{[}breakpoints@r{]} count @var{count} @var{range}@dots{}
+Enable the specified breakpoints temporarily. @value{GDBN} records
+@var{count} with each of the specified breakpoints, and decrements a
+breakpoint's count when it is hit. When any count reaches 0,
+@value{GDBN} disables that breakpoint. If a breakpoint has an ignore
+count (@pxref{Conditions, ,Break Conditions}), that will be
+decremented to 0 before @var{count} is affected.
+
@item enable @r{[}breakpoints@r{]} delete @var{range}@dots{}
Enable the specified breakpoints to work once, then die. @value{GDBN}
deletes any of these breakpoints as soon as your program stops there.