From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17460 invoked by alias); 27 Feb 2003 23:05:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17256 invoked from network); 27 Feb 2003 23:05:02 -0000 Received: from unknown (HELO localhost.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 27 Feb 2003 23:05:02 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8CC152A9C; Thu, 27 Feb 2003 18:07:06 -0500 (EST) Message-ID: <3E5E9A1A.9000708@redhat.com> Date: Thu, 27 Feb 2003 23:05:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Corinna Vinschen Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA]: File-I/O patch, Documentation References: <20021121100443.U24928@cygbert.vinschen.de> <3E5D4C4C.1040502@redhat.com> <20030227083701.GE20955@cygbert.vinschen.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00792.txt.bz2 > +@menu > +* File-I/O Overview:: > +* Protocol basics:: > +* The `F' request packet:: > +* The `F' reply packet:: > +* Memory transfer:: > +* The Ctrl-C message:: > +* Console I/O:: > +* The isatty call:: > +* The system call:: > +* List of supported calls:: 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 > +* Protocol specific representation of datatypes:: > +* Constants:: > +@end menu -- 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. > +@smallexample > +struct stat @{ > + unsigned int st_dev; /* device */ > + unsigned int st_ino; /* inode */ > + mode_t st_mode; /* protection */ > + unsigned int st_nlink; /* number of hard links */ > + unsigned int st_uid; /* user ID of owner */ > + unsigned int st_gid; /* group ID of owner */ > + unsigned int st_rdev; /* device type (if inode device) */ > + unsigned long st_size; /* total size, in bytes */ > + unsigned long st_blksize; /* blocksize for filesystem I/O */ > + unsigned long st_blocks; /* number of blocks allocated */ > + time_t st_atime; /* time of last access */ > + time_t st_mtime; /* time of last modification */ > + time_t st_ctime; /* time of last change */ > +@}; > +@end smallexample 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. The time unit of st_*time should be defined. The byte order of all the values should be defined. The reference to B.1 should be removed. Andrew