aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-04-19 00:48:44 +0000
committerPedro Alves <palves@redhat.com>2010-04-19 00:48:44 +0000
commit6149aea959633bda5ec763817d6d2bee4e7d43c3 (patch)
tree31fb32e77c457d56bfd0950f292af06060f78118 /gdb/doc
parent8b47812243640f8945e86e5eef6a54f1f5b32a39 (diff)
downloadgdb-6149aea959633bda5ec763817d6d2bee4e7d43c3.zip
gdb-6149aea959633bda5ec763817d6d2bee4e7d43c3.tar.gz
gdb-6149aea959633bda5ec763817d6d2bee4e7d43c3.tar.bz2
PR breakpoints/8554.
Implement `save-breakpoints'. gdb/ * breakpoint.c (save_cmdlist): New. (breakpoint_set_cmdlist, breakpoint_show_cmdlist): Moved up close to save_cmdlist. (print_recreate_catch_fork): New. (catch_fork_breakpoint_ops): Install it. (print_recreate_catch_vfork): New. (catch_vfork_breakpoint_ops): Install it. (print_recreate_catch_syscall): New. (catch_syscall_breakpoint_ops): Install it. (print_recreate_catch_exec): New. (catch_exec_breakpoint_ops): Install it. (print_recreate_exception_catchpoint): New. (gnu_v3_exception_catchpoint_ops): Install it. (save_breakpoints): New, based on tracepoint_save_command, but handle all breakpoint types. (save_breakpoints_command): New. (tracepoint_save_command): Rename to... (save_tracepoints_command): ... this, and reimplement using save_breakpoints. (save_command): New. (_initialize_breakpoints): Install the "save" command prefix. Install the "save breakpoints" command. Make "save-tracepoints" a deprecated alias for "save tracepoints". * breakpoint.h (struct breakpoint_ops): New field `print_recreate'. * ada-lang.c (print_recreate_exception): New. (print_recreate_catch_exception): New. (catch_exception_breakpoint_ops): Install it. (print_recreate_catch_exception_unhandled): New. (catch_exception_unhandled_breakpoint_ops): Install it. (print_recreate_catch_assert): New. (catch_assert_breakpoint_ops): Install it. * NEWS: Mention the new `save breakpoints' command. Mention the new `save tracepoints' alias and that `save-tracepoints' is now deprecated. gdb/doc/ * gdb.texinfo (Save Breakpoints): New node. (save-tracepoints): Rename to ... (save tracepoints): ... this. Mention that `save-tracepoints' is a deprecated alias to `save tracepoints'. gdb/testsuite/ * gdb.trace/save-trace.exp: Adjust.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog9
-rw-r--r--gdb/doc/gdb.texinfo36
2 files changed, 41 insertions, 4 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index bf650cc..4ccc67f 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,12 @@
+2010-04-19 Pedro Alves <pedro@codesourcery.com>
+
+ PR breakpoints/8554.
+
+ * gdb.texinfo (Save Breakpoints): New node.
+ (save-tracepoints): Rename to ...
+ (save tracepoints): ... this. Mention that `save-tracepoints' is
+ a deprecated alias to `save tracepoints'.
+
2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
gdb.texinfo ($_tlb): Document new automatic convinience variable.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 01d8593..0924430 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3247,6 +3247,7 @@ all breakpoints in that range are operated on.
* Disabling:: Disabling breakpoints
* Conditions:: Break conditions
* Break Commands:: Breakpoint command lists
+* Save Breakpoints:: How to save breakpoints in a file
* Error in Breakpoints:: ``Cannot insert breakpoints''
* Breakpoint-related Warnings:: ``Breakpoint address adjusted...''
@end menu
@@ -4401,6 +4402,31 @@ cont
end
@end smallexample
+@node Save Breakpoints
+@subsection How to save breakpoints to a file
+
+To save breakpoint definitions to a file use the @w{@code{save
+breakpoints}} command.
+
+@table @code
+@kindex save breakpoints
+@cindex save breakpoints to a file for future sessions
+@item save breakpoints [@var{filename}]
+This command saves all current breakpoint definitions together with
+their commands and ignore counts, into a file @file{@var{filename}}
+suitable for use in a later debugging session. This includes all
+types of breakpoints (breakpoints, watchpoints, catchpoints,
+tracepoints). To read the saved breakpoint definitions, use the
+@code{source} command (@pxref{Command Files}). Note that watchpoints
+with expressions involving local variables may fail to be recreated
+because it may not be possible to access the context where the
+watchpoint is valid anymore. Because the saved breakpoint definitions
+are simply a sequence of @value{GDBN} commands that recreate the
+breakpoints, you can edit the file in your favorite editing program,
+and remove the breakpoint definitions you're not interested in, or
+that can no longer be recreated.
+@end table
+
@c @ifclear BARETARGET
@node Error in Breakpoints
@subsection ``Cannot insert breakpoints''
@@ -9980,7 +10006,7 @@ the buffer will fail.
@menu
* tfind:: How to select a trace snapshot
* tdump:: How to display all data for a snapshot
-* save-tracepoints:: How to save tracepoints for a future run
+* save tracepoints:: How to save tracepoints for a future run
@end menu
@node tfind
@@ -10175,8 +10201,9 @@ list, and may fail if a while-stepping frame does not include all the
same data that is collected at the tracepoint hit.
@c This is getting pretty arcane, example would be good.
-@node save-tracepoints
-@subsection @code{save-tracepoints @var{filename}}
+@node save tracepoints
+@subsection @code{save tracepoints @var{filename}}
+@kindex save tracepoints
@kindex save-tracepoints
@cindex save tracepoints for future sessions
@@ -10184,7 +10211,8 @@ This command saves all current tracepoint definitions together with
their actions and passcounts, into a file @file{@var{filename}}
suitable for use in a later debugging session. To read the saved
tracepoint definitions, use the @code{source} command (@pxref{Command
-Files}).
+Files}). The @w{@code{save-tracepoints}} command is a deprecated
+alias for @w{@code{save tracepoints}}
@node Tracepoint Variables
@section Convenience Variables for Tracepoints