From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12119 invoked by alias); 8 Jan 2011 03:34:31 -0000 Received: (qmail 11775 invoked by uid 22791); 8 Jan 2011 03:34:30 -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, 08 Jan 2011 03:34:25 +0000 Received: (qmail 20965 invoked from network); 8 Jan 2011 03:34:22 -0000 Received: from unknown (HELO ?192.168.0.102?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Jan 2011 03:34:22 -0000 Message-ID: <4D27DB30.4080603@codesourcery.com> Date: Sat, 08 Jan 2011 03:34:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Doug Evans , Stan Shebs CC: "gdb-patches@sourceware.org" Subject: Re: duplicated code in gdb and gdbserver References: <4D272FF6.3070402@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00163.txt.bz2 On 01/08/2011 12:37 AM, Doug Evans wrote: > Another example is individual target support. E.g., merging common > bits of gdb's ${target}-nat.c files with gdbserver's ${target}-low.c > files. On 01/08/2011 01:17 AM, Stan Shebs wrote: > One thing that we could be doing in addition to moving code is to > scrutinize gdb/*-nat.c and friends, and abstract out some API for any > in-GDB-itself assumptions. Hopefully that will help to minimize the > need for #ifdef GDBSERVER hacks as we refactor the code. Doug and Stan, Thanks for your pointers and suggestions. Looks like it is not a small piece of work, and IMO, merging common parts of gdb's ${target}-nat.c and gdbserver's ${target}-low.c can be a starting point. I'll write patches for this. -- Yao Qi