From: Jeremy Bennett <jeremy.bennett@embecosm.com>
To: gdb@sourceware.org
Cc: Seb Astien <stien.seba@gmail.com>
Subject: Re: GDB, microcontroller ISS and HDL simulator
Date: Wed, 10 Sep 2008 15:56:00 -0000 [thread overview]
Message-ID: <1221062101.2827.228.camel@thomas> (raw)
In-Reply-To: <6a0f357f0809081223j2749b3ffg2230a6a64058965@mail.gmail.com>
On Mon, 2008-09-08 at 21:23 +0200, Seb Astien wrote:
> I am not sure that this mailing list is the correct one, so sorry if I
> bother you.
>
> I have a newbie question, but I didn't find the answer on Internet.
Hi Seb,
I'll try to help - I was a newbie not long ago. You may also find the
#gdb IRC channel on irc.freenode.net, port 6667 useful. I've always
found the developers there very helpful.
> Here is my problem.
> I am working with a small custom microcontroller (8-bits), which is
> not supported by gdb, and I would like to know if it is possible to
> use gdb as a debbugger (and how).
>
> In the details I would like to connect a ISS to gdb (or gdb shall be
> changed to understand the instruction set of the microcontroller?). On
> the other end the ISS is connected with the HDL simulator for the
> interaction with the peripherals.
>
> I have seen that gdb can be "contacted" through TCP/IP, but I didn't
> know how, neither how I can explain to gdb what are the registers, how
> (and who throught the ISS and GDB) to give the instruction on both
> side.
> I would be very happy with some how-to/examples/documentation
GDB can talk over its Remote Server Protocol (RSP) via TCP/IP to targets
like your microcontroller. GDB implements the client end of the
protocol.
You need to add a description of you architecture to GDB, so it
understands what your microcontroller can do. You can then connect to
your target with the GDB "target remote" command. GDB will turn all its
usual commands (load, run, break, step etc) into a stream of commands
over the RSP.
Separately you then need to implement a gdbserver to listen to those
commands and apply them to your microcontroller. The GDB distribution
contains some examples, which you can use as a starting point.
There is a description of the RSP and gdbserver in the main GDB User
Guide (see the chapter on Debugging Remote Programs and the appendix
describing the Remote Serial Protocol). The GDB Internals manual will
tell you more about the architecture description
I wrote a HOWTO on porting GDB earlier this year, which may help you:
http://www.embecosm.com/download/ean3.html
This should help particulary with defining your architecture. The
example I used did not use RSP, but the description in the GDB User
Guide should help you get started there.
Hope this is useful.
Jeremy
--
Tel: +44 (1202) 416955
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com
prev parent reply other threads:[~2008-09-10 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-08 19:24 Seb Astien
2008-09-10 15:56 ` Jeremy Bennett [this message]
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=1221062101.2827.228.camel@thomas \
--to=jeremy.bennett@embecosm.com \
--cc=gdb@sourceware.org \
--cc=stien.seba@gmail.com \
/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