From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4583 invoked by alias); 22 Jun 2002 05:59:30 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 4571 invoked from network); 22 Jun 2002 05:59:25 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 22 Jun 2002 05:59:25 -0000 Received: from 01-058.118.popsite.net ([66.19.120.58] helo=nevyn.them.org) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17Ldvc-000226-00; Sat, 22 Jun 2002 00:59:21 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17Ldvi-0001uK-00; Sat, 22 Jun 2002 01:59:26 -0400 Date: Fri, 21 Jun 2002 22:59:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Jim Blandy , gdb@sources.redhat.com Subject: Re: GDB support for thread-local storage Message-ID: <20020622055926.GB7243@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Jim Blandy , gdb@sources.redhat.com References: <20020621014821.GA7608@nevyn.them.org> <3D135FE5.6090605@cygnus.com> <20020621173249.GA11443@nevyn.them.org> <20020621201716.GA23307@nevyn.them.org> <20020621210302.GA25010@nevyn.them.org> <3D139E9D.70401@cygnus.com> <20020621215532.GA27228@nevyn.them.org> <3D13A93D.50409@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D13A93D.50409@cygnus.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-06/txt/msg00197.txt.bz2 On Fri, Jun 21, 2002 at 06:31:25PM -0400, Andrew Cagney wrote: > > >>> I'd call the libthread_db > >>>approach broken for this purpose (a little outside its design scope > >>>perhaps). > > > >> > >>I think it reflects limitations of the current libthread-db interface > >>rather than a broken approach. > > > > > >I disagree... the concept of having a "libthread_db" with an interface > >involves it being a target library, part of the system. Unless you > >change its "interface" to be a data file rather than code, it requires > >access to a target in order to interpret target data. That's my whole > >objection to it. > > Sorry, I'm lost here. > > Say, instead of a libthread_db, we had gdb/libthread-db.c which could be > compiled on all systems. It would have some sort of procedural > interface, and would grub around in target data to find thread X lwp > maps. However, it could be written in a way that was host architecture > netural. Sure. But the design of libthread_db says, "I am 100% coupled to the private structure of this thread implementation. I must match its version exactly if you want predictable results. My details can change in minor revisions or even more frequently." That's not part of the implementation; it's more like the purpose of the design. It is a layer between implementation-specific details with no guaranteed structure and a structured client interface. Without imposing structure on that data, I don't think it'll ever be possible to have a gdb/libthread-db.c. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer