Re: [RFA, 3 of 3] save/restore process record, part 3 (save/restore)

Eli Zaretskii
2009-10-23T10:08:19Z

> From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> Cc: "'Hui Zhu'" <teawater@gmail.com>, "'Eli Zaretskii'" <eliz@gnu.org>,
> <gdb-patches@sourceware.org>
> Date: Fri, 23 Oct 2009 10:52:27 +0200
>
> Furthermore, there is a '%ll' rule
> in ARI that states that:
> Do not use printf("%ll"), instead use printf("%s",phex()) to dump a `long
> long' value
> Shouldn't this also concern '%lu'?

There is a difference: %lu is defined by C89, while %ll is only
codified by C9X. GDB does not yet require a C9X compiler.

> Do we really need long for sizeof function returns?
> Are there any types (use in record.c) for which
> sizeof would not fit into a regular "unsigned int" ?

sizeof returns a value of the type `size_t'. On a 64-bit host, size_t
is typically a 64-bit data type, and so is `unsigned long'. (64-bit
Windows is an exception, because it uses a different programming
model.)