public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: jtc@redback.com (J.T. Conklin)
To: "deepak shekhar" <dipaktc@rediffmail.com>
Cc: "gdb@sources.redhat.com" <gdb@sources.redhat.com>
Subject: Re: Remote Debugger
Date: Thu, 26 Apr 2001 14:42:00 -0000	[thread overview]
Message-ID: <5mpudzmj8a.fsf@jtc.redback.com> (raw)
In-Reply-To: <20010420131340.8515.qmail@mailweb17.rediffmail.com>

>>>>> "deepak" == deepak shekhar <dipaktc@rediffmail.com> writes:
deepak> I am porting GDB for an hypothetical processor.  It is a
deepak> remote debugger that is., the processor is connected to the
deepak> host machine via serial port.  As a part of it i am writing
deepak> the following files remote-hypo.c and hypo-tdep.c &tm-hypo.h.

Unless there is some specific requirement that you have not stated,
there is no need to have a target specific mechanism for gdb/target
communications (ie. remote-hypo.c).  The target independent generic
remote serial protocol should be sufficient.

deepak> Can somebody explain me how actually the GDB executes the
deepak> program on the target processor??

Many people use GDB to download the program to the target.  For many
targets GDB uses a special download mechanism (streaming s-records,
using a bulk transfer protocol like xmodem or tftp, etc.), but most
simply do multiple writes.  The targets I'm responsble for load the
image via tftp or off flash, so GDB is not involved in downloading.

Once the program has been downloaded, GDB sets the program counter to
the first instruction, and when instructed sends a continue or step
command.  That's it.  The program is running.  GDB then waits for
notification that the program has stopped.

deepak> Which  available port is a good example to follow??

My advice is to go with a target that is most like your hypo cpu.  But
take advantage of all the other targets as examples.  Also be sure to
read the GDB internals manual.

        --jtc

-- 
J.T. Conklin
RedBack Networks

  reply	other threads:[~2001-04-26 14:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-20  6:20 deepak shekhar
2001-04-26 14:42 ` J.T. Conklin [this message]
2001-04-20  6:22 deepak shekhar

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=5mpudzmj8a.fsf@jtc.redback.com \
    --to=jtc@redback.com \
    --cc=dipaktc@rediffmail.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).