Since
ed01945057c "Make gdb_test's question non-optional if specified",
if the question and response parameters are given to gdb_test, the
framework enforces that GDB asks the question. Before this patch, tests
needed to use gdb_test_multiple to enforce this.
This patch updates the gdb.dwarf2/calling-convention.exp testcase to use
gdb_test to check that GDB asks a question. This replaces the more
complicated gdb_test_multiple based implementation.
Tested on x86_64-gnu-linux.
Change-Id: I7216e822ca68f2727e0450970097d74c27c432fe
gdb_breakpoint "foo"
gdb_continue_to_breakpoint "foo"
-gdb_test_multiple "return 35" "" {
- -re "Function 'foo' does not follow the target calling convention.\r\nIf you continue, setting the return value will probably lead to unpredictable behaviors.\r\nMake foo return now\\? \\(y or n\\) $" {
- pass $gdb_test_name
- gdb_test "n" "Not confirmed" "cancel return"
- }
-}
+gdb_test "return 35" \
+ "Not confirmed" \
+ "return 35" \
+ [multi_line \
+ "Function 'foo' does not follow the target calling convention\\." \
+ "If you continue, setting the return value will probably lead to unpredictable behaviors\\." \
+ "Make foo return now\\? \\(y or n\\) $"] \
+ "n"
gdb_test "finish" [multi_line \
"Run till exit from #0 $hex in foo \\(\\)" \