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]

[Prec/RFA] fix build error of prec in cygwin


Hi guys,

This patch is to fix build error of prec in cgywin.
Pierre had help me tested it both in 32bit and 64bit CORE_ADDR length.

Please help me review it.

2009-05-11  Hui Zhu  <teawater@gmail.com>

	Add sys_fcntl argument interfaces to linux_record_tdep.

	* linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
	fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
	interfaces.
	* i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
	I386_LINUX_RECORD_FCNTL_F_GETLK64,
	I386_LINUX_RECORD_FCNTL_F_SETLK64,
	I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
	of I386 Linux sys_fcntl arguments.
	(i386_linux_init_abi): Set macros values to linux_record_tdep.
	* linux-record.c (record_linux_system_call): Change to use
	the interface in linux_record_tdep in sys_fcntl and
	sys_fcntl64.

	* linux-record.c (record_linux_system_call): Fix the process
	record build error about type in CYGWIN.


Thanks,
Hui


On Fri, May 8, 2009 at 20:11, Pierre Muller <muller@ics.u-strasbg.fr> wrote:
> I tested this both in 32bit and 64bit CORE_ADDR length.
>
> I can confirm that cygwin compilation is fixed in both
> cases with that patch and hope it will be approved
> rapidly.
>
> ?Thanks, Hui.
>
>
> Pierre Muller
> Pascal language support maintainer for GDB
>
>
>
>
>> -----Message d'origine-----
>> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
>> owner@sourceware.org] De la part de Hui Zhu
>> Envoyé?: Friday, May 08, 2009 7:12 AM
>> À?: Pierre Muller
>> Cc?: gdb-patches@sourceware.org; Michael Snyder; Pedro Alves
>> Objet?: Re: Process record and replay checked in to main trunk
>>
>> Hi Pierre,
>>
>> I make a patch to fix this bug, but I don't have cygwin.
>>
>> Could you please help me test this patch in cygwin?
>>
>> Thanks,
>> Hui
>>
>> On Fri, May 8, 2009 at 07:06, Pedro Alves <pedro@codesourcery.com>
>> wrote:
>> > On Thursday 07 May 2009 23:43:13, Michael Snyder wrote:
>> >> Guessing it isn't implemented for 64 bit.
>> >
>> > I don't think that's the problem here. ?Cygwin is 32-bit, and has
>> > 32-bit ints.
>> >
>> >> ../../purecvs/gdb/linux-record.c:397: warning: unsigned int format,
>> >> uint32_t arg
>> >
>> >> ../../purecvs/gdb/linux-record.c:629: warning: int format, uint32_t
>> >> arg (arg
>> >
>> > Better use casts, or use plongest/pulongest/hex_string where
>> appropriate?
>> >
>> >> Perhaps we should have a --disable-process-record config option?
>> >> If only for a back-up plan?
>> >
>> > I think that would be more work than fixing this properly. ?:-)
>> >
>> >> ../../purecvs/gdb/linux-record.c:1636: error: `F_GETLK64' undeclared
>> >> (first use in this function)
>> >
>> > There are a bunch of RECORD_* macros defined on top of linux-record.c
>> > to replace contants like these. ?E.g., RECORD_Q_GETFMT. ?Looks like
>> > this case was just missed.
>> >
>> > --
>> > Pedro Alves
>> >
>
>

Attachment: fix-prec-cygwin-build-error.txt
Description: Text document


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