From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15407 invoked by alias); 16 Mar 2019 08:30:48 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 15385 invoked by uid 89); 16 Mar 2019 08:30:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1115, TIA, tia, H*r:sk:gdb@sou X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 16 Mar 2019 08:30:47 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h54iB-0005Oi-Ok for gdb@sourceware.org; Sat, 16 Mar 2019 04:30:37 -0400 Received: from [176.228.60.248] (port=1121 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h54i9-00037V-Nv for gdb@sourceware.org; Sat, 16 Mar 2019 04:30:34 -0400 Date: Sat, 16 Mar 2019 08:30:00 -0000 Message-Id: <835zsjz0f8.fsf@gnu.org> From: Eli Zaretskii To: gdb@sourceware.org Subject: How to load C++ pretty-printers X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00036.txt.bz2 I have a question regarding loading the C++ pretty-printers provided by GCC. This might be specific to MS-Windows, not sure. So I have the C++ pretty-printers installed in d:/usr/share/gcc-7.3.0/python/libstdcxx/v6. I start GDB to debug itself. The "info pretty-printer" command says: (top-gdb) info pretty-printer global pretty-printers: builtin mpx_bound128 objfile D:\gnu\gdb-8.2\gdb\gdb.exe pretty-printers: type_lookup_function This doesn't seem to mention the GCC-provided C++ pretty-printers. So I start the inferior GDB running: (top-gdb) start --config After that, "info pretty-printers" still shows no C++ pretty-printers. OK, me thinks, this could be because libstdc++ is statically linked into GDB, so I load the pretty-printers by hand: (top-gdb) source d:/usr/share/gcc-7.3.0/python/libstdcxx/v6/printers.py But "info pretty-printers" command still doesn't show the C++ pretty-printers I just loaded. What am I missing here? How does one load and enable the C++ pretty-printers provided with GCC? Do I need some magic in my ~/.gdbinit file to do that? TIA