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] Fix cygwin build error with i386-linux-tdep.c


On Mon, Aug 31, 2009 at 7:52 AM, Jiang Jilin<freephp@gmail.com> wrote:
> On Mon, Aug 31, 2009 at 7:43 AM, Hui Zhu<teawater@gmail.com> wrote:
>> On Mon, Aug 31, 2009 at 07:39, Jiang Jilin<freephp@gmail.com> wrote:
>>> On Sun, Aug 30, 2009 at 11:22 PM, Hui Zhu<teawater@gmail.com> wrote:
>>>> On Sun, Aug 30, 2009 at 23:13, Jiang Jilin<freephp@gmail.com> wrote:
>>>>> On Sun, Aug 30, 2009 at 9:15 PM, Hui Zhu<teawater@gmail.com> wrote:
>>>>>> Hi guys,
>>>>>>
>>>>>> ? if (tmpu32 > 499)
>>>>>> ? ? {
>>>>>> ? ? ? printf_unfiltered (_("Process record and replay target doesn't "
>>>>>> - ? ? ? ? ? ? ? ? ? ? ? ? ? "support syscall number %u\n"), tmpu32);
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? "support syscall number %u\n"), (unsigned) tmpu32);
>>>>>> ? ? ? return -1;
>>>>>> ? ? }
>>>>>>
>>>>>
>>>>> Sorry, it's not clear to me.
>>>>>
>>>>> when looking into the code, I found the type of tmpu32 is uint32_t,
>>>>> why did the gcc complain "warning: unsigned int format, uint32_t arg
>>>>> (arg 2)"?
>>>>>
>>>>> %u doesn't mean unsigned int?
>>>>>
>>>>
>>>> Really? ?what does it mean?
>>>
>>> I mean without your patch, the type of tmpu32 _is_ uint32_t, why did
>>> gcc complain? and when you cast it to unsigned, the warning
>>> disappeared?
>>>
>>
>> I am not sure the unit32_t in cygwin. ?But it looks like uint32_t is
>> not unsigned int in cygwin.
>> And "unsigned" is seems "unsigned int".
>
> If it's true, that is, uint32_t is not unsigned int in cygwin, ?I
> think there is a ?bug in cygwin, we should redefine the uint32_t to
> real unsigned int, shouldn't we?

ok, I got it.  uint32_t is typedefed to  long unsigned int in cygwin .

Thank!

Jiang


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