From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20157 invoked by alias); 3 Feb 2011 21:30:10 -0000 Received: (qmail 20149 invoked by uid 22791); 3 Feb 2011 21:30:09 -0000 X-SWARE-Spam-Status: No, hits=-6.9 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; Thu, 03 Feb 2011 21:30:01 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p13LTqog020014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Feb 2011 16:29:53 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p13LTqqg025772; Thu, 3 Feb 2011 16:29:52 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p13LTpbG027266; Thu, 3 Feb 2011 16:29:51 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 3AA8537848C; Thu, 3 Feb 2011 14:29:51 -0700 (MST) From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org, Yao Qi Subject: Re: [rfa/rfc] Build libcommon.a for gdb and gdbserver References: <4D30E23F.3080103@codesourcery.com> <4D375F44.70504@codesourcery.com> <201101281504.38962.pedro@codesourcery.com> Date: Thu, 03 Feb 2011 21:30:00 -0000 In-Reply-To: <201101281504.38962.pedro@codesourcery.com> (Pedro Alves's message of "Fri, 28 Jan 2011 15:04:38 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00051.txt.bz2 Tom> I think gdb/configure is already pretty messy. It is more than 2000 Tom> lines of code. A few more for gdbserver aren't going to hurt much, IMO. Pedro> As I said before, gdbserver is buildable without building gdb, even Pedro> for targets that can't build gdb. How would you make it work? I mentioned a couple ways upthread, but I think it doesn't matter any more. Pedro> Many of the core structures and defines aren't shared yet between Pedro> gdb and gdbserver. gdb has defs.h, and gdbserver has server.h. Pedro> Ideally we'd pull the really common stuff into some header Pedro> under common/. As is, there are incompatibilities. Take a Pedro> look at the top of common/signals.c, for example. Pedro> This is one of the reasons that I want to forbit gdb/common/ files Pedro> from including things from gdb/. For the local patches we Pedro> have that move stuff into gdb/common/ (independent effort from Pedro> Yao's), we added an #ifdef GDBSERVER then #error in gdb/defs.h Pedro> to catch that at compile time. Pedro> (Before Yao came along, my plan was to clean up these Pedro> header issues before considering building a common library.) I understand now, thanks. I am still not super fond of this, but seeing as I have no better idea, I think you should go ahead. It will definitely be an improvement. Tom