From patchwork Thu Jun 19 05:49:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 1564 Received: (qmail 27852 invoked by alias); 19 Jun 2014 05:51:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 27839 invoked by uid 89); 19 Jun 2014 05:51:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Jun 2014 05:51:45 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WxVG9-0006or-Km from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Wed, 18 Jun 2014 22:51:41 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 18 Jun 2014 22:51:41 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Wed, 18 Jun 2014 22:51:36 -0700 From: Yao Qi To: Subject: [PATCH] Use enum thread_state Date: Thu, 19 Jun 2014 13:49:44 +0800 Message-ID: <1403156984-13511-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch is to change field state's type to 'enum thread_state', and replace RUNNING with THREAD_RUNNING and STOPPED with THREAD_STOPPED respectively in comments. Rebuild GDB for linux and mingw. gdb: 2014-06-19 Yao Qi * gdbthread.h (struct thread_info) : Change its type to 'enum thread_state'. Update comments. --- gdb/gdbthread.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index 9f5dee6..1f10469 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -157,14 +157,12 @@ struct thread_info thread is off and running. */ int executing; - /* Frontend view of the thread state. Note that the RUNNING/STOPPED - states are different from EXECUTING. When the thread is stopped - internally while handling an internal event, like a software - single-step breakpoint, EXECUTING will be false, but running will - still be true. As a possible future extension, this could turn - into enum { stopped, exited, stepping, finishing, until(ling), - running ... } */ - int state; + /* Frontend view of the thread state. Note that the THREAD_RUNNING/ + THREAD_STOPPED states are different from EXECUTING. When the + thread is stopped internally while handling an internal event, + like a software single-step breakpoint, EXECUTING will be false, + but STATE will still be THREAD_RUNNING. */ + enum thread_state state; /* If this is > 0, then it means there's code out there that relies on this thread being listed. Don't delete it from the lists even