This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: minor doc fix
On Wed, Jul 30, 2008 at 09:34:07PM +0300, Eli Zaretskii wrote:
> > Date: Wed, 30 Jul 2008 19:17:02 +0100
> > From: Bart Veer <bartv@ecoscentric.com>
> > CC: gdb-patches@sourceware.org
> >
> > The text is not talking about host-side or target-side data
> > structures. It is describing a protocol, what gets transferred between
> > host and target for a gettimeofday request, which happens to be 12
> > bytes and not 8.
>
> Sorry, you lost me. Perhaps I'm confused, but `long' takes 8 bytes
> only on 64-bit Unix machines. Otherwise it's 4 bytes. What am I
> missing?
The answer's even in the manual! :-)
In Protocol-specific Representation of Datatypes, see Integral
Datatypes:
`long' and `unsigned long' are implemented as 64 bit types.
Then in struct timeval:
struct timeval {
time_t tv_sec; /* second */
long tv_usec; /* microsecond */
};
The integral datatypes conform to the definitions given in the
appropriate section (see *note Integral Datatypes::, for details) so
this structure is of size 8 bytes.
--
Daniel Jacobowitz
CodeSourcery