I got a report of a failure from Linaro's CI testing for the test
gdb.base/startup-with-shell.exp.
Looking at the log I see this:
(gdb) PASS: gdb.base/startup-with-shell.exp: startup_with_shell = on; run_args = *.unique-extension: inferior started
print argv[1]
$1 = 0xfffed978 "/home/tcwg-build/workspace/tcwg_gnu_4/abe/builds/armv8l-unknown-linux-gnueabihf/armv8l-unknown-linux-gnueabihf/gdb-gdb.git~master/gdb/testsuite/outputs/gdb.base/startup-with-shell/unique-file.unique-e"...
(gdb) FAIL: gdb.base/startup-with-shell.exp: startup_with_shell = on; run_args = *.unique-extension: first argument expanded
Notice that the value of $1 was truncated (indicated by the trailing
ellipses), and as a result it isn't going to match the expected output
pattern.
Avoid this by adding a call to 'set print characters unlimited' which
allows GDB to print strings of any length.
Approved-By: Tom de Vries <tdevries@suse.de>
with_test_prefix "startup_with_shell = on; run_args = *.unique-extension" {
initial_setup_simple "on" "$unique_file_dir/*.unique-extension"
+ gdb_test_no_output "set print characters unlimited"
gdb_test "print argv\[1\]" "\\\$$decimal = $hex \"$unique_file\"" \
"first argument expanded"
}