Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Andrew Batchelor <A.C.Batchelor-99@student.lboro.ac.uk>
Cc: GDB Newsgroup <gdb@sources.redhat.com>
Subject: Re: GDB --> Parallel Port --> Target??
Date: Wed, 08 Oct 2003 17:55:00 -0000	[thread overview]
Message-ID: <vt2brsrfwf2.fsf@zenia.home> (raw)
In-Reply-To: <1065620784.1045.330.camel@And.Linux>


Andrew Batchelor <A.C.Batchelor-99@student.lboro.ac.uk> writes:
> Can I check the flow of things?
> 
> 1) Create new serial_ops structure pointing to initialise functions,
> etc.
> 2) Then call this serial_add_interface to register the new structure.
> 
> 3) Add a new case to serial_open in serial.c for argument parsing to
> 'target remote'.

Yep, that's right.

> I may need to do some protocol conversion from the Remote Serial
> Protocol to something else.

What kind of agent do you have running on the system being debugged
that will be speaking the protocol with GDB?

GDB's protocol looks really hairy, but there are actually only five or
six operations you must implement --- the rest are optional.  Those
are:

- read registers
- write registers
- read memory
- write memory
- continue, and tell me why you stopped
- single-step (if GDB doesn't do software single-stepping for your
  architecture, but I'm not completely clear on this)

You can add more and get better behavior, more features, etc.  But the
above are all you need for almost everything --- breakpoints,
backtraces, expression evaluation, and so on.

It's been implemented many times over, and some implementations are
quite small and simple.  See the files called *-stub.c in the GDB
source tree.  Some of them are out-of-date, and none of them are
really tested or supported, but they'll give you the right idea.


  reply	other threads:[~2003-10-08 17:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-07 10:00 Andrew Batchelor
2003-10-07 16:28 ` Jim Blandy
2003-10-08 13:44   ` Andrew Batchelor
2003-10-08 17:55     ` Jim Blandy [this message]
2003-10-10 16:49       ` Andrew Batchelor
2003-10-10 19:32         ` Jim Blandy
2003-10-08 19:37   ` Andrew Cagney
2003-10-10 16:53     ` Andrew Batchelor

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=vt2brsrfwf2.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=A.C.Batchelor-99@student.lboro.ac.uk \
    --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