From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5605 invoked by alias); 14 Nov 2003 19:07:32 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5598 invoked from network); 14 Nov 2003 19:07:31 -0000 Received: from unknown (HELO planck.amplepower.com) (216.39.162.139) by sources.redhat.com with SMTP; 14 Nov 2003 19:07:31 -0000 Received: from [192.168.8.30] (helo=knuth.amplepower.com ident=roth) by planck.amplepower.com with esmtp (Exim 3.36 #1 (Debian)) id 1AKjAl-0004GR-00; Fri, 14 Nov 2003 10:59:59 -0800 Date: Fri, 14 Nov 2003 19:07:00 -0000 From: "Theodore A. Roth" X-X-Sender: roth@knuth.amplepower.com cc: Rama Singh , gdb@sources.redhat.com Subject: Re: GDB interface with simulator In-Reply-To: <20031114185546.GA5030@nevyn.them.org> Message-ID: References: <20031114071511.26663.qmail@web8005.mail.in.yahoo.com> <16309.3013.454023.207019@casey.transmeta.com> <20031114185546.GA5030@nevyn.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-11/txt/msg00108.txt.bz2 On Fri, 14 Nov 2003, Daniel Jacobowitz wrote: > On Fri, Nov 14, 2003 at 09:07:17AM -0800, Doug Evans wrote: > > =?iso-8859-1?q?Rama=20Singh?= writes: > > > I wish to use my simulator as an > > > independent process running on the same machine or on > > > other machine. > > > > Old versions of gdb had a file in gdb/gdbserver called low-sim.c. > > IIRC, one would use this file in gdbserver and would link gdbserver > > with libsim.a. You would then run this program on the host > > you want to run your simulator on and use "target remote :" > > in gdb to talk to gdbserver+sim. > > > > Maybe you could grab that file from an old version of gdb (e.g. 5.3) > > and try to make it work with the version of gdb you have. > > [or maybe even just build gdbserver from 5.3 sources] > > > > I don't recall why support for gdbserver+sim has been removed. > > Maybe I'm mistaken and it's still there and I just can't see it. > > Because there was no point. The current simulators link directly into > GDB, and the simulator interface has changed since anyone tried to use > gdbserver that way. The correct thing is to write a layer in your > simulator that serves the same purpose (speaks the remote protocol). > It's not too hard. I've written an avr simulator that speaks the remote protocol directly. If you are looking for an example, it's available on savannah: http://savannah.nongnu.org/projects/simulavr Another example of the same thing with a different implementation is the avarice project. It speaks the remote protocol, but instead of talking to a simulator, it talks to a jtage ice box. http://sourceforge.net/projects/avarice Look at the source in cvs for each. Hope that helps. Ted Roth