From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 742 invoked by alias); 14 Nov 2003 17:07:28 -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 711 invoked from network); 14 Nov 2003 17:07:27 -0000 Received: from unknown (HELO neon-gw.transmeta.com) (63.209.4.196) by sources.redhat.com with SMTP; 14 Nov 2003 17:07:27 -0000 Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id JAA02604; Fri, 14 Nov 2003 09:07:23 -0800 Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) id xma002600; Fri, 14 Nov 03 09:07:14 -0800 Received: from casey.transmeta.com (casey.transmeta.com [10.10.25.22]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id hAEH7HM25896; Fri, 14 Nov 2003 09:07:17 -0800 (PST) Received: (from dje@localhost) by casey.transmeta.com (8.9.3/8.7.3) id JAA15626; Fri, 14 Nov 2003 09:07:17 -0800 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16309.3013.454023.207019@casey.transmeta.com> Date: Fri, 14 Nov 2003 17:07:00 -0000 To: =?iso-8859-1?q?Rama=20Singh?= Cc: gdb@sources.redhat.com Subject: GDB interface with simulator In-Reply-To: <20031114071511.26663.qmail@web8005.mail.in.yahoo.com> References: <20031114071511.26663.qmail@web8005.mail.in.yahoo.com> X-SW-Source: 2003-11/txt/msg00105.txt.bz2 =?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. > Is it posible to have gdb interact with a simulator > over a socket? Also where can I find more information > on this? I believe that implementing this will involve > writing a gdb stub that will compile with the > application and thus interact with the host gdb. Am I > getting things correctly or is there some other > possible way too? The other way to go is to write a gdb stub and compile that into the application. You will need the stub's i/o routines to use the socket. sim/common/dv-sockser.c provides one implementation of low level socket support that you need. Some of the provided sims use this, so that should give you enough examples to work from. It does require having a working stub though. One way to debug your stub would be to do both, but now we're getting fancy, and you might want to try just one of them for now.