Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Corinna Vinschen <vinschen@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA]: File-I/O patch, Documentation
Date: Fri, 28 Feb 2003 15:27:00 -0000	[thread overview]
Message-ID: <3E5F807D.9080506@redhat.com> (raw)
In-Reply-To: <20030228083308.GG24097@cygbert.vinschen.de>

> On Thu, Feb 27, 2003 at 06:07:06PM -0500, Andrew Cagney wrote:
> 
>> I think the only problem here is the need for two small, simple but 
>> concrete examples:
>> 
>> - the target doing a write() call
>> 
>> - the user entering CNTRL-C and a demonstration of one of the edge cases
> 
> 
> Ok.
> 
> 
>> My one concern with the protocol spec is with this structure.  The size 
>> of those various types is target compiler dependent yet the 
>> implementation assumes specific sizes.
> 
> 
> Sure.  The sizes are chosen so that they are very likely big enough
> to match all hosts and targets for... well... at least a long time.

Right.  That is fine.

>> c99 (what ever the standard) formalized a number of explicitly sized 
>> types (int32 et.al. I believe).  I think this table should be specified 
>> using those types.  The alternative is to generalize the 
>> sim/common/sim-types.h file and then specify the sizes using that.
> 
> 
> I don't think so.  The protocol is more or less self-contained.  All
> definitions are based on the assumption, that you'll never find a
> really matching combination of values as they are defined on all
> machines.  Looking into the fileio code you'll see, that gdb has a
> couple of functions which transform all protocol datatypes to host
> datatypes and all protocol values to host values and vice versa.
> This is done that way to be totally independent from other sources of
> definition (especially machine dependent definitions).


> It's *expected* that the gdb plugin on the target side is doing the
> same.

The problem is that the protocol spec isn't self contained.  As best as 
I can tell, the specification is making assumptions about the underlying 
characteristics of `int', `long', `time_t', et.al. types.  `int', for 
instance, can be anything from 16 to 64 bits.

For the target side for this to be correctly, the types:

- the size of these types.
- the byte order of these types
- the underlying implementation of these types

all need to be specified (I'm sure there is other stuff that someone 
will point out later :-).  I don't see that information.

>> The time unit of st_*time should be defined.
> 
> 
> Second since epoche but you're right, it should be mentioned.
> 
> 
>> The byte order of all the values should be defined.
> 
> 
> It is.  Quote from the text:
> 
>   Structured data which is transferred using a memory read or write
>   packet as e.g. a struct stat is expected to be in a protocol specific
>   format with all numerical multibyte datatypes being big endian.

If it is defined somewhere else, then cross references are needed.

>> The reference to B.1 should be removed.
> 
> 
> Nope.

Er, `B.1' is meaningless.  If the intent was to reference another 
section of the document, then a texinfo cross-reference should be used.

Andrew



  parent reply	other threads:[~2003-02-28 15:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-21  1:04 Corinna Vinschen
2002-11-21  1:22 ` Corinna Vinschen
2002-11-23  3:04   ` Eli Zaretskii
2002-11-23  3:02 ` Eli Zaretskii
2002-11-23  8:12   ` Andrew Cagney
2002-11-25  2:52   ` Corinna Vinschen
2002-11-25 11:01     ` Eli Zaretskii
2002-11-26  6:07       ` Corinna Vinschen
2002-11-26 10:02         ` Eli Zaretskii
2002-11-27  9:08           ` Corinna Vinschen
2003-02-26 23:20 ` Andrew Cagney
2003-02-27  8:37   ` Corinna Vinschen
2003-02-27 23:05     ` Andrew Cagney
2003-02-28  8:33       ` Corinna Vinschen
2003-02-28 15:25         ` Daniel Jacobowitz
2003-02-28 15:49           ` Corinna Vinschen
2003-02-28 16:37             ` Daniel Jacobowitz
2003-02-28 15:27         ` Andrew Cagney [this message]
2003-02-28 15:47           ` Corinna Vinschen
2003-03-02  3:03             ` Andrew Cagney
2003-03-03 12:12               ` Corinna Vinschen
2003-03-04 18:53                 ` Andrew Cagney
2003-03-04 19:46                   ` Eli Zaretskii
2003-03-06 21:19                     ` Andrew Cagney
2003-03-06 21:26                 ` Andrew Cagney
2003-03-07 14:29                   ` Corinna Vinschen
2003-03-07 14:55                     ` Andrew Cagney
2003-03-01 12:36     ` Eli Zaretskii
2003-03-01 15:43       ` 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=3E5F807D.9080506@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vinschen@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