aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2018-09-18 13:53:43 -0400
committerSergio Durigan Junior <sergiodj@redhat.com>2018-09-18 13:54:02 -0400
commit5031d0ae0b9fb1a42eb8ff9d2b5098a56774cee1 (patch)
tree7bed3bfe2c8a65edcdb376141ddb0c063b7a20e1 /gdb/testsuite/gdb.arch
parentb4c0d1a440d054cd198041ddf0ba43b83794186f (diff)
downloadgdb-5031d0ae0b9fb1a42eb8ff9d2b5098a56774cee1.zip
gdb-5031d0ae0b9fb1a42eb8ff9d2b5098a56774cee1.tar.gz
gdb-5031d0ae0b9fb1a42eb8ff9d2b5098a56774cee1.tar.bz2
Expect optional "arch=" when executing "-stack-list-frames" on gdb.arch/amd64-invalid-stack-top.exp
Another case of incomplete regexp. The problem is very similar to the one happening with gdb.arch/amd64-invalid-stack-middle.exp. The output when GDB is compiled with "--enable-targets" is: (gdb) interpreter-exec mi "-stack-list-frames" ^done,stack=[frame={level="0",addr="0x00000000004005e7",func="func2",arch="i386:x86-64"}] While the output when "--enable-targets" is not specified is: (gdb) interpreter-exec mi "-stack-list-frames" ^done,stack=[frame={level="0",addr="0x00000000004005e7",func="func2"}] The fix is, again, to extend the current regexp and expect for the optional "arch=" part. With this patch, the test now passes on both scenarios. OK? gdb/testsuite/ChangeLog: 2018-09-18 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.arch/amd64-invalid-stack-top.exp: Expect optional "arch=" keyword when executing "-stack-list-frames".
Diffstat (limited to 'gdb/testsuite/gdb.arch')
-rw-r--r--gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp b/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
index 64bcfe0..d3a4eab 100644
--- a/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
+++ b/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
@@ -72,9 +72,9 @@ if ![runto breakpt] {
}
gdb_test "interpreter-exec mi \"-stack-list-frames\"" \
- "\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"func2\"\}\\\]" \
+ "\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"func2\"(,arch=\"\[^\"\]+\")?\}\\\]" \
"check mi -stack-list-frames command, first time"
gdb_test "interpreter-exec mi \"-stack-list-frames\"" \
- "\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"func2\"\}\\\]" \
+ "\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"func2\"(,arch=\"\[^\"\]+\")?\}\\\]" \
"check mi -stack-list-frames command, second time"