From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28188 invoked by alias); 28 Jun 2011 22:36:16 -0000 Received: (qmail 28039 invoked by uid 22791); 28 Jun 2011 22:36:15 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Jun 2011 22:35:59 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5SMZZbZ000517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Jun 2011 18:35:35 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5SMZXcQ029593; Tue, 28 Jun 2011 18:35:34 -0400 From: Phil Muldoon To: Tom Tromey Cc: Joel Brobecker , iam ahal , gdb-patches@sourceware.org Subject: Re: [patch] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename) References: <20110627160029.GF20676@adacore.com> Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Tue, 28 Jun 2011 22:36:00 -0000 In-Reply-To: (Tom Tromey's message of "Tue, 28 Jun 2011 14:07:25 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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 X-SW-Source: 2011-06/txt/msg00432.txt.bz2 Tom Tromey writes: > Joel> Yeah, I am wondering which way would be best. It seems like a Python > Joel> backtrace decorator would already work, or could be made to work. > > We have a plan to implement "frame filters" in Python. The idea here is > basically pretty-printing for backtraces -- let libraries ship Python > code to modify frames while they are being displayed. E.g., the Python > interpreter could replace C frames with synthetic frames representing > the Python stack. > > Full details are available somewhere -- either archer or gdb list > archives. If you want to read them and can't find them, let me know, > and I will either dig them up or write them again. > > Phil would have to say the status of this work. This is long term work. I hope to have it for 7.4. The task is complex, because I think the backtrace code right now is not too callback friendly. That being said, every new Python feature requires one to become somewhat of an expert in that area. This is happy, if sometimes long work. Okay, enough excuses. We need more GDB-Python hackers! I don't want to disappear down this hole for too long as there are other tasks that are shorter term that I think are more important, and bugs that also need addressing. Tom and other have been doing a super job reviewing existing Python patches, but I really need to do more of that. If only not to collide (like I did this week!) with the few others working in this space. Anyway, the backtrace work is neat stuff. It will be implemented sooner rather than later. > Joel> So, there are pluses and minuses on both ends. I am wondering > Joel> what everyone else thinks... > > I am happy adding any vaguely sensible setting that people want to the > core. Why not? The time more minimalism has long passed. Me too. Feature rich at this point. Everyone wants something different out of GDB, and debugging scenarios tend to be unique. But I think some features offer a common-ground, and this is one of them. > Whether this one meets the bar, I don't know. Is basename really the > obvious transform to apply? What about just dropping the compilation > directory? Well in this context, user-driven needs, to me, are the best bar. If this contributor has written this patch, with a specific need (not super-specialised) in mind that is great. I wish I had the backtrace Pythonic interface ready, but, OTOH, every use-case is great to mould that functionality. Cheers, Phil