From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6280 invoked by alias); 14 Nov 2003 11:56:15 -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 6272 invoked from network); 14 Nov 2003 11:56:13 -0000 Received: from unknown (HELO web8001.mail.in.yahoo.com) (203.199.70.95) by sources.redhat.com with SMTP; 14 Nov 2003 11:56:13 -0000 Message-ID: <20031114115611.14713.qmail@web8001.mail.in.yahoo.com> Received: from [203.124.166.107] by web8001.mail.in.yahoo.com via HTTP; Fri, 14 Nov 2003 11:56:11 GMT Date: Fri, 14 Nov 2003 11:56:00 -0000 From: =?iso-8859-1?q?Rama=20Singh?= Subject: Re: GDB interface with simulator To: John Williams Cc: gdb@sources.redhat.com In-Reply-To: <3FB487B4.5010107@itee.uq.edu.au> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-11/txt/msg00103.txt.bz2 --- John Williams wrote: > Hi Rama, > > Rama Singh wrote: > > I am working on a cycle accurate simulator and for > the > > purpose of debugging application, I wish to use > gdb. > > Now gdb has in build support for about a dozen > most > > popular simulators. It interacts with the > simulator as > > a library. I wish to use my simulator as an > > independent process running on the same machine or > on > > other machine. > > 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? > > Take a look at the gdbserver application, > distributed with GDB. > Speifically, the remote-utils.c file will show you > the socket interface, > and provide some tips on how to implement it. Well I tried some hand on the gdbserver. I have it running on a P4 RH-8 box. But it basically exec the object file. Is there a way to tell gdbserver to exec on my simulator. > > You basically just implement stubs to read/write > memory, query > registers, set breakpoints, that sort of thing. > > Then, read > > http://sources.redhat.com/gdb/current/onlinedocs/gdb_33.html > > to see the format of the remote debugging packets. > > You might just be able to integrate the gdbserver > application into your > simulator. Does this mean that gdbserver is a target dependent application? or should I compile it with my target-dependent compiler? > > Good luck, > > John > ________________________________________________________________________ Yahoo! India Mobile: Download the latest polyphonic ringtones. Go to http://in.mobile.yahoo.com