Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
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:44:00 -0000	[thread overview]
Message-ID: <3B4CBAAC.8030205@cygnus.com> (raw)
In-Reply-To: <3B4CA2DA.EB9DCB43@apple.com>

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


Just FYI, it isn't just multi-arch.  ui-out/ui-file/.... are also having 
an impact effect.  In their case a little re-aranging would certainly 
help (create cleanups.[hc]?, file-utils.[hc]?, ...).


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


Here, I think trying to split things up would be roughly equivalent to 
re-aranging those brand new deck chairs(1) :-)  This is because 
everything depends on the single macro REGISTER_RAW_SIZE().  As I noted 
in another e-mail, I think there needs to be something that specifies 
the protocol register numbering [rawnum] and the G packet layout that is 
completly independant of multi-arch and, for the G packet, GDB.

On a normal GDB, the conversion sequence:

   nat-register layout
     |
     |(*-nat.c)
     |
   raw register layout
     |
     |(*frame*)
     |
   cooked register layout

occures.  (nat layout is what is on the HOST OS IF, raw layout is what 
is used by GDB's register cache and target vector, cooked layout is what 
is used by read_register_frame(frame, ...) et.al.)

If you introduce the remote protocol into the picture then the sequence 
is changed to either:

   nat-register layout
     |
     |(gdbserv/*nat*)
     |
   G packet layout
     |
     |(remote.c)
     |
   raw reg layout
     |
     |(*frame*)
     |
   cooked reg layout

or

   nat-register layout
     |
     |(*-nat.c)
     |
   raw register layout
     |
     |(gdbserver)
     |
   G packet layout
     |
     |(remote.c)
     |
   raw register layout
     |
     |(frame*.c)
     |
   cooked register layout

depending on how ``pure'' you want things :-)

Anyway, within the above, I think the `G packet' and possibly the `raw 
register layout' need to be defined out side of *-tdep.c.  If this is 
done then the rest of the problem becomes managable.

See also:
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=122&database=gdb

Anyway, to throw a spanner in the works, (given some comments from Eli) 
IRIX could easily end up with a *-nat.c that supports two different 
architectures.  Solaris is similar.  I suspect the i386-64 chip could be 
the same.

	enjoy,
		Andrew

--

(1) Rearanging deck chairs on the titanic.


  parent reply	other threads:[~2001-07-11 13:44 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
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 [this message]
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=3B4CBAAC.8030205@cygnus.com \
    --to=ac131313@cygnus.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