aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
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: