public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: "Svein E. Seldal" <Svein.Seldal@solidas.com>
Cc: gdb@sources.redhat.com
Subject: Re: Porting advice
Date: Fri, 28 Mar 2003 22:56:00 -0000	[thread overview]
Message-ID: <3E84D30C.9000104@redhat.com> (raw)
In-Reply-To: <3E81F982.5080802@solidas.com>

> Hello,
> 
> I'm working on porting a new target for gdb, the tic4x, or Texas Instruments TMS320C3x and TMS320C4x (DSP's). I have been looking into the gdb sources and I have a couple of questions regarding the porting job.
> 
> The configuration patch is done, and since tic4x exists already in binutils, bfd and opcodes are also done. The only work needed, it seems like, is gdb and sim.
> 
> - What approach is the best when doing a new port? I have read the gdb internals manual, but I must admit that I dont quite get the overall picture from it.

People typically start with an existing port, as a template, and then 
modify it.

> - Are there any other targets which serve good as a "template"? I see references in the gdbint manual to d10v. Please note that the tic4x target will always be a cross target, never native.

The d10v is currently the best reference target - as it is the most 
up-to-date.

Avoid anything with the word deprecated in it.

> - For a cross target what is required?

<cpu>-tdep.c.

> I have written a TCP gdbserver which accepts the standard gdb remote commands which talks to actual hardware. My primary use of gdb is to be able to talk to this gdbserver and to examine the runtime code, set breakpoints, etc. My second (distant) use of gdb is to use a simulator.
> 
> My problem is that I cannot find any references to any cross targets not linking in a simulator. Is this the case? If I edit my local gdb/config/tic4x/tic4x.mt and remove the "SIM = " line, compilation of gdb croaks and dies because of missing sim symbols. Is it possible to build a target gdb without the usage of a simulator?

--target=ia64-linux-gnu

will give you a cross debugging ia64 with no simulator.

> - What does the "SIM_OBS =" line in the gdb/config/tic4x/tic4x.mt file do?
> 
> - Should I enable multi-arch support now? I mean, this being a totally new target and all?

Yes.  Non multi-arch targets are no longer accepted.

> - What "struct gdbarch" methods do I need to have implemented in gdb/tic4x-tdep.c? Is there a collected documentation of the methods somewhere? (I've read gdbarch.sh, but more detailed examples would be very nice.)

gdbint.texinfo lists most.  As for what is needed see d10v (however, 
take care, the list of required methods is very much in flux).

Andrew


  reply	other threads:[~2003-03-28 22:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-26 19:03 Svein E. Seldal
2003-03-28 22:56 ` Andrew Cagney [this message]
2003-04-03  9:23   ` Svein E. Seldal
2003-04-05  1:54     ` Andrew Cagney
2003-05-28 22:55       ` Porting advice or documentation request Svein E. Seldal
2003-05-29  9:49         ` 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=3E84D30C.9000104@redhat.com \
    --to=ac131313@redhat.com \
    --cc=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).