public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27539] New: FAIL: gdb.cp/typeid.exp: before starting: print &typeid(i)
@ 2021-03-07 10:30 vries at gcc dot gnu.org
2021-11-22 13:57 ` [Bug c++/27539] " vries at gcc dot gnu.org
2024-03-27 7:00 ` vries at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: vries at gcc dot gnu.org @ 2021-03-07 10:30 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27539
Bug ID: 27539
Summary: FAIL: gdb.cp/typeid.exp: before starting: print
&typeid(i)
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
On openSUSE tumbleweed, I run into:
...
FAIL: gdb.cp/typeid.exp: before starting: print &typeid(i)
FAIL: gdb.cp/typeid.exp: before starting: print &typeid(i) ==
&typeid(typeof(i))
FAIL: gdb.cp/typeid.exp: before starting: print &typeid(cp)
FAIL: gdb.cp/typeid.exp: before starting: print &typeid(cp) ==
&typeid(typeof(cp))
FAIL: gdb.cp/typeid.exp: before starting: print &typeid(ccp)
FAIL: gdb.cp/typeid.exp: before starting: print &typeid(ccp) ==
&typeid(typeof(ccp))
...
The first in more detail:
...
(gdb) file typeid^M
Reading symbols from typeid...^M
(gdb) print &typeid(i)^M
could not find typeinfo symbol for 'int'^M
(gdb) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(i)
...
Easily reproduced on command line using:
...
$ gdb -batch ./outputs/gdb.cp/typeid/typeid -ex "print typeid (int)"
could not find typeinfo symbol for 'int'
...
Interestingly though, if we first start, we get::
...
$ gdb -batch ./outputs/gdb.cp/typeid/typeid -ex start -ex "print typeid (int)"
Temporary breakpoint 1 at 0x40112a: file typeid.cc, line 52.
Temporary breakpoint 1, main () at typeid.cc:52
52 const std::type_info &xi = typeid(i);
$1 = {_vptr.type_info = 0x7ffff7fa0218 <vtable for
__cxxabiv1::__fundamental_type_info+16>, __name = 0x7ffff7f31554 <typeinfo name
for int> "i"}
...
In the latter case we get the minimal symbol from:
...
$ readelf -r /usr/lib64/libstdc++.so.6.0.29 | c++filt | grep "typeinfo for int"
00000020a710 04d300000001 R_X86_64_64 000000000020a738 typeinfo for
int@@CXXABI_1.3 + 0
00000020a730 04d300000001 R_X86_64_64 000000000020a738 typeinfo for
int@@CXXABI_1.3 + 0
...
While in the former case we fail to find the minimal symbol:
...
$ readelf -r ./outputs/gdb.cp/typeid/typeid | c++filt | grep "typeinfo for int"
000000403c20 000a00000005 R_X86_64_COPY 0000000000403c20 typeinfo for
int@CXXABI_1.3 + 0
...
The only difference I notice is '@@' vs '@'.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-27 7:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-07 10:30 [Bug c++/27539] New: FAIL: gdb.cp/typeid.exp: before starting: print &typeid(i) vries at gcc dot gnu.org
2021-11-22 13:57 ` [Bug c++/27539] " vries at gcc dot gnu.org
2024-03-27 7:00 ` vries at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).