This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]