Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: John Williams <jwilliams@itee.uq.edu.au>
To: Rama Singh <rama10nov@yahoo.co.in>
Cc: gdb@sources.redhat.com
Subject: Re: GDB interface with simulator
Date: Fri, 14 Nov 2003 07:43:00 -0000	[thread overview]
Message-ID: <3FB487B4.5010107@itee.uq.edu.au> (raw)
In-Reply-To: <20031114071511.26663.qmail@web8005.mail.in.yahoo.com>

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.

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.

Good luck,

John


  reply	other threads:[~2003-11-14  7:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-14  7:15 Rama Singh
2003-11-14  7:43 ` John Williams [this message]
2003-11-14 11:56   ` Rama Singh
2003-11-14 17:07 ` Doug Evans
2003-11-14 18:55   ` Daniel Jacobowitz
2003-11-14 19:07     ` Theodore A. Roth
2003-11-14 19:36     ` Doug Evans
2003-11-20 18:02     ` Rama Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FB487B4.5010107@itee.uq.edu.au \
    --to=jwilliams@itee.uq.edu.au \
    --cc=gdb@sources.redhat.com \
    --cc=rama10nov@yahoo.co.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox