]> git.feebdaed.xyz Git - 0xmirror/binutils-gdb.git/commit
[gdb/testsuite] Fix gdb.cp/typeid.exp with m32 PIE
authorTom de Vries <tdevries@suse.de>
Tue, 16 Dec 2025 20:10:11 +0000 (21:10 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 16 Dec 2025 20:10:11 +0000 (21:10 +0100)
commit51abd34365f7f39a9e1d240a665273530f7c4752
treef69351b45cc029fa81ccfd211d6f59a7bbfaeeae
parent272c02e9f5e65813bbeefc9f52b0e153990ada0e
[gdb/testsuite] Fix gdb.cp/typeid.exp with m32 PIE

On x86_64-linux, if I run test-case gdb.cp/typeid.exp with target boards:
- unix/-m64
- unix/-m32
- unix/-fPIE/-pie/-m64
- unix/-fPIE/-pie/-m32
for only target board unix/-fPIE/-pie/-m32 I get:
...
(gdb) print &typeid(i)^M
could not find typeinfo symbol for 'int'^M
(gdb) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(i)
print &typeid(i) == &typeid(typeof(i))^M
could not find typeinfo symbol for 'int'^M
(gdb) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(i) == &typeid(typeof(i))
print &typeid(cp)^M
could not find typeinfo symbol for 'char*'^M
(gdb) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(cp)
print &typeid(cp) == &typeid(typeof(cp))^M
could not find typeinfo symbol for 'char*'^M
(gdb) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(cp) == &typeid(typeof(cp))
print &typeid(ccp)^M
could not find typeinfo symbol for 'char const*'^M
(gdb) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(ccp)
print &typeid(ccp) == &typeid(typeof(ccp))^M
could not find typeinfo symbol for 'char const*'^M
(gdb) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(ccp) == &typeid(typeof(ccp))
...

This is yet another configuration for which these tests don't work.

We're already allowing this for clang and istarget "powerpc*-*-*".

I don't think there is value in trying to detect yet another configuration.

Instead, just allow it in general.

Tested on x86_64-linux.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/testsuite/gdb.cp/typeid.exp