From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5026 invoked by alias); 19 May 2011 20:21:46 -0000 Received: (qmail 4999 invoked by uid 22791); 19 May 2011 20:21:44 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,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; Thu, 19 May 2011 20:21:15 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4JKLDmv003662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 19 May 2011 16:21:13 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p4JKLDKw009669; Thu, 19 May 2011 16:21:13 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p4JKLCpL017429; Thu, 19 May 2011 16:21:12 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 1A70F37918A; Thu, 19 May 2011 14:21:12 -0600 (MDT) From: Tom Tromey To: Kevin Pouget Cc: pmuldoon@redhat.com, gdb-patches@sourceware.org Subject: Re: [RFC - Python] New ObjFile event References: Date: Thu, 19 May 2011 20:21:00 -0000 In-Reply-To: (Kevin Pouget's message of "Wed, 30 Mar 2011 07:31:48 -0400") 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 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-05/txt/msg00462.txt.bz2 >>>>> "Kevin" == Kevin Pouget writes: Kevin> + py-value.o \ Kevin> + py-newobjfileevent.o Alphabetical, please. Applies elsewhere in the Makefile patch too. Kevin> # found by configure; if GNU Make is not found, we fall back to a Kevin> diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog Kevin> index 08d6c8c..3ea5068 100644 Kevin> --- a/gdb/doc/ChangeLog Kevin> +++ b/gdb/doc/ChangeLog Kevin> @@ -1,3 +1,9 @@ Kevin> +2011-03-29 Kevin Pouget Kevin> + * gdb.textinfo (Events In Python): Document `gdb.NewObjFileEvent' Missing blank line after the date line, and typo: "texinfo", not "textinfo". Kevin> +@item events.newobjfile Kevin> +Emits @code{gdb.NewObjFileEvent} which indicates that a new object-file has Kevin> +been loaded in the inferior. This is not an accurate description -- it may or may not be related to a change in the inferior. E.g., if the user did "set auto-solib-add off", then no objfile will be made when a shared library is loaded. Or, if the user does "add-symbol-file", then a new objfile will be made even though nothing has changed in the inferior. Maybe this isn't the event you actually wanted? I mean -- it is fine to have this, and I'd like it if you followed through :-), but it may not do what you are expecting. Kevin> + /* Will be NULL when clearing the symtab. */ Kevin> + if (objfile) Kevin> + cleanup = ensure_python_env (get_objfile_arch (objfile), current_language); Kevin> + else Kevin> + cleanup = ensure_python_env (get_current_arch (), current_language); I think it is better to just return early if objfile==NULL. Or, emit a different event in this case. Kevin> +2011-03-29 Kevin Pouget Kevin> + * testsuite/gdb.python/py-events-shlib.c: New file. Missing newline. Kevin> +# Start with a fresh gdb. Kevin> + Kevin> +gdb_exit Kevin> +gdb_start I think clean_restart is preferred here. But maybe skip_python_tests has to be inserted in the middle of the sequence? Kevin> +gdb_test "run" ".*event type: new_objfile.* Kevin> +.*new objfile name.*" This style of test is hard to read. I'd prefer a \n in there. Tom