Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: jtc@redback.com (J.T. Conklin)
To: Stan Shebs <shebs@apple.com>
Cc: Daniel Jacobowitz <dmj+@andrew.cmu.edu>, gdb@sources.redhat.com
Subject: Re: Current (non-) state of gdbserver
Date: Wed, 11 Jul 2001 13:17:00 -0000	[thread overview]
Message-ID: <5mhewj9q6h.fsf@jtc.redback.com> (raw)
In-Reply-To: <3B4CA2DA.EB9DCB43@apple.com>

Daniel> Unless someone steps up with something already done (if you're
Daniel> out there, we're waiting...), I'm going to start working on
Daniel> this.  I'm not sure how multiarch will fit in to gdbserver in
Daniel> the future, but for now my intent is to bloat it somewhat with
Daniel> the necessary support code.  It'll probably involve splitting
Daniel> a lot of tdep files into two pieces.

Stan> As Andrew observes, you'll probably get tangled up in
Stan> dependencies, but those are likely to be mistakes in GDB's
Stan> architecture - there's no good reason why lowest-level native
Stan> and target support (which is all that gdbserver needs) has to be
Stan> making references to user-interface code and the like.

Stan> Thought 1: split the arch vector into a general vector and a
Stan> nano-vector with only the register definitions and such.  If we
Stan> really don't care about the extra footprint from unused arch
Stan> code (either because it's small, or we know linker will
Stan> discard), then instead you could have an optional <arch>-ui.c to
Stan> be a home for target-specific commands.

There are a small set of a primitives that GDB and gdbserver use to
control the target.  In GDB, they're scattered amongst *-tdep.c files,
inf*.c, etc.; while in gdbserver they are centralized in each low-*.c
file.  If we split a nano-vector out of the target vector, I think it
should contain only these functions.

Of the top of my head we have:

        * fetch/store memory
        * fetch/store registers
        * stop
        * kill 
        * resume
        * insert/remove break/watchpoint

While you're correct that most of the functions in *-tdep.c files
probably wouldn't bloat gdbserver too much if linked in, I prefer that
the split out files only contain the functions that implement the
nano-vector.  This delination clearly defines which functions go in
which file.

>> I'd also like to start building gdbserver by default on platforms which
>> support it (and I have patches to extend the list a bit).  That way we can
>> at least notice this sort of thing...

Stan> An excellent idea.  One thing I wanted to do as part of this was to
Stan> move gdbserver out of its subdirectory, since by the time you're
Stan> done integrating with the rest of GDB sources, you should only have
Stan> one file unique to gdbserver (main()), and the semi-duplicated
Stan> Makefile.in make trouble.

While we're talking of splitting things, I'd like to split things so
that gdbserver and the sample debug stubs shared as much as possible;
as well as making sure there are clean lines between the packet i/o,
command/response, and "nanovector" functions.  One complication is
that stubs have traditionally been public domain.

This would also make it trivial to prototype new high-level protocols
or data transports.

        --jtc

-- 
J.T. Conklin
RedBack Networks


  reply	other threads:[~2001-07-11 13:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-10 23:45 Daniel Jacobowitz
2001-07-11 10:36 ` Andrew Cagney
2001-07-11 12:03 ` Stan Shebs
2001-07-11 13:17   ` J.T. Conklin [this message]
2001-07-11 13:55     ` Andrew Cagney
2001-07-11 15:06     ` Quality Quorum
2001-07-12 12:21       ` J.T. Conklin
2001-07-12 12:45         ` Andrew Cagney
2001-07-13  7:53           ` Quality Quorum
2001-07-15  0:30             ` Eli Zaretskii
2001-07-15  0:58               ` Fabrice Gautier
2001-07-15  3:15                 ` Eli Zaretskii
2001-07-15  6:21                   ` Fabrice Gautier
2001-07-16 14:08               ` Quality Quorum
2001-07-11 13:44   ` Andrew Cagney
2001-07-11 12:43 ` J.T. Conklin
2001-07-12 13:04 ` Andrew Cagney

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=5mhewj9q6h.fsf@jtc.redback.com \
    --to=jtc@redback.com \
    --cc=dmj+@andrew.cmu.edu \
    --cc=gdb@sources.redhat.com \
    --cc=shebs@apple.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