aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorKwok Yeung <kcy@sourceware.org>2011-05-12 12:09:17 +0000
committerKwok Yeung <kcy@sourceware.org>2011-05-12 12:09:17 +0000
commitd248b706a328fbba18c4320880b36df5488b1e91 (patch)
tree4147e6bb3093b75c1a62833173b0213b060505bf /gdb/doc
parentde1491f042ec18741bc7427aeb69d9c5ffa1cbd7 (diff)
downloadgdb-d248b706a328fbba18c4320880b36df5488b1e91.zip
gdb-d248b706a328fbba18c4320880b36df5488b1e91.tar.gz
gdb-d248b706a328fbba18c4320880b36df5488b1e91.tar.bz2
Add support for enabling and disabling tracepoints while a trace
experiment is still running. gdb/ * breakpoint.c (disable_breakpoint): Disable all locations associated with a tracepoint on target if a trace experiment is running. (disable_command): Disable a specific tracepoint location on target if a trace experiment is running. (do_enable_breakpoint): Enable all locations associated with a tracepoint on target if a trace experiment is running. (enable_command) Enable a specific tracepoint location on target if a trace experiment is running. * target.c (update_current_target): Add INHERIT and de_fault clauses for to_supports_enable_disable_tracepoint, to_enable_tracepoint and to_disable_tracepoint. * target.h: Add declaration of struct bp_location. (struct target_ops): Add new functions to_supports_enable_disable_tracepoint, to_enable_tracepoint and to_disable_tracepoint to target operations. (target_supports_enable_disable_tracepoint): New macro. (target_enable_tracepoint): New macro. (target_disable_tracepoint): New macro. * remote.c (struct remote_state): Add new field. (remote_enable_disable_tracepoint_feature): New. (remote_protocol_features): Add new entry. (remote_supports_enable_disable_tracepoint): New. (remote_enable_tracepoint): New. (remote_disable_tracepoint): New. (init_remote_ops): Add remote_enable_tracepoint, remote_disable_tracepoint and remote_supports_enable_disable_tracepoint to remote operations. * tracepoint.c (start_tracing): Allow tracing to start without any tracepoints enabled with just a warning if they can be re-enabled later. * NEWS: Add news item for the new behaviour of the enable and disable GDB commands when applied to tracepoints. Add news items for the new remote packets QTEnable and QTDisable. gdb/doc/ * gdb.texinfo: Document change in the behaviour of the enable and disable GDB commands when applied to tracepoints. Document the EnableDisableTracepoints remote stub feature. Document QTEnable and QTDisable in the list of tracepoint packets. gdb/gdbserver/ * server.c (handle_query): Add EnableDisableTracepoints to the list of supported features. * tracepoint.c (clear_installed_tracepoints): Uninstall disabled tracepoints. (cmd_qtenable_disable): New. (cmd_qtstart): Install tracepoints even if disabled. (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on receiving a QTEnable or QTDisable packet. (gdb_collect): Skip data collection if fast tracepoint is disabled. (ust_marker_to_static_tracepoint): Do not ignore disabled static tracepoints. (gdb_probe): Skip data collection if static tracepoint is disabled.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog7
-rw-r--r--gdb/doc/gdb.texinfo38
2 files changed, 41 insertions, 4 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 1a987ef..40f93ee 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * gdb.texinfo: Document change in the behaviour of the enable and
+ disable GDB commands when applied to tracepoints.
+ Document the EnableDisableTracepoints remote stub feature.
+ Document QTEnable and QTDisable in the list of tracepoint packets.
+
2011-05-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (GDB_DOC_SOURCE_INCLUDES): Rename inc-hist.texinfo to
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index da2c784..67436dd 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -10026,14 +10026,20 @@ These commands are deprecated; they are equivalent to plain @code{disable} and @
@item disable tracepoint @r{[}@var{num}@r{]}
Disable tracepoint @var{num}, or all tracepoints if no argument
@var{num} is given. A disabled tracepoint will have no effect during
-the next trace experiment, but it is not forgotten. You can re-enable
+a trace experiment, but it is not forgotten. You can re-enable
a disabled tracepoint using the @code{enable tracepoint} command.
+If the command is issued during a trace experiment and the debug target
+has support for disabling tracepoints during a trace experiment, then the
+change will be effective immediately. Otherwise, it will be applied to the
+next trace experiment.
@kindex enable tracepoint
@item enable tracepoint @r{[}@var{num}@r{]}
-Enable tracepoint @var{num}, or all tracepoints. The enabled
-tracepoints will become effective the next time a trace experiment is
-run.
+Enable tracepoint @var{num}, or all tracepoints. If this command is
+issued during a trace experiment and the debug target supports enabling
+tracepoints during a trace experiment, then the enabled tracepoints will
+become effective immediately. Otherwise, they will become effective the
+next time a trace experiment is run.
@end table
@node Tracepoint Passcounts
@@ -33627,6 +33633,11 @@ These are the currently defined stub features and their properties:
@tab @samp{-}
@tab No
+@item @samp{EnableDisableTracepoints}
+@tab No
+@tab @samp{-}
+@tab No
+
@end multitable
These are the currently defined stub features, in more detail:
@@ -33739,6 +33750,11 @@ The remote stub understands the @samp{QAllow} packet.
@cindex static tracepoints, in remote protocol
The remote stub supports static tracepoints.
+@item EnableDisableTracepoints
+The remote stub supports the @samp{QTEnable} (@pxref{QTEnable}) and
+@samp{QTDisable} (@pxref{QTDisable}) packets that allow tracepoints
+to be enabled and disabled while a trace experiment is running.
+
@end table
@item qSymbol::
@@ -33819,6 +33835,8 @@ packets.)
@item qTsV
@itemx QTStart
@itemx QTStop
+@itemx QTEnable
+@itemx QTDisable
@itemx QTinit
@itemx QTro
@itemx qTStatus
@@ -34308,6 +34326,18 @@ instruction reply packet}).
@item QTStop
End the tracepoint experiment. Stop collecting trace frames.
+@item QTEnable:@var{n}:@var{addr}
+@anchor{QTEnable}
+Enable tracepoint @var{n} at address @var{addr} in a started tracepoint
+experiment. If the tracepoint was previously disabled, then collection
+of data from it will resume.
+
+@item QTDisable:@var{n}:@var{addr}
+@anchor{QTDisable}
+Disable tracepoint @var{n} at address @var{addr} in a started tracepoint
+experiment. No more data will be collected from the tracepoint unless
+@samp{QTEnable:@var{n}:@var{addr}} is subsequently issued.
+
@item QTinit
Clear the table of tracepoints, and empty the trace frame buffer.