aboutsummaryrefslogtreecommitdiff
path: root/libctf
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-12-12 15:21:33 +0100
committerTom de Vries <tdevries@suse.de>2022-12-12 15:21:33 +0100
commitb99ceddc917ab623cfe663c3aab5cc45e3b98b57 (patch)
treee524bb52a587877c3a78e9819105222e0b63cf1d /libctf
parentc8628c770bc9055cfd42cfc2e3c416495653f5f8 (diff)
downloadgdb-b99ceddc917ab623cfe663c3aab5cc45e3b98b57.zip
gdb-b99ceddc917ab623cfe663c3aab5cc45e3b98b57.tar.gz
gdb-b99ceddc917ab623cfe663c3aab5cc45e3b98b57.tar.bz2
[gdb/testsuite] Fix PR20630 regression test in gdb.base/printcmds.exp
On s390x-linux, I run into: ... (gdb) print {unsigned char}{65}^M $749 = 0 '\000'^M (gdb) FAIL: gdb.base/printcmds.exp: print {unsigned char}{65} ... In contrast, on x86_64-linux, we have: ... (gdb) print {unsigned char}{65}^M $749 = 65 'A'^M (gdb) PASS: gdb.base/printcmds.exp: print {unsigned char}{65} ... The first problem here is that the test is supposed to be a regression test for PR20630, which can be reproduced (for an unfixed gdb) like this: ... (gdb) p {unsigned char[]}{0x17} gdbtypes.c:4641: internal-error: copy_type: \ Assertion `TYPE_OBJFILE_OWNED (type)' failed. ... but it's not due to insufficient quoting (note the dropped '[]'). That's easy to fix, but after that we have on s390 (big endian): ... (gdb) print {unsigned char[]}{65}^M $749 = ""^M ... and on x86_64 (little endian): ... (gdb) print {unsigned char[]}{65}^M $749 = "A"^M ... Fix this by using 0xffffffff, such that in both cases we have: ... (gdb) print {unsigned char[]}{0xffffffff}^M $749 = "\377\377\377\377"^M ... Tested on x86_64-linux and s390x-linux.
Diffstat (limited to 'libctf')
0 files changed, 0 insertions, 0 deletions