From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120509 invoked by alias); 17 Mar 2015 12:04:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 120494 invoked by uid 89); 17 Mar 2015 12:04:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f175.google.com Received: from mail-pd0-f175.google.com (HELO mail-pd0-f175.google.com) (209.85.192.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 17 Mar 2015 12:04:13 +0000 Received: by pdbop1 with SMTP id op1so7954534pdb.2 for ; Tue, 17 Mar 2015 05:04:12 -0700 (PDT) X-Received: by 10.70.88.137 with SMTP id bg9mr127317369pdb.92.1426593852240; Tue, 17 Mar 2015 05:04:12 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id d13sm15479067pdj.92.2015.03.17.05.04.10 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 17 Mar 2015 05:04:11 -0700 (PDT) From: Yao Qi To: Andy Wingo Cc: gdb-patches@sourceware.org Subject: Re: Relationship between GDB commands in Python and Guile References: <87bnkgoki0.fsf@igalia.com> Date: Tue, 17 Mar 2015 12:04:00 -0000 In-Reply-To: <87bnkgoki0.fsf@igalia.com> (Andy Wingo's message of "Thu, 26 Feb 2015 14:44:23 +0100") Message-ID: <86fv93g79l.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00481.txt.bz2 Andy Wingo writes: > "info pretty-printers" won't list pretty-printers that are written in > Scheme. Likewise for type printers, frame filters, in the future frame > sniffers, etc etc. > > Is there a story about how this is supposed to work? > > Options: > > 1. Do nothing, you have to use a Guile API to query and manipulate > Guile pretty-printers. > > 2. Somehow bake the abstraction of registered pretty printers more > deeply into GDB, and move the implementation of the command into > GDB core. > > 3. Somehow bake the abstraction of registered pretty printers more > deeply into GDB, but still have the command implemented in Python. > > 4. Have Python provide a hooks for each of these commands by which > Guile could provide it with additional entries. Pretty nasty. I don't know much about gdb python/guile extension, but I prefer 2. > An open question would be how to indicate that python extensions win > over guile extensions. Perhaps we should query extensions by language, > then, and then list python ones first. Having a unified "priority" > doesn't make sense in that context. Perhaps the pretty-printing (etc) > mechanism should, in that case, instead be more fine-grained -- not just > "try python first", but instead trying the printers (frame filters, etc) > in order of priority. Perhaps that's too much setup work though; not > sure what the cost is to "enter" python mode etc. I'd like to know why is such question raised? In practise, is it common that users install two pretty-printers, one is python and one is guile? IMO, extensions by different languages are fair to each other. --=20 Yao (=E9=BD=90=E5=B0=A7)