From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16388 invoked by alias); 25 Nov 2003 22:27:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16379 invoked from network); 25 Nov 2003 22:27:40 -0000 Received: from unknown (HELO gateway.sf.frob.com) (64.81.54.130) by sources.redhat.com with SMTP; 25 Nov 2003 22:27:40 -0000 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id 6A1EF357B; Tue, 25 Nov 2003 14:27:39 -0800 (PST) Received: from magilla.sf.frob.com (localhost.localdomain [127.0.0.1]) by magilla.sf.frob.com (8.12.9/8.12.9) with ESMTP id hAPMRcHi010073; Tue, 25 Nov 2003 14:27:38 -0800 Received: (from roland@localhost) by magilla.sf.frob.com (8.12.9/8.12.9/Submit) id hAPMRcmn010069; Tue, 25 Nov 2003 14:27:38 -0800 Date: Tue, 25 Nov 2003 22:27:00 -0000 Message-Id: <200311252227.hAPMRcmn010069@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa/threads] Convert thread event descriptors to code addrs In-Reply-To: Andrew Cagney's message of Tuesday, 25 November 2003 16:13:18 -0500 <3FC3C5EE.2090201@redhat.com> X-Windows: putting new limits on productivity. X-SW-Source: 2003-11/txt/msg00581.txt.bz2 > The alternative would be to modify libthread_db so that it knew that > PPC64 symbol were special but I suspect that it doesn't want to know > about such underlying details. It seems to me that this is really what ought to change. ps_pglobal_lookup and similar symbols have always had an architecture-neutral interface (with the exception of our invention, ps_get_thread_area). There is no reason the implementation of this function by a user of libthread_db should have to do anything machine-specific. gdb already has tons of machine-specific knowledge, so it's not really an issue there; but if there are ever simpler users of libthread_db, they shouldn't have to worry about this. It is easy enough to change libthread_db to request the symbols it really wants for the addresses it needs. Depending how convert_from_func_ptr_addr works, it may well be reasonable for gdb to use it as your patch does, to work around the existing buggy PPC64 libthread_db implementations. That is, if that transformation will always be a no-op for a real code symbol (i.e. a ".foo" on PPC64), then you might as well make gdb seamlessly handle either case. I'll leave that up to you, but do let me know whether you decide to take or leave it, so I know how urgent the glibc fix is for gdb users. Thanks, Roland