From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26606 invoked by alias); 29 May 2008 20:45:19 -0000 Received: (qmail 26590 invoked by uid 22791); 29 May 2008 20:45:17 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 29 May 2008 20:45:00 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m4TKiuMx009855; Thu, 29 May 2008 16:44:56 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m4TKitNn025052; Thu, 29 May 2008 16:44:55 -0400 Received: from opsy.redhat.com (vpn-10-8.bos.redhat.com [10.16.10.8]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m4TKit3B016254; Thu, 29 May 2008 16:44:55 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 5DC5B508240; Thu, 29 May 2008 14:44:54 -0600 (MDT) To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org Subject: Re: [RFC][patch 1/9] initial Python support References: <20080429155212.444237503@br.ibm.com> <20080429155304.288626880@br.ibm.com> <20080528205921.GA2969@caradoc.them.org> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Fri, 30 May 2008 14:47:00 -0000 In-Reply-To: <20080528205921.GA2969@caradoc.them.org> (Daniel Jacobowitz's message of "Wed\, 28 May 2008 16\:59\:21 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-05/txt/msg00763.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: I've checked in fixes for a lot of the comments you've made. Thanks for taking the time. It is clear we still have a lot to do. Here, I've only commented on specific things requiring comment. >> +#ifdef HAVE_PYTHON >> +#include "python/python.h" >> +#endif Daniel> There are too many #ifdef's in the rest of GDB in this patch, Daniel> IMO. Can python/python.h be included unconditionally, not Daniel> include python-internal.h, and have the exposed interfaces Daniel> error() when Python support is not compiled in? I didn't touch Volodya's MI/varobj code, but I did the rest of this. Daniel> In general I would prefer we not commit any FIXMEs. We can Daniel> decide now what the right thing to do is and if there is room Daniel> for future enhancement, that's not a FIXME any more :-) Ok. I'm working my way through the new ones. Thiago, Volodya -- please look through the code you've written on the branch :-) Daniel> Also, in general PyErr_Print is probably dumping to stderr? Daniel> Output should go through GDB's error mechanisms, and in this Daniel> case probably be part of the argument to error. Can you get Daniel> it to return an error string instead? Good question. I looked at the implementation of PyErr_Print, but it is ~100 lines of C. That's kind of a lot to copy. We can probably get just the exception's text -- without the entire stack trace -- fairly easily. I will have to look into this. Or, I think we can set sys.stderr and dump the exception, including the whole trace, wherever we like. This may be more fragile. And, it isn't clear to me that we want or need the whole trace. Daniel> Speaking of which... a testsuite? :-) Yeah -- we definitely need both a testsuite and documentation. I'd guess we are all avoiding this. Tom