From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A41F83857823; Sun, 7 Mar 2021 10:30:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A41F83857823 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug c++/27539] New: FAIL: gdb.cp/typeid.exp: before starting: print &typeid(i) Date: Sun, 07 Mar 2021 10:30:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 10:30:02 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27539 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) =3D=3D &typeid(typeof(i)) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(cp) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(cp) =3D=3D &typeid(typeof(cp)) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(ccp) FAIL: gdb.cp/typeid.exp: before starting: print &typeid(ccp) =3D=3D &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 (in= t)" Temporary breakpoint 1 at 0x40112a: file typeid.cc, line 52. Temporary breakpoint 1, main () at typeid.cc:52 52 const std::type_info &xi =3D typeid(i); $1 =3D {_vptr.type_info =3D 0x7ffff7fa0218 , __name =3D 0x7ffff7f31554 "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 '@'. --=20 You are receiving this mail because: You are on the CC list for the bug.=