]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Handle address class annotation for s390x in some test-cases
authorTom de Vries <tdevries@suse.de>
Wed, 24 Jul 2024 12:56:56 +0000 (14:56 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 24 Jul 2024 12:56:56 +0000 (14:56 +0200)
commit2a215bbf7c0b02cf281aecbc9cb1b56d52ff7fc0
tree2cc8366d42e7a5b602eebcfbd8d724c6ae8179ec
parentd4cea453901b3f1d1e7ea95e8ce0d7860fa9602b
[gdb/testsuite] Handle address class annotation for s390x in some test-cases

On s390x-linux, I ran into:
...
(gdb) ptype crash^M
type = class crash {^M
^M
  public:^M
    crash(int (class {...}::*)(class {...} * const @mode32));^M
}^M
(gdb) FAIL: gdb.dwarf2/dw2-anon-mptr.exp: ptype crash
...

The problem is that the test-case doesn't expect the address class annotation
@mode32.

The test-case uses a .S file, with the address size hard-coded to 4 bytes, and
that's something that is annotated with @mode32 on s390x (which uses 8 byte
addresses).

Fix this by allowing the annotation in the regexp.

Likewise in two other test-cases.

Tested on s390-linux and x86_64-linux.
gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp