From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30926 invoked by alias); 10 Jan 2011 15:50:45 -0000 Received: (qmail 30905 invoked by uid 22791); 10 Jan 2011 15:50:43 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Jan 2011 15:50:38 +0000 X-Loopcount0: from 10.152.240.141 Subject: Re: duplicated code in gdb and gdbserver Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Paul Koning In-Reply-To: <20110110140848.GB2331@adacore.com> Date: Mon, 10 Jan 2011 15:50:00 -0000 Cc: "Frank Ch. Eigler" , gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <48CC49A5-BD0F-4732-B4B3-B670D80258BB@dell.com> References: <4D272FF6.3070402@codesourcery.com> <20110110140848.GB2331@adacore.com> To: Joel Brobecker 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/msg00188.txt.bz2 On Jan 10, 2011, at 9:08 AM, Joel Brobecker wrote: >> A differently aimed step toward this could be to remove duplication >> between gdb native and gdbserver by gradually *deprecating gdb native >> support*. A library API for the remote protocol would be a natural >> non-symbolic/process-control programming interface. >=20 > I hope you are not suggesting that we actually do remove native support > and force native support through gdbserver! It does sound like that.=20 A big problem is that gdbserver support exists only for a few target proces= sors and operating systems. But in principle it seems reasonable. Then ag= ain, so does the other (making gdb native support be the guts of gdbserver). I've looked at that since I'm interested in one of the operating systems th= at isn't well supported in gdbserver, and if the gdb native code could "jus= t be made to work" that seems like a shortcut. Unfortunately, as has been = pointed out, the list of assumptions in the gdb native support seem to make= that a large job at best. Since gdbserver is small and, being a client-server application, is at leas= t somewhat modular, it seems that Frank's suggestion makes sense. No matte= r how you slice it, it would take a serious restructuring to have a single = instance of the code. paul