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 23:46, Mark Kettenis<mark.kettenis@xs4all.nl> wrote:
>> From: Hui Zhu <teawater@gmail.com>
>> Date: Mon, 31 Aug 2009 16:48:33 +0800
>>
>> On Mon, Aug 31, 2009 at 16:45, Jiang Jilin<freephp@gmail.com> wrote:
>> >
>> > I think it's not very sensible to cast unsigned to signed, think about
>> > if the unsigned value is _very_ big.
>> >
>>
>> This is syscall id, it will not _very_ big.
>
> Jiang has a point here though. ?The cast is weird, and only there
> because it seems you can't make up your mind whether syscall numbers
> are signed or unsigned. ?Some bits of code use signed integers and
> some use unsigned integers. ?Once that inconsistency is fixed, all
> these problems will disappear.
>
> Mark
>
>

  regcache_raw_read_unsigned (regcache, I386_EAX_REGNUM, &num);

  if (num > 499)
    {
      printf_unfiltered (_("Process record and replay target doesn't "
                           "support syscall number %d\n"), (int) num);
      return -1;
    }

  ret = record_linux_system_call ((int) num, regcache,

This num that will send to "record_linux_system_call" is 0 - 499.
So it don't have big or small trouble, right?


Hui


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