diff options
author | Hui Zhu <teawater@gmail.com> | 2009-05-22 14:07:27 +0000 |
---|---|---|
committer | Hui Zhu <teawater@gmail.com> | 2009-05-22 14:07:27 +0000 |
commit | 50ef67b36b1d2c7d0963c93cae32bc2b32ddc15a (patch) | |
tree | a424434079d699d135af66c36e7485128b691c4e /gdb/i386-linux-tdep.c | |
parent | ld/ (diff) | |
download | binutils-gdb-50ef67b36b1d2c7d0963c93cae32bc2b32ddc15a.tar.gz binutils-gdb-50ef67b36b1d2c7d0963c93cae32bc2b32ddc15a.tar.bz2 binutils-gdb-50ef67b36b1d2c7d0963c93cae32bc2b32ddc15a.zip |
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.
Diffstat (limited to 'gdb/i386-linux-tdep.c')
-rw-r--r-- | gdb/i386-linux-tdep.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 0f7820d9412..163b03607d2 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -586,6 +586,14 @@ static int i386_linux_sc_reg_offset[] = #define I386_LINUX_RECORD_IOCTL_TIOCSHAYESESP 0x545F #define I386_LINUX_RECORD_IOCTL_FIOQSIZE 0x5460 +/* The values of the second argument of system call "sys_fcntl" + and "sys_fcntl64". The values of these macros were obtained from + Linux Kernel source. */ +#define I386_LINUX_RECORD_FCNTL_F_GETLK 5 +#define I386_LINUX_RECORD_FCNTL_F_GETLK64 12 +#define I386_LINUX_RECORD_FCNTL_F_SETLK64 13 +#define I386_LINUX_RECORD_FCNTL_F_SETLKW64 14 + static void i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { @@ -783,6 +791,12 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) I386_LINUX_RECORD_IOCTL_TIOCSHAYESESP; i386_linux_record_tdep.ioctl_FIOQSIZE = I386_LINUX_RECORD_IOCTL_FIOQSIZE; + i386_linux_record_tdep.fcntl_F_GETLK = I386_LINUX_RECORD_FCNTL_F_GETLK; + i386_linux_record_tdep.fcntl_F_GETLK64 = I386_LINUX_RECORD_FCNTL_F_GETLK64; + i386_linux_record_tdep.fcntl_F_SETLK64 = I386_LINUX_RECORD_FCNTL_F_SETLK64; + i386_linux_record_tdep.fcntl_F_SETLKW64 = + I386_LINUX_RECORD_FCNTL_F_SETLKW64; + i386_linux_record_tdep.arg1 = I386_EBX_REGNUM; i386_linux_record_tdep.arg2 = I386_ECX_REGNUM; i386_linux_record_tdep.arg3 = I386_EDX_REGNUM; |