From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9260 invoked by alias); 14 Jan 2003 23:41:05 -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 9248 invoked from network); 14 Jan 2003 23:41:03 -0000 Received: from unknown (HELO myware.akkadia.org) (24.221.190.179) by 209.249.29.67 with SMTP; 14 Jan 2003 23:41:03 -0000 Received: from redhat.com (myware.akkadia.org [192.168.7.70]) (authenticated bits=0) by myware.akkadia.org (8.12.5/8.12.5) with ESMTP id h0ENewYA003552; Tue, 14 Jan 2003 15:40:59 -0800 Message-ID: <3E24A006.4070703@redhat.com> Date: Tue, 14 Jan 2003 23:41:00 -0000 From: Ulrich Drepper Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030111 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz CC: Michael Snyder , Roland McGrath , gdb@sources.redhat.com Subject: Re: libthread_db thread handles References: <20030110204624.GA32002@nevyn.them.org> <86wulbc29o.fsf@elgar.kettenis.dyndns.org> <20030113214916.GA18517@nevyn.them.org> <3E235404.45568034@redhat.com> <20030114002758.GA30705@nevyn.them.org> <3E24901B.4841796E@redhat.com> <20030114224641.GA18618@nevyn.them.org> <3E249864.2060600@redhat.com> <20030114232032.GA3774@nevyn.them.org> In-Reply-To: <20030114232032.GA3774@nevyn.them.org> X-Enigmail-Version: 0.72.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00248.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Daniel Jacobowitz wrote: > To find the state of a thread, we need to first get a thread handle for > it and only then can we call td_thr_get_info. I'd like to save a copy > of the td_thrhandle_t when we get the TD_CREATE event, The problem is calling the *_iter functions or so? If you have the pthread_t value computing the td_thrhandle_t is an operation which can be performed entirely without the looking at the inferior. At least in the new implementation. Just call td_ta_map_id2thr(). This shouldn't add any measurable overhead. I would prefer you caching the pthread_t value very much over caching any opaque data structure. If this means adding a function td_ta_map_thr2id() I'd have no problems with it. But not even this should be necessary since for both events, TD_CREATE and TD_DEATH, the eventdata is the pthread_t value. And this should be a documented interface. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+JKAK2ijCOnn/RHQRAkQPAJ4nWwjfiDFhbpMjooxuUEiH5Dc4pwCfT9La XkXgLoaakbUo5xoO9YXRj1k= =hQUV -----END PGP SIGNATURE-----