[gdb/testsuite] Fix gdb.python/py-disasm.exp on s390x
authorTom de Vries <tdevries@suse.de>
Tue, 13 Dec 2022 12:06:15 +0000 (13:06 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 13 Dec 2022 12:06:15 +0000 (13:06 +0100)
commitfa59ab98685e4b5431d2be423f449df5069a454e
tree5966e579d9113fe0c93d200b9617dbab2d686671
parent969b9a36506bfb386f8ce30f88f1a6a6ebbaca6e
[gdb/testsuite] Fix gdb.python/py-disasm.exp on s390x

On s390x-linux, I run into:
...
(gdb) disassemble test^M
Dump of assembler code for function test:^M
   0x0000000001000638 <+0>:     stg     %r11,88(%r15)^M
   0x000000000100063e <+6>:     lgr     %r11,%r15^M
   0x0000000001000642 <+10>:    nop     0^M
=> 0x0000000001000646 <+14>:    nop     0^M
   0x000000000100064a <+18>:    nop     0^M
   0x000000000100064e <+22>:    lhi     %r1,0^M
   0x0000000001000652 <+26>:    lgfr    %r1,%r1^M
   0x0000000001000656 <+30>:    lgr     %r2,%r1^M
   0x000000000100065a <+34>:    lg      %r11,88(%r11)^M
   0x0000000001000660 <+40>:    br      %r14^M
End of assembler dump.^M
(gdb) FAIL: gdb.python/py-disasm.exp: global_disassembler=: disassemble test
...

The problem is that the test-case expects "nop" but on s390x we have instead
"nop\t0".

Fix this by allowing the insn.

Tested on s390x-linux and x86_64-linux.
gdb/testsuite/gdb.python/py-disasm.exp
gdb/testsuite/gdb.python/py-disasm.py