A following patch will make gdb_test error out if bogus arguments are
passed, which exposed bugs in a few testcases:
- gdb.python/py-parameter.exp, passing a spurious "1" as extra
parameter, resulting in:
ERROR: Unexpected arguments: {set test-file-param bar.txt} {The name of the file has been changed to bar.txt} {set new file parameter} 1
- gdb.python/py-xmethods.exp, a missing test message, resulting in
the next gdb_test being interpreted as message, question and
response! With the enforcing patch, this was caught with:
ERROR: Unexpected arguments: {p g.mul<char>('a')} {From Python G<>::mul.*} gdb_test {p g_ptr->mul<char>('a')} {From Python G<>::mul.*} {after: g_ptr->mul<char>('a')}
- gdb.base/pointers.exp, missing a quote.
Change-Id: I66f2db4412025a64121db7347dfb0b48240d46d4
gdb_test "break marker1" ".*" ""
gdb_test "cont" "Break.* marker1 \\(\\) at .*:$decimal.*" \
- continue to marker1"
+ "continue to marker1"
gdb_test "up" "more_code.*" "up from marker1"
gdb_test "print *pUC" " = 21 \'.025\'.*" "print value of *pUC"
"The name of the file is foo.txt.*" "show initial file value"
gdb_test "set test-file-param bar.txt" \
"The name of the file has been changed to bar.txt" \
- "set new file parameter" 1
+ "set new file parameter"
gdb_test "show test-file-param" \
"The name of the file is bar.txt.*" "show new file value"
gdb_test "python print (test_file_param.value)" \
gdb_test "p g.mul<double>(2.0)" "From Python G<>::mul.*" \
"after: g.mul<double>(2.0)"
gdb_test "p g.mul<char>('a')" "From Python G<>::mul.*" \
+ "after: g.mul<char>('a')"
gdb_test "p g_ptr->mul<char>('a')" "From Python G<>::mul.*" \
"after: g_ptr->mul<char>('a')"