-# Copyright 1998-2013 Free Software Foundation, Inc.
+# Copyright 1998-2019 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
standard_testfile
-if [prepare_for_testing ${testfile}.exp $testfile $srcfile \
+if [prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug nowarnings}] {
- untested "failed to prepare for trace tests"
return -1
}
if ![gdb_target_supports_trace] {
unsupported "target does not support trace"
- return -1;
+ return -1
}
set BUFFER_SIZE 4
# Save default trace buffer size in 'default_size'.
gdb_test_multiple "tstatus" $test {
- -re ".*Trace buffer has ($decimal) bytes of ($decimal) bytes free.*" {
+ -re ".*Trace buffer has ($decimal) bytes of ($decimal) bytes free.*$gdb_prompt $" {
set default_size $expect_out(2,string)
pass $test
}
# If we did not get the default size then there is no point in running the
# tests below.
if { $default_size < 0 } {
- return -1;
+ return -1
}
# Change buffer size to 'BUFFER_SIZE'.
"Requested size of trace buffer is $BUFFER_SIZE.*" \
"show trace buffer size"
+# -1 means "no limit on GDB's end. Let the target choose."
gdb_test_no_output \
"set trace-buffer-size -1" \
"set trace buffer size 2"
+# "unlimited" means the same.
+gdb_test_no_output "set trace-buffer-size unlimited"
+
# Test that tstatus gives us default buffer size now.
gdb_test "tstatus" \
".*Trace buffer has $decimal bytes of $default_size bytes free.*" \