From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5196 invoked by alias); 18 Feb 2011 08:24:40 -0000 Received: (qmail 5186 invoked by uid 22791); 18 Feb 2011 08:24:39 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Feb 2011 08:24:34 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1I8OPNP028346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 Feb 2011 03:24:25 -0500 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1I8OMa3027889 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Feb 2011 03:24:25 -0500 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p1I8OL8U026957; Fri, 18 Feb 2011 09:24:21 +0100 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id p1I8OKrG026949; Fri, 18 Feb 2011 09:24:20 +0100 Date: Fri, 18 Feb 2011 09:36:00 -0000 From: Jan Kratochvil To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [common] Merge duplicated macros in linux-nat.c and linux-low.c Message-ID: <20110218082420.GA18856@host1.dyn.jankratochvil.net> References: <4D5E2021.2070107@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D5E2021.2070107@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-02/txt/msg00448.txt.bz2 Hi Yao, On Fri, 18 Feb 2011 08:30:41 +0100, Yao Qi wrote: > diff --git a/gdb/common/linux-common.h b/gdb/common/linux-common.h > new file mode 100644 > index 0000000..8d54d51 > --- /dev/null > +++ b/gdb/common/linux-common.h > @@ -0,0 +1,60 @@ > +/* Copyright (C) 2011 Free Software Foundation, Inc. > + > + This file is part of GDB. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > +#include > + > +#ifndef PTRACE_GETSIGINFO > +# define PTRACE_GETSIGINFO 0x4202 > +# define PTRACE_SETSIGINFO 0x4203 > +#endif There should be a wrapper: #ifndef COMMON_LINUX_COMMON_H #define COMMON_LINUX_COMMON_H #endif /* COMMON_LINUX_COMMON_H */ > +/* options set using PTRACE_SETOPTIONS */ [nitpick] This comment formatting was better in linux-nat.c > diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h > index 6635bc6..0891e06 100644 > --- a/gdb/gdbserver/linux-low.h > +++ b/gdb/gdbserver/linux-low.h > @@ -22,6 +22,7 @@ > #endif > > #include "gdb_proc_service.h" > +#include "linux-common.h" If you moved the definitions out of linux-low.c it is enough to #include "linux-common.h" also just in linux-low.c. > --- a/gdb/linux-nat.h > +++ b/gdb/linux-nat.h > @@ -19,7 +19,7 @@ > along with this program. If not, see . */ > > #include "target.h" > - > +#include "linux-common.h" > #include > > /* Structure describing an LWP. This is public only for the purposes If you moved the definitions out of linux-nat.c it is enough to #include "linux-common.h" also just in linux-nat.c. It is fine with me with these changes although Pedro may want to approve the gdbserver/ part. Thanks, Jan