From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30142 invoked by alias); 11 Jan 2011 23:28:53 -0000 Received: (qmail 30133 invoked by uid 22791); 11 Jan 2011 23:28:52 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Jan 2011 23:28:48 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 234B32BABED; Tue, 11 Jan 2011 18:28:47 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7vTxNEi8xa0Q; Tue, 11 Jan 2011 18:28:47 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 003CB2BABB1; Tue, 11 Jan 2011 18:28:46 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 8552D1459AD; Wed, 12 Jan 2011 03:28:46 +0400 (RET) Date: Tue, 11 Jan 2011 23:35:00 -0000 From: Joel Brobecker To: "Frank Ch. Eigler" Cc: Doug Evans , Yao Qi , "gdb-patches@sourceware.org" Subject: Re: duplicated code in gdb and gdbserver Message-ID: <20110111232846.GC2331@adacore.com> References: <4D272FF6.3070402@codesourcery.com> <20110110155413.GE17302@redhat.com> <20110110190139.GF17302@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110110190139.GF17302@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00238.txt.bz2 > I guess it depends on how many new abstractions one wishes to invent. > The remote protocol is well-proven, so experimental design is not > needed. New protocols may have associated state machines that are > sufficiently close to the remote protocol that one can bridge to them > easily, or sufficiently far that gdb infrun/core changes would be > needed. It depends. Until one comes along though, I would propose > going with what we know. This extra level of separation seems unecessary to me. Between using an API and having a child process driven through a serial connection, the API sounds a lot simpler to me. I don't think we are talking about creating something new in this case, but just factorizing some code that is in some large way duplicated between GDB and GDBserver. -- Joel