diff options
author | Tom de Vries <tdevries@suse.de> | 2022-10-13 09:43:23 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-10-13 09:43:23 +0200 |
commit | 0ffa92773a25042d97a6df74062270a03cb84982 (patch) | |
tree | 61914acddabd7282e8ba076311dad053a791d61c /intl/dgettext.c | |
parent | 1d4e62f498b1340569fd58c401f98c287cb5d071 (diff) | |
download | gdb-0ffa92773a25042d97a6df74062270a03cb84982.zip gdb-0ffa92773a25042d97a6df74062270a03cb84982.tar.gz gdb-0ffa92773a25042d97a6df74062270a03cb84982.tar.bz2 |
[gdb/testsuite] Fix gdb.mi/mi-disassemble.exp with -m32
With target board unix/-m32 and test-case gdb.mi/mi-disassemble.exp we have:
...
(gdb) ^M
print/x *((unsigned char *) 0x8048485)^M
&"print/x *((unsigned char *) 0x8048485)\n"^M
~"$9 = 0x83\n"^M
^done^M
(gdb) ^M
PASS: gdb.mi/mi-disassemble.exp: get valueof "*((unsigned char *) 0x8048485)"
FAIL: gdb.mi/mi-disassemble.exp: byte at 0x8048485 matches
...
The test-case passes with native.
With native we see in gdb.log that variable longest_insn_bytes is:
...
Longest instruction at 0x0000000000400549 with bytes '48 8b 05 20 01 00 00'
...
and variable split_bytes (added debug puts) ends up as:
...
SPLIT_BYTES: 48 8b 05 20 01 00 00
...
But with unix/-m32 we have longest_insn_byte:
...
Longest instruction at 0x08048481 with bytes '8d 4c 24 04 '
...
and split_bytes ends up as:
...
SPLIT_BYTES: 8d 4c 24 04 {} {} {} {} {} {} {} {}
...
so the trailing whitespace is translated by split to empty bytes, and the
mismatch FAILs are generated for those.
Fix this by stripping the whitespace, which makes us end up with a different
and indeed longer insn:
...
Longest instruction at 0x08048492 with bytes 'dd 05 98 85 04 08'
...
Tested on x86_64-linux, with native and target board unix/-m32.
Diffstat (limited to 'intl/dgettext.c')
0 files changed, 0 insertions, 0 deletions