diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2018-09-18 13:53:06 -0400 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2018-09-18 13:53:28 -0400 |
commit | b4c0d1a440d054cd198041ddf0ba43b83794186f (patch) | |
tree | 273fb5cdb5bf5f4414fd8b0c9e8224648d6ea3e4 /gdb | |
parent | 7a6d2b458f95030f433a0dcdabd5cda7ee695a9b (diff) | |
download | fsf-binutils-gdb-b4c0d1a440d054cd198041ddf0ba43b83794186f.zip fsf-binutils-gdb-b4c0d1a440d054cd198041ddf0ba43b83794186f.tar.gz fsf-binutils-gdb-b4c0d1a440d054cd198041ddf0ba43b83794186f.tar.bz2 |
Expect optional "arch=" when executing "-stack-list-frames" on gdb.arch/amd64-invalid-stack-middle.exp
While regression-testing GDB on Fedora Rawhide, I saw the following
output when running gdb.arch/amd64-invalid-stack-middle.exp's
"-stack-list-frames" test:
(gdb) interpreter-exec mi "-stack-list-frames"
^done,stack=[frame={level="0",addr="0x000000000040115a",func="breakpt",file="amd64-invalid-stack-middle.c",fullname="/home/sergio/fedora/gdb/master/gdb-8.2.50.20180917/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c",line="27",arch="i386:x86-64"},frame={level="1",addr="0x000000000040116a",func="func5",file="amd64-invalid-stack-middle.c",fullname="/home/sergio/fedora/gdb/master/gdb-8.2.50.20180917/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c",line="32",arch="i386:x86-64"},frame={level="2",addr="0x000000000040117a",func="func4",file="amd64-invalid-stack-middle.c",fullname="/home/sergio/fedora/gdb/master/gdb-8.2.50.20180917/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c",line="38",arch="i386:x86-64"},frame={level="3",addr="0x000000000040118a",func="func3",file="amd64-invalid-stack-middle.c",fullname="/home/sergio/fedora/gdb/master/gdb-8.2.50.20180917/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c",line="44",arch="i386:x86-64"}]
This test is currently failing on Rawhide. However, this output is
almost the same as I get on my local Fedora 28 machine (where the test
is passing):
(gdb) interpreter-exec mi "-stack-list-frames"
^done,stack=[frame={level="0",addr="0x00000000004005da",func="breakpt",file="amd64-invalid-stack-middle.c",fullname="/home/sergio/work/src/git/binutils-gdb/binutils-gdb/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c",line="27"},frame={level="1",addr="0x00000000004005ea",func="func5",file="amd64-invalid-stack-middle.c",fullname="/home/sergio/work/src/git/binutils-gdb/binutils-gdb/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c",line="32"},frame={level="2",addr="0x00000000004005fa",func="func4",file="amd64-invalid-stack-middle.c",fullname="/home/sergio/work/src/git/binutils-gdb/binutils-gdb/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c",line="38"},frame={level="3",addr="0x000000000040060a",func="func3",file="amd64-invalid-stack-middle.c",fullname="/home/sergio/work/src/git/binutils-gdb/binutils-gdb/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.c",line="44"}]
With the exception that there's an "arch=" keyword on Fedora Rawhide's
version. This is because, on Rawhide, I've compiled GDB with
"--enable-targets=xyz,kqp,etc.", while locally I haven't.
This is easy to fix: we just have to extend the regexp and expect for
the optional "arch=" keyword there. It's what this patch does. With
it applied, the test now passes everywhere.
OK?
gdb/testsuite/ChangeLog:
2018-09-18 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb.arch/amd64-invalid-stack-middle.exp: Expect optional
"arch=" keyword when executing "-stack-list-frames".
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1c93b7c..8c0438f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2018-09-18 Sergio Durigan Junior <sergiodj@redhat.com> + * gdb.arch/amd64-invalid-stack-middle.exp: Expect optional + "arch=" keyword when executing "-stack-list-frames". + +2018-09-18 Sergio Durigan Junior <sergiodj@redhat.com> + * gdb.ada/complete.exp: Expect for "@" when doing "complete break ada". diff --git a/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp b/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp index c00bfa1..2bb0344 100644 --- a/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp +++ b/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp @@ -70,9 +70,9 @@ if ![runto breakpt] { } gdb_test "interpreter-exec mi \"-stack-list-frames\"" \ - "\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"breakpt\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"func5\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"func4\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"\},frame=\{level=\"3\",addr=\"$hex\",func=\"func3\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"\}\\\]" \ + "\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"breakpt\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"(,arch=\"\[^\"\]+\")?\},frame=\{level=\"1\",addr=\"$hex\",func=\"func5\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"(,arch=\"\[^\"\]+\")?\},frame=\{level=\"2\",addr=\"$hex\",func=\"func4\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"(,arch=\"\[^\"\]+\")?\},frame=\{level=\"3\",addr=\"$hex\",func=\"func3\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"(,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=\"breakpt\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"func5\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"func4\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"\},frame=\{level=\"3\",addr=\"$hex\",func=\"func3\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"\}\\\]" \ + "\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"breakpt\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"(,arch=\"\[^\"\]+\")?\},frame=\{level=\"1\",addr=\"$hex\",func=\"func5\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"(,arch=\"\[^\"\]+\")?\},frame=\{level=\"2\",addr=\"$hex\",func=\"func4\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"(,arch=\"\[^\"\]+\")?\},frame=\{level=\"3\",addr=\"$hex\",func=\"func3\",file=\"\[^\"\]+\",fullname=\"\[^\"\]+\",line=\"${decimal}\"(,arch=\"\[^\"\]+\")?\}\\\]" \ "check mi -stack-list-frames command, second time" |