From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0Ul2IfLPfGlu9B0AWB0awg (envelope-from ) for ; Fri, 30 Jan 2026 10:36:18 -0500 Received: by simark.ca (Postfix, from userid 112) id 721FC1E08D; Fri, 30 Jan 2026 10:36:18 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C05BC1E08D for ; Fri, 30 Jan 2026 10:36:17 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 5C3C44BC7EFF for ; Fri, 30 Jan 2026 15:36:17 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 7DE134BA2E05 for ; Fri, 30 Jan 2026 15:36:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7DE134BA2E05 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7DE134BA2E05 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769787360; cv=none; b=NW4uAA8gevG2DBjRFRon0ENOHPg7zI0AgVadYS/iEpY9PYvj/YC8mblbCncA+8o6XEAedy/HbFjOHYisSKl3DNLW6riTSn3/8IIgmSCb1giGrB4L9BkLg73RYx37ah5dFSyP16ypDoTdwp2r2tzCe0qVPdrfVuorxJxyObhr8/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769787360; c=relaxed/simple; bh=prQYsweRFBCNV2uR1AEvQ1ZAeg5D76Tim9RIEV0kFvE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=s4Pklru7Zls8wexYSfB2h5U6LP5Lm9O4xPXKLMliIunsqwZ6kdfJcEHaAqONgCo6acKlbQ/n6BctpY+JFNuVUjJ+/1G4mqMJ8OA7NcZLJQYq+L1H3CGMrJx0/gdGnbM/1++KE4gEv7Bce4Ztniw2ZijFwGRUUwAHWaMARvXTq/E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by simark.ca (Postfix) id 5BA8E1E08D; Fri, 30 Jan 2026 10:35:59 -0500 (EST) Message-ID: Date: Fri, 30 Jan 2026 10:35:58 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: GDB variants accepting plugins (to the debugger) ? To: Eli Zaretskii , Basile Starynkevitch Cc: gdb@sourceware.org, team@refpersys.org References: <06d90d0ef774cf4ffd69a675a9092afee18a3446.camel@starynkevitch.net> <86ikcj8bth.fsf@gnu.org> Content-Language: en-US In-Reply-To: <86ikcj8bth.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb Reply-To: Simon Marchi Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On 2026-01-30 08:33, Eli Zaretskii via Gdb wrote: >> From: Basile Starynkevitch >> Cc: team@refpersys.org >> Date: Fri, 30 Jan 2026 14:13:51 +0100 >> >> I am using GDB-17.1 on Linux/Debian/x86-64 to debug a C++ coded, GPL licensed, inference engine >> >> >> Is there any GDB variant accepting plugins to the debugger process >> (these could be definitely useful to display C++ data in a nice way, std::vector or std::map instances come to mind immediately). >> >> I do know that GDB accept eg Guile or Python scripts. >> But coding manually a Python or Guile function for every important C++ classes of a software is very time consuming > > Did you read the node "Auto-loading extensions" in the GDB manual? > GDB installs such an auto-loaded extension for standard C++ classes, > which actually uses printers.py provided by GCC/libstdc++ > distribution. But you can use the same mechanism to provide > extensions for your classes, if needed. Here's the file Eli is referring to, for libstdc++: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libstdc%2B%2B-v3/python/libstdcxx/v6/printers.py;hb=HEAD And here is the API it uses: https://sourceware.org/gdb/current/onlinedocs/gdb.html/Pretty-Printing.html Simon