From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11666 invoked by alias); 3 Dec 2005 04:49:44 -0000 Received: (qmail 11659 invoked by uid 22791); 3 Dec 2005 04:49:44 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sat, 03 Dec 2005 04:49:41 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EiPL9-0006QP-CV; Fri, 02 Dec 2005 23:49:39 -0500 Date: Sat, 03 Dec 2005 04:49:00 -0000 From: Daniel Jacobowitz To: Russell Shaw Cc: gdb@sourceware.org Subject: Re: [RFC] plugin/extension interface Message-ID: <20051203044939.GA24620@nevyn.them.org> Mail-Followup-To: Russell Shaw , gdb@sourceware.org References: <20051202233207.GA19812@nevyn.them.org> <8f2776cb0512021657i3f780f77sb1294b51753ffaaa@mail.gmail.com> <20051203023154.GA22527@nevyn.them.org> <439105DF.5040708@netspace.net.au> <20051203024500.GA22826@nevyn.them.org> <43910D47.2070300@netspace.net.au> <20051203033336.GA23537@nevyn.them.org> <43911985.9050901@netspace.net.au> <20051203041402.GA24030@nevyn.them.org> <439122AF.5080606@netspace.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <439122AF.5080606@netspace.net.au> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00026.txt.bz2 On Sat, Dec 03, 2005 at 03:44:31PM +1100, Russell Shaw wrote: > >Please see the "monitor" command, which lets you pass whatever you wish > >to the convertor. This and a couple of user-defined commands are most > >of what you need... > > Looking at gdb docs, i couldn't find any "monitor" command or in the index. > > (gdb) help monitor > > Send a command to the remote monitor (remote targets only). Found `monitor' in Index. (`,' tries to find next.) `monitor CMD' This command allows you to send commands directly to the remote monitor. > Not very helpful. That's because the bits that go after the word "monitor" depend on your target :-) > Anyway, preceding every command with "monitor" is hardly a nice or intuitive > user interface. Of course. Provide a GDB script file that uses "define" to give things pretty names, for example. > >As for the state of GDB, that's a separate thread, and making progress > >already. > > If there was an api for hardware-specific protocols, not only would > performance of these improve, but there would be new developers > seeing gdb code and having an interest in maintaining and improving > it (i was really the first example). What's more, all kinds of > unsupported debugger hardware could be added by users. Because each > hardware goes into its own subdirectory, it doesn't complicate any > other area of gdb and can be easily removed. That's how the backend > of gcc works. I'm not convinced that performance is an issue here. I'd need numbers. The total data transfer over the remote protocol is, usually, very small - even if you're doing application downloads, it's just a couple of extra buffer copies on the local system. If you expect to be transfering huge data sessions, use a local pipe or fifo to connect to the daemon instead of TCP. > A problem with the current method of using shims is that if you want > to develop one, you have to go out and find one on the net to find a > place to start. > > With all the interfaces in gdb subdirectories, all the example code that > anyone could ever want for adding support for new hardware, is already > there to look at (i looked at gdb-6.3/gdb/remote*.c to start my one). If you wanted to add a skeleton protocol conversion daemon to the GDB source tree, especially under the GPL, I'm sure we'd be glad to include it! The problem with "remote*.c" is that most of them haven't been used in years. Many of them are bad examples, or simply broken. -- Daniel Jacobowitz CodeSourcery, LLC