From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17288 invoked by alias); 19 Sep 2013 12:16:59 -0000 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 Received: (qmail 17270 invoked by uid 89); 19 Sep 2013 12:16:58 -0000 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 Sep 2013 12:16:58 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RDNS_NONE,SPF_HELO_FAIL autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VMdAE-0002sb-76 from Luis_Gustavo@mentor.com for gdb-patches@sourceware.org; Thu, 19 Sep 2013 05:16:54 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 19 Sep 2013 05:16:53 -0700 Received: from [172.30.7.81] ([172.30.7.81]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 19 Sep 2013 05:16:53 -0700 Message-ID: <523AEB33.9080100@codesourcery.com> Date: Thu, 19 Sep 2013 12:16:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: "'gdb-patches@sourceware.org'" Subject: [PATCH] Move code to common/ptid.h Content-Type: multipart/mixed; boundary="------------050405070500080305060205" X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00669.txt.bz2 This is a multi-part message in MIME format. --------------050405070500080305060205 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 162 Hi, One more piece of cleanup. These macros currently live in linux-nat.h, but they should really go to common/ptid.h so gdbserver can use them as well. OK? --------------050405070500080305060205 Content-Type: text/x-patch; name="ptid.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ptid.diff" Content-length: 1452 2013-09-19 Luis Machado * common/ptid.h (GET_LWP, GET_PID): Moved from linux-nat.h. (is_lwp, BUILD_LWP): Likewise. * linux-nat.h (GET_LWP, GET_PID): Moved to common/ptid.h. (is_lwp, BUILD_LWP): Likewise. gdb/common/ptid.h | 6 ++++++ gdb/linux-nat.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gdb/common/ptid.h b/gdb/common/ptid.h index fefe8b6..ceafd02 100644 --- a/gdb/common/ptid.h +++ b/gdb/common/ptid.h @@ -20,6 +20,12 @@ #ifndef PTID_H #define PTID_H +/* Helper macros. */ +#define GET_LWP(ptid) ptid_get_lwp (ptid) +#define GET_PID(ptid) ptid_get_pid (ptid) +#define is_lwp(ptid) (GET_LWP (ptid) != 0) +#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0) + /* The ptid struct is a collection of the various "ids" necessary for identifying the inferior. This consists of the process id (pid), thread id (tid), and other fields necessary for uniquely diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h index 044f646..0fc68ef 100644 --- a/gdb/linux-nat.h +++ b/gdb/linux-nat.h @@ -110,11 +110,6 @@ extern struct lwp_info *lwp_list; (LP) != NULL; \ (LP) = (LP)->next) -#define GET_LWP(ptid) ptid_get_lwp (ptid) -#define GET_PID(ptid) ptid_get_pid (ptid) -#define is_lwp(ptid) (GET_LWP (ptid) != 0) -#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0) - /* Attempt to initialize libthread_db. */ void check_for_thread_db (void); --------------050405070500080305060205--