From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20745 invoked by alias); 27 Jun 2011 16:18:37 -0000 Received: (qmail 20597 invoked by uid 22791); 27 Jun 2011 16:18:35 -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; Mon, 27 Jun 2011 16:18:10 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5RGHloU027892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Jun 2011 12:17:47 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5RGHjI9007496; Mon, 27 Jun 2011 12:17:46 -0400 From: Phil Muldoon To: Joel Brobecker Cc: 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: Mon, 27 Jun 2011 16:18:00 -0000 In-Reply-To: <20110627160029.GF20676@adacore.com> (Joel Brobecker's message of "Mon, 27 Jun 2011 09:00:29 -0700") 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/msg00400.txt.bz2 Joel Brobecker writes: >> You could use Python to write a custom backtrace to do this. But that >> is neither here or there to this patch. > > Yeah, I am wondering which way would be best. It seems like a Python > backtrace decorator would already work, or could be made to work. > But on the other hand, we can't ignore the fact that linking against > the Python library is not necessary easy. In particular, things seems > to work OK on Windows, but I noticed that GDB crashes when trying to > source a Python script. I haven't tried linking with Python on x64 > Windows yet. Yeah, agreed. Eventually my plan is to move all of the Python backtrace code (as in the actual Python backtrace code written in Python) into GDB 'C' and implement call backs for a Python scripter to use. But that still won't solve the Python-on-X-platform issue. > So, there are pluses and minuses on both ends. I am wondering > what everyone else thinks... > > If we were to implement this in GDB itself, I'd rather go with > a setting rather than a command-line option. But that's just > a suggestion. Good point. I have no strong opinion either way. I think this would be a cool addition, though. Cheers Phil