From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9BDF839B681A; Wed, 21 Apr 2021 15:55:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BDF839B681A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99453] libstdc++*-gdb.py installation depends on library naming Date: Wed, 21 Apr 2021 15:55:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 15:55:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99453 --- Comment #5 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:c2fc1702cb3a3d5cc9c40de47f63b4c8f3f1d09c commit r12-46-gc2fc1702cb3a3d5cc9c40de47f63b4c8f3f1d09c Author: Philippe Blain Date: Fri Mar 12 19:26:46 2021 -0500 libstdc++: Install libstdc++*-gdb.py more robustly [PR 99453] In order for GDB to auto-load the pretty printers, they must be install= ed as "libstdc++.$ext-gdb.py", where 'libstdc++.$ext' is the name of the object file that is loaded by GDB [1], i.e. the libstdc++ shared librar= y. The approach taken in libstdc++-v3/python/Makefile.am is to loop over files matching 'libstdc++*' in $(DESTDIR)$(toolexeclibdir) and choose the last file matching that glob that is not a symlink, the Libtool '*.la' file or a Python file. That works fine for ELF targets where the matching names are: libstdc++.a libstdc++.so libstdc++.so.6 libstdc++.so.6.0.29 But not for macOS with: libstdc++.6.dylib libstdc++.a Or MinGW with: libstdc++-6.dll libstdc++.dll.a Try to make a better job at installing the pretty printers with the correct name by copying the approach taken by isl [2], that is, using a sed invocation on the Libtool-generated 'libstdc++.la' to read the correct name for the current platform. [1] https://sourceware.org/gdb/onlinedocs/gdb/objfile_002dgdbdotext-file.html [2] https://repo.or.cz/isl.git/blob/HEAD:/Makefile.am#l611 libstdc++-v3/ChangeLog: PR libstdc++/99453 * python/Makefile.am: Install libstdc++*-gdb.py more robustly. * python/Makefile.in: Regenerate. Co-authored-by: Jonathan Wakely =