From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18061 invoked by alias); 4 Mar 2003 02:59:15 -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 18054 invoked from network); 4 Mar 2003 02:59:15 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 4 Mar 2003 02:59:15 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18q4XT-0000HR-00 for ; Mon, 03 Mar 2003 23:00:27 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18q2e9-00087W-00 for ; Mon, 03 Mar 2003 21:59:13 -0500 Date: Tue, 04 Mar 2003 02:59:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: What to do with threads? Message-ID: <20030304025913.GA31172@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <3E3D87B5.9080306@redhat.com> <3E63E7D8.2030401@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E63E7D8.2030401@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-03/txt/msg00071.txt.bz2 On Mon, Mar 03, 2003 at 06:40:08PM -0500, Andrew Cagney wrote: > Since GDB's frames have a very short life time (flushed the moment there > is even the faintest wiff of a changed target) it may be possible to > instead use `struct thread_info': > > struct thread_info *get_frame_thread (frame) > > and > > get_thread_regcache (thread_info); > > For this to work, though, there would need to be a function that was > guarenteed to always return a thread_info object. Such a > get_selected_thread() or find_thread_by_tpid(?inferior_tpid?) would need > to return a thread object when there were no threads ... Definitely sounds like a change whose time has come. There's one hiccup in that when we go from one-process to one-thread we need to update the thread ID; you can see how I handled this (inelegantly) in gdbserver. Gdbserver's always got a thread... more or less. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer