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: [PATCH] dwarf2read.c: Don't assume uint32_t is unsigned int on all hosts.


On 05/22/2013 04:57 PM, Doug Evans wrote:
> On Wed, May 22, 2013 at 2:43 AM, Pedro Alves <palves@redhat.com> wrote:
>> On 05/22/2013 12:35 AM, Doug Evans wrote:
>>> On Tue, May 21, 2013 at 1:34 PM, Pedro Alves <palves@redhat.com> wrote:
>>>> Use pulongest rather than PRIu32, so that the translatable format
>>>> string does not depend on host.
>>
>> ...
>>
>>> Lovely.
>>> Although having to remember to use pulongest to print uint32_t sounds
>>> like a never ending series of headaches.
>>
>> Hmm.  Grepping for PRIu in src/intl/ finds lots of hits.  Looks like
>> gettext is doing some magic to deal with these.  There's still the
>> issue with the fact that we use gnulib's inttypes.h replacement for
>> systems that don't have it, and it's possible gettext's replacements
>> don't match gnulib's...  But I'm willing to ignore that.
>>
>> WDYT?
> 
> If it's doable, I'd prefer this to pulongest.

OK.

> Another possibility, mentioned for reference sake, would be adding puint32, etc.

Yeah, though I think those would end up implemented as calls to
decimal2str(...,ULONGEST,...) internally anyway.

With pulongest, we don't have to care the width of the variable,
only the sign.  I guess I could see that as an advantage, even over
PRIxxx.

> I'm ambivalent on what The Right fix is here.

Me too.

-- 
Pedro Alves


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