aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-03-24 21:24:09 +0000
committerTom Tromey <tromey@redhat.com>2010-03-24 21:24:09 +0000
commit95a42b64a16624a206a54fd5ee20c7a0f4b05606 (patch)
tree4f9b72d8b53d2eb33d1fce94d024ca158692e412 /gdb/doc
parent2390201f4bbde371e4a97f149976d335a1aa909c (diff)
downloadgdb-95a42b64a16624a206a54fd5ee20c7a0f4b05606.zip
gdb-95a42b64a16624a206a54fd5ee20c7a0f4b05606.tar.gz
gdb-95a42b64a16624a206a54fd5ee20c7a0f4b05606.tar.bz2
gdb
PR breakpoints/9352: * NEWS: Mention changes to `commands' and `rbreak'. * symtab.c (do_end_rbreak_breakpoints): New function. (rbreak_command): Call start_rbreak_breakpoints; arrange to call end_rbreak_breakpoints. * breakpoint.c (breakpoint_count, tracepoint_count): Now static. (set_breakpoint_count): Likewise. Clear last_was_multi. (multi_start, multi_end, last_was_multi): New globals. (start_rbreak_breakpoints, end_rbreak_breakpoints): New functions. (struct commands_info): New (do_map_commands_command): New function. (commands_command_1): New function. (commands_command): Use it. (commands_from_control_command): Likewise. (do_delete_breakpoint): New function. (delete_command): Use it. (map_breakpoint_numbers): Add 'data' argument. Pass to callback. (do_map_disable_breakpoint): New function. (disable_command): Use it. (do_map_enable_breakpoint): New function. (enable_command): Use it. (enable_once_breakpoint): Add argument. (enable_once_command): Update. (enable_delete_breakpoint): Add argument. (enable_delete_command): Update. (break_command_really): Set last_was_multi when needed. (check_tracepoint_command): Fix formatting. (validate_commands_for_breakpoint): New function. (breakpoint_set_commands): Use it. (tracepoint_save_command): Update. * breakpoint.h (start_rbreak_breakpoints, end_rbreak_breakpoints): Declare. gdb/doc PR breakpoints/9352: * gdb.texinfo (Break Commands): Update. gdb/testsuite PR breakpoints/9352: * gdb.base/default.exp: Update. * gdb.base/commands.exp: Update. * gdb.cp/extern-c.exp: Test setting commands on multiple breakpoints at once.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo14
2 files changed, 14 insertions, 5 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 52abfbe..d99937a 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-24 Tom Tromey <tromey@redhat.com>
+
+ PR breakpoints/9352:
+ * gdb.texinfo (Break Commands): Update.
+
2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
* gdb.texinfo (GDB/MI Tracepoint Commands): Document MI tracepoint
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 87bbdf1..369556d 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4328,19 +4328,23 @@ enable other breakpoints.
@table @code
@kindex commands
@kindex end@r{ (breakpoint commands)}
-@item commands @r{[}@var{bnum}@r{]}
+@item commands @r{[}@var{range}@dots{}@r{]}
@itemx @dots{} @var{command-list} @dots{}
@itemx end
-Specify a list of commands for breakpoint number @var{bnum}. The commands
+Specify a list of commands for the given breakpoints. The commands
themselves appear on the following lines. Type a line containing just
@code{end} to terminate the commands.
To remove all commands from a breakpoint, type @code{commands} and
follow it immediately with @code{end}; that is, give no commands.
-With no @var{bnum} argument, @code{commands} refers to the last
-breakpoint, watchpoint, or catchpoint set (not to the breakpoint most
-recently encountered).
+With no argument, @code{commands} refers to the last breakpoint,
+watchpoint, or catchpoint set (not to the breakpoint most recently
+encountered). If the most recent breakpoints were set with a single
+command, then the @code{commands} will apply to all the breakpoints
+set by that command. This applies to breakpoints set by
+@code{rbreak}, and also breakpoints set with @code{break} that have
+multiple locations.
@end table
Pressing @key{RET} as a means of repeating the last @value{GDBN} command is