From: "Svein E. Seldal" <Svein.Seldal@solidas.com>
To: gdb@sources.redhat.com
Subject: Porting advice or documentation request
Date: Wed, 28 May 2003 22:55:00 -0000 [thread overview]
Message-ID: <3ED53E58.5070502@solidas.com> (raw)
In-Reply-To: <3E8E3751.3040502@redhat.com>
Hi all,
I'm working on this new gdb port, and more than often I'm stuck. I have
been told that the d10v port is the most authorative template for how
new targets should be written. Unfortunately it is impossible to learn
anything about the d10v's hardware architecture on the net, so I find it
a bit difficult to template from.
It is simple enough to copy the functions and such from the d10v's
implemenation, but in many cases I have *no* idea what the function I'm
implementing really does. E.g. what parts of the port are spesialised
d10v parts and should not be copied, and which are general port
implementations that should be copied, etc.
One pratical example is the struct frame_unwind table included in the
target. It refers to "xxx_frame_this_id" and "xxx_frame_prev_register",
which in turn performs some magic that I'm unable to make out. I
understand from the docs that the xxx_frame_this_id should return the
calling function's frame, but in the d10v port, there is much code that
I dont understand what is.
And the list of gdbarch funtions are long, and my general impression is
that I dont know which functions are required and which are there for
special cases. What functions *must* I have implemented?
So please, please, please, does anyone have any pointers on how to
understand gdb to get this port up and running? How can I best
understand the gdbarch functions? I've read the gdb, gdb-internals
manual and I'm grepping a lot of code, debugging gdb itself, but I'm
still confused and uninformed. :(
So far I have at least a little bit. I have this TCP remote GDB server
which talks to real hardware. And I've managed to get communication with
it from GDB. I am able to place breakpoints, step code, etc. But as
soon as I do anything more complex, like dumping the frame or printing
the registers it either dies with a segfault or issues a gdb error. But
again, generally I dont really know *why* things fail, because I dont
understand *what* I need to do or *where* to put it.
... help please.
Regards,
Svein
next prev parent reply other threads:[~2003-05-28 22:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-26 19:03 Porting advice Svein E. Seldal
2003-03-28 22:56 ` Andrew Cagney
2003-04-03 9:23 ` Svein E. Seldal
2003-04-05 1:54 ` Andrew Cagney
2003-05-28 22:55 ` Svein E. Seldal [this message]
2003-05-29 9:49 ` Porting advice or documentation request Richard Earnshaw
2003-05-29 15:34 ` Elena Zannoni
2003-05-29 18:54 ` Andrew Cagney
2003-03-31 18:17 ` Porting advice Corey Minyard
2003-03-31 21:16 ` Svein E. Seldal
2003-03-31 22:36 ` Corey Minyard
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=3ED53E58.5070502@solidas.com \
--to=svein.seldal@solidas.com \
--cc=gdb@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).