From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22084 invoked by alias); 14 Dec 2012 17:03:13 -0000 Received: (qmail 22075 invoked by uid 22791); 14 Dec 2012 17:03:12 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_BJ 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; Fri, 14 Dec 2012 17:03:00 +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 qBEH2x9a024408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Dec 2012 12:02:59 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBEH2uT2027704; Fri, 14 Dec 2012 12:02:57 -0500 Message-ID: <50CB5BA8.3030902@redhat.com> Date: Fri, 14 Dec 2012 17:03:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: [RFA/commit 1/3] minor ravenscar-thread cleanup References: <1355497356-13922-1-git-send-email-brobecker@adacore.com> In-Reply-To: <1355497356-13922-1-git-send-email-brobecker@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2012-12/txt/msg00510.txt.bz2 On 12/14/2012 03:02 PM, Joel Brobecker wrote: > Hello, > > Before attacking the gdbarch-ification of ravenscar-thread > proper, I noticed that ravenscar-thread uses a number of > global variables, which annoyed me quite a bit. There was > one that seems like an easy target, so I dealt with it now. > > For the remaining ones, I will take care of them after the patch > series is in, and I have reconciled the FSF tree and AdaCore's > tree. > > The use of the ravenscar_open static global is unnecessary. > This patch removes it. It also removes some routines that > were created in association with the management of this global. > I question the pushing of this target from the inferior_created observer. Detecting the ravenscar runtime is based on looking for some symbols, so it would seem to me that doing that from a new_objfile observer (which is what e.g., linux-thread-db.c, another thread_stratum target, does) would be more correct (e.g., it'd work to attach to a target, notice missing symbols, and point GDB at symbols, at which point GDB would load a new objfile and detect ravenscar). But if I ignore that issue, the patch looks fine to me. -- Pedro Alves