From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7558 invoked by alias); 25 Nov 2009 20:10:16 -0000 Received: (qmail 7544 invoked by uid 22791); 25 Nov 2009 20:10:15 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Nov 2009 20:10:06 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 8B0F915066; Wed, 25 Nov 2009 12:10:05 -0800 (PST) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost4.vmware.com (Postfix) with ESMTP id 81995C9A14; Wed, 25 Nov 2009 12:10:05 -0800 (PST) Message-ID: <4B0D8E26.9050701@vmware.com> Date: Wed, 25 Nov 2009 20:10:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20090624) MIME-Version: 1.0 To: Hui Zhu CC: gdb-patches ml Subject: Re: [RFA/RFC] Prec multi-thread support [3/4] thread.c References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2009-11/txt/msg00560.txt.bz2 This one's OK. In fact, congratulations for keeping this part of your change so neat and concise! ;-) Hui Zhu wrote: > 1. Move thread_state to gdbthread.h because record target need get the > status of each thread. Sometime, GDB will not remove the thread entry > when it exit. > 2. record_is_waiting is to flag that mean this thread is still > running. I will introduce in next mail. > > 2009-11-25 Hui Zhu > > gdbthread.h (thread_state): New enum. > (thread_info): Add record_is_waiting. > thread.c (thread_state): Deleted. > > --- > gdbthread.h | 11 +++++++++++ > thread.c | 9 --------- > 2 files changed, 11 insertions(+), 9 deletions(-) > > --- a/gdbthread.h > +++ b/gdbthread.h > @@ -29,6 +29,15 @@ struct symtab; > #include "ui-out.h" > #include "inferior.h" > > +/* Frontend view of the thread state. Possible extensions: stepping, > + finishing, until(ling),... */ > +enum thread_state > +{ > + THREAD_STOPPED, > + THREAD_RUNNING, > + THREAD_EXITED, > +}; > + > struct thread_info > { > struct thread_info *next; > @@ -37,6 +46,8 @@ struct thread_info > kernel thread id, etc. */ > int num; /* Convenient handle (GDB thread id) */ > > + int record_is_waiting; > + > /* Non-zero means the thread is executing. Note: this is different > from saying that there is an active target and we are stopped at > a breakpoint, for instance. This is a real indicator whether the > --- a/thread.c > +++ b/thread.c > @@ -63,15 +63,6 @@ static void thread_apply_command (char * > static void restore_current_thread (ptid_t); > static void prune_threads (void); > > -/* Frontend view of the thread state. Possible extensions: stepping, > - finishing, until(ling),... */ > -enum thread_state > -{ > - THREAD_STOPPED, > - THREAD_RUNNING, > - THREAD_EXITED, > -}; > - > struct thread_info* > inferior_thread (void) > {