aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/tfile.exp
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2010-03-26 01:46:29 +0000
committerStan Shebs <shebs@codesourcery.com>2010-03-26 01:46:29 +0000
commit6c28cbf2b6beb56c99ec084b9bc5adc8d4813894 (patch)
tree1a4837c78b049a3c055de85cba991b2030200ee1 /gdb/testsuite/gdb.trace/tfile.exp
parenta45fc99392bdce4c67b43b1a0a05c77e7112afab (diff)
downloadgdb-6c28cbf2b6beb56c99ec084b9bc5adc8d4813894.zip
gdb-6c28cbf2b6beb56c99ec084b9bc5adc8d4813894.tar.gz
gdb-6c28cbf2b6beb56c99ec084b9bc5adc8d4813894.tar.bz2
2010-03-25 Stan Shebs <stan@codesourcery.com>
* tracepoint.h (trace_stop_reason): Add tracepoint_error. (struct trace_status): New field error_desc. * tracepoint.c (stop_reason_names): Add terror. (current_trace_status): Ensure non-NULL error description. (trace_status_command): Add error report. (trace_status_mi): Ditto. (trace_save): Add special case for error description. (parse_trace_status): Add case for errors. * gdb.texinfo (Tracepoint Packets): Document trace error status. * gdb.trace/tfile.c: Generate an additional trace file, improve portability. * gdb.trace/tfile.exp: Test trace file with an error stop, delete files in a better way.
Diffstat (limited to 'gdb/testsuite/gdb.trace/tfile.exp')
-rw-r--r--gdb/testsuite/gdb.trace/tfile.exp15
1 files changed, 14 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.trace/tfile.exp b/gdb/testsuite/gdb.trace/tfile.exp
index 20af854..a3adfcc 100644
--- a/gdb/testsuite/gdb.trace/tfile.exp
+++ b/gdb/testsuite/gdb.trace/tfile.exp
@@ -47,7 +47,8 @@ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
gdb_reinitialize_dir $srcdir/$subdir
# Make sure we are starting fresh.
-remote_exec build {sh -xc rm\ -f\ basic.tf}
+remote_file host delete basic.tf
+remote_file host delete error.tf
gdb_load $binfile
@@ -83,7 +84,19 @@ Trace buffer has 256 bytes of 4096 bytes free \\(93% full\\).*
Looking at trace frame 0, tracepoint .*" \
"tstatus on trace file"
+# Now start afresh, using only a trace file.
+gdb_exit
+gdb_start
+gdb_load $binfile
+gdb_test "target tfile error.tf" "Created tracepoint.*" "target tfile"
+gdb_test "tstatus" \
+ "Using a trace file.*
+Trace stopped by an error \\(made-up error, tracepoint 1\\).*
+Collected 0 trace frame.*
+Trace buffer has 256 bytes of 4096 bytes free \\(93% full\\).*
+Not looking at any trace frame.*" \
+ "tstatus on error trace file"