aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2010-03-31 17:59:49 +0000
committerStan Shebs <shebs@codesourcery.com>2010-03-31 17:59:49 +0000
commit8bf6485c1cee41f31564e1097199ff67a3615ebe (patch)
treeb7579caf3a6e8a889331ba48e7b6bfcb9acc1d29 /gdb/tracepoint.c
parentf3c8116cd2e02ccb2bd1bfc131554027b2efe190 (diff)
downloadfsf-binutils-gdb-8bf6485c1cee41f31564e1097199ff67a3615ebe.zip
fsf-binutils-gdb-8bf6485c1cee41f31564e1097199ff67a3615ebe.tar.gz
fsf-binutils-gdb-8bf6485c1cee41f31564e1097199ff67a3615ebe.tar.bz2
2010-03-31 Stan Shebs <stan@codesourcery.com>
* breakpoint.c (tracepoint_save_command): Include variables, conditionals, tracepoint types, and default-collect. * tracepoint.c (save_trace_state_variables): New function. * tracepoint.h (save_trace_state_variables): Declare it. * gdb.trace/save-trace.exp: Test save/restore of default-collect and tracepoint conditionals. (gdb_verify_tracepoints): Delete unused return.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index ae0e040..acba11f 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -479,6 +479,23 @@ tvariables_info (char *args, int from_tty)
tvariables_info_1 ();
}
+/* Stash definitions of tsvs into the given file. */
+
+void
+save_trace_state_variables (struct ui_file *fp)
+{
+ struct trace_state_variable *tsv;
+ int ix;
+
+ for (ix = 0; VEC_iterate (tsv_s, tvariables, ix, tsv); ++ix)
+ {
+ fprintf_unfiltered (fp, "tvariable $%s", tsv->name);
+ if (tsv->initial_value)
+ fprintf_unfiltered (fp, " = %s", plongest (tsv->initial_value));
+ fprintf_unfiltered (fp, "\n");
+ }
+}
+
/* ACTIONS functions: */
/* The three functions: