From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6451 invoked by alias); 12 Jan 2011 17:33:33 -0000 Received: (qmail 6441 invoked by uid 22791); 12 Jan 2011 17:33:32 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Jan 2011 17:33:21 +0000 Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [172.25.149.5]) by smtp-out.google.com with ESMTP id p0CHXIV6022766 for ; Wed, 12 Jan 2011 09:33:18 -0800 Received: from qyk12 (qyk12.prod.google.com [10.241.83.140]) by hpaq5.eem.corp.google.com with ESMTP id p0CHXGtA003421 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Wed, 12 Jan 2011 09:33:17 -0800 Received: by qyk12 with SMTP id 12so925060qyk.5 for ; Wed, 12 Jan 2011 09:33:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.179.76 with SMTP id bp12mr1113121qab.264.1294853596172; Wed, 12 Jan 2011 09:33:16 -0800 (PST) Received: by 10.220.118.80 with HTTP; Wed, 12 Jan 2011 09:33:16 -0800 (PST) In-Reply-To: <20110111233750.GA13164@redhat.com> References: <4D272FF6.3070402@codesourcery.com> <20110110155413.GE17302@redhat.com> <20110111233507.GD2331@adacore.com> <20110111233750.GA13164@redhat.com> Date: Wed, 12 Jan 2011 17:54:00 -0000 Message-ID: Subject: Re: duplicated code in gdb and gdbserver From: Doug Evans To: "Frank Ch. Eigler" Cc: Joel Brobecker , Yao Qi , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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/msg00268.txt.bz2 On Tue, Jan 11, 2011 at 3:37 PM, Frank Ch. Eigler wrote: > Hi - > > On Tue, Jan 11, 2011 at 06:35:07PM -0500, Joel Brobecker wrote: >> > And with such a library, I'd make it so that "non-gdb tools" could use >> > it too. =A0For example, it would make easier the building of gdbservers >> > that need to speak something other than the remote protocol. >> >> I'm not entirely crazy about the idea of a public API >> [...] >> What I would much rather see, is something that allows projects to >> easily implement the client-side part of the remote protocol. [...] > > That "something" is exactly what I was talking about: a remote protocol > client API. [For reference sake, I think there at least two related but independent concepts here: what goes over the wire, and an API for that.] I think the remote protocol itself is getting old. In days of multiple threads, inferiors, and architectures, plus an expanding feature set, ISTM IWBN to start over. We can still support the remote protocol for however long is appropriate of course. I can imagine the remote protocol being (at least mostly) a degenerate case of its successor. However, the fact that people are willing to talk about a client side API for the remote protocol reaffirms my belief that publishing an API is something the gdb community can take on and do. Such an API could result in either more subroutine calls or packets (IOW native-gdb or gdb+gdbserver). [For completeness sake, I think the GNU tools community should take on APIs for more than just this, but that's a separate thread. :-)] Also, I've been wondering if something like protobufs would be reasonable h= ere. ref: http://code.google.com/p/protobuf/