From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5356 invoked by alias); 15 Jan 2011 00:52:08 -0000 Received: (qmail 5348 invoked by uid 22791); 15 Jan 2011 00:52:07 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 15 Jan 2011 00:52:03 +0000 Received: (qmail 8455 invoked from network); 15 Jan 2011 00:52:01 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Jan 2011 00:52:01 -0000 From: Pedro Alves To: Yao Qi Subject: Re: [rfa/rfc] Build libcommon.a for gdb and gdbserver Date: Sat, 15 Jan 2011 00:57:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-24-generic; KDE/4.5.1; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <4D30E23F.3080103@codesourcery.com> In-Reply-To: <4D30E23F.3080103@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201101150052.00616.pedro@codesourcery.com> 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-01/txt/msg00354.txt.bz2 Haven't you lost -DGDBSERVER in the process? I haven't looked closely at the patch, but think you're including gdb/ headers in gdbserver's build of libcommon as well. You can't do that, particularly defs.h. We/Kwok have some patches that move some gdb files to gdb/common/ , we should coordinate. gdb/common/ in our tree contains: buffer.c buffer.h common-utils.c common-utils.h gdb_assert.h gdb_dirent.h gdb_locale.h gdb_signals.h i386-xstate.h linux-osdata.c linux-osdata.h ptid.c ptid.h signals.c xml-utils.c xml-utils.h I'll be working on pushing some patches Kwok's patches sit on top next week. On Saturday 15 January 2011 23:54:39, Yao Qi wrote: > Hi, > re. "duplicated code in gdb and gdbserver" > http://sourceware.org/ml/gdb-patches/2011-01/msg00153.html I propose to > move common code to dir common/, and build files in it to libcommon.a, > which can be used by both gdb and gdbserver. tdep code can be the first > batch to move to common/ dir, and different object files are selected to > be archived into libcommon.a according to configure result. In order to > achieve that, configure.ac and Makefile.in will be created in common/ dir. > > In this patch, there is *no* change related to tdep part, but build > signals.c into libcommon.a only. With this patch, we can move common > tdep code into libcommon.a more easily in the future. > > If this change is acceptable, I'll start on i386 tdep code as a "proof > of concept", to move some common code in i386-nat.c and i386-low.c into > i386-common.c. > > Once it is done, some target-independent part of code, such as functions > in regcache.c and infrun.c, can be moved into libcommon.a. > > Comments are welcome. -- Pedro Alves