[12/14] gdb/testsuite: Skip on of the interp.exp test for remote targets
Commit Message
From: Anton Kolesov <Anton.Kolesov@synopsys.com>
One of the tests in interp.exp invokes `-stack-info-frame` through MI and
expects that it will return "no registers", because application is not being
run. However, if this is done with gdbserver, then GDB is already connected to
the server, therefore registers actually exist and the test fails.
gdb/testsuite/ChangeLog:
2016-08-19 Anton Kolesov <Anton.Kolesov@synopsys.com>
* gdb.base/interp.exp: Skip "stack-info-frame" test
if gdbserver was used.
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
---
gdb/testsuite/gdb.base/interp.exp | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
@@ -44,14 +44,18 @@ gdb_test_multiple "interpreter-exec mi \"-break-insert --thread a\"" \
}
}
-set cmd "interpreter-exec mi \"-stack-info-frame\""
-gdb_test_multiple $cmd $cmd {
- -re ".error,msg=.No registers\..\r\n$gdb_prompt " {
- pass "$cmd"
- gdb_expect 1 {
- -re "\r\n$gdb_prompt $" { }
- }
- }
+# If this is a remote target, then GDB already connected to the server, so
+# registers do exist and this test doesn't make sense.
+if !$use_gdb_stub {
+ set cmd "interpreter-exec mi \"-stack-info-frame\""
+ gdb_test_multiple $cmd $cmd {
+ -re ".error,msg=.No registers\..\r\n$gdb_prompt " {
+ pass "$cmd"
+ gdb_expect 1 {
+ -re "\r\n$gdb_prompt $" { }
+ }
+ }
+ }
}
set cmd "interpreter-exec mi1 \"-break-insert main\""