From: "Andreas Olofsson" <andreas.d.olofsson@gmail.com>
To: gdb@sourceware.org
Subject: The right way to port GDB to a new architecture
Date: Tue, 13 Jan 2009 15:40:00 -0000 [thread overview]
Message-ID: <a4d25d600901130739w5c8a7dd8xca236ecde36ba97e@mail.gmail.com> (raw)
I have been reading through the GDB documentation and I need some
advice on the best approach to porting GDB to a new architecture
before I dive into the porting process..
Describing the architecture doesn't seem too bad and is well described
in Jeremy Bennett's document "Howto: Porting the GNU debugger". How
to actually communicate with the target looks to be more of a
challenge and there seem to be a number of different approaches.
Possible approaches(we already have bfd, binutils, gcc, and all the
other stuff ported):
1.) Use cgen or sid to generate a gdb compliant simulator and link in
the simulator library. Since we will need the remote debugging option
eventually, I am thinking that integrating a cgen based simulator with
GDB would be extra work and I would like to skip this step if
possible.
2.) Write a stub for the target and use remote serial protocol. The
included stubs in the distribution are quite old? Is this no longer a
preferred method?
3.) Port gdbserver to the new architecture. Is it a requirement to
have linux running on the target? Based on the ports I have seen in
GDB it would seem to be the case? Why doesn't the ARM have a stub for
example? I can't imagine you have to run linux on an arm based device
to be able use remote GDB?
4.) Another approach?
If we assume that the target is not running linux, what would be a
good starting point to work from: m32r?
Andreas
next reply other threads:[~2009-01-13 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 15:40 Andreas Olofsson [this message]
2009-01-13 17:59 ` Jeremy Bennett
2009-01-13 19:31 ` Doug Evans
2009-01-21 21:56 ` Andreas Olofsson
2009-01-21 22:15 ` Doug Evans
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=a4d25d600901130739w5c8a7dd8xca236ecde36ba97e@mail.gmail.com \
--to=andreas.d.olofsson@gmail.com \
--cc=gdb@sourceware.org \
/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