This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix cygwin build error with i386-linux-tdep.c
- From: Hui Zhu <teawater at gmail dot com>
- To: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Cc: freephp at gmail dot com, gdb-patches at sourceware dot org, msnyder at vmware dot com
- Date: Tue, 1 Sep 2009 10:15:24 +0800
- Subject: Re: [PATCH] Fix cygwin build error with i386-linux-tdep.c
- References: <daef60380908300615u40f59a38t7d2c2f2252c5924d@mail.gmail.com> <200908301356.n7UDuO4a006136@brahms.sibelius.xs4all.nl> <daef60380908300709i382261c9w6152a694dcdb5975@mail.gmail.com> <daef60380908300737k239bf7dcp6b4eb99c3b23b6f6@mail.gmail.com> <daef60380908310122w5ff65266wdb1a6667bdc8407f@mail.gmail.com> <7d77a27d0908310145w2bcafc4bq2ed9bbd2ccff3d03@mail.gmail.com> <daef60380908310148hcdf0292oabb202913786132c@mail.gmail.com> <200908311546.n7VFkB7b012586@brahms.sibelius.xs4all.nl>
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