Linux process record and replay support.

* Makefile.in (ALLDEPFILES): Add linux-record.c.
(ALL_TARGET_OBS): Add linux-record.o.
* configure.tgt (x86_64-*-linux*): Add linux-record.o.
(i[34567]86-*-linux*): Add linux-record.o.
* linux-record.c, linux-record.h: New file.
This commit is contained in:
Hui Zhu 2009-04-30 03:04:28 +00:00
parent 69d05d3898
commit b7f6bf2299
5 changed files with 2396 additions and 3 deletions

View File

@ -1,3 +1,14 @@
2009-04-30 Hui Zhu <teawater@gmail.com>
Michael Snyder <msnyder@vmware.com>
Linux process record and replay support.
* Makefile.in (ALLDEPFILES): Add linux-record.c.
(ALL_TARGET_OBS): Add linux-record.o.
* configure.tgt (x86_64-*-linux*): Add linux-record.o.
(i[34567]86-*-linux*): Add linux-record.o.
* linux-record.c, linux-record.h: New file.
2009-04-30 Hui Zhu <teawater@gmail.com>
Michael Snyder <msnyder@vmware.com>

View File

@ -519,7 +519,8 @@ ALL_TARGET_OBS = \
prologue-value.o \
symfile-mem.o \
corelow.o \
windows-tdep.o
windows-tdep.o \
linux-record.o
# Host-dependent makefile fragment comes in here.
@host_makefile_frag@
@ -1312,6 +1313,7 @@ ALLDEPFILES = \
libunwind-frame.c \
linux-fork.c \
linux-tdep.c \
linux-record.c \
m68hc11-tdep.c \
m32r-tdep.c \
m32r-linux-nat.c m32r-linux-tdep.c \

View File

@ -196,7 +196,8 @@ i[34567]86-*-solaris*)
i[34567]86-*-linux*)
# Target: Intel 386 running GNU/Linux
gdb_target_obs="i386-tdep.o i386-linux-tdep.o glibc-tdep.o i387-tdep.o \
solib.o solib-svr4.o symfile-mem.o corelow.o linux-tdep.o"
solib.o solib-svr4.o symfile-mem.o corelow.o \
linux-tdep.o linux-record.o"
if test "x$enable_64_bit_bfd" = "xyes"; then
# Target: GNU/Linux x86-64
gdb_target_obs="amd64-tdep.o amd64-linux-tdep.o ${gdb_target_obs}"
@ -528,7 +529,8 @@ x86_64-*-linux*)
# Target: GNU/Linux x86-64
gdb_target_obs="amd64-tdep.o amd64-linux-tdep.o i386-tdep.o \
i387-tdep.o i386-linux-tdep.o glibc-tdep.o \
solib.o solib-svr4.o corelow.o symfile-mem.o linux-tdep.o"
solib.o solib-svr4.o corelow.o symfile-mem.o linux-tdep.o \
linux-record.o"
build_gdbserver=yes
;;
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)

2205
gdb/linux-record.c Normal file

File diff suppressed because it is too large Load Diff

173
gdb/linux-record.h Normal file
View File

@ -0,0 +1,173 @@
/* Process record and replay target code for GNU/Linux.
Copyright (C) 2008, 2009 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _LINUX_RECORD_H_
#define _LINUX_RECORD_H_
struct linux_record_tdep
{
/* The size of the type that will be used in a system call. */
int size__old_kernel_stat;
int size_tms;
int size_loff_t;
int size_flock;
int size_oldold_utsname;
int size_ustat;
int size_old_sigaction;
int size_old_sigset_t;
int size_rlimit;
int size_rusage;
int size_timeval;
int size_timezone;
int size_old_gid_t;
int size_old_uid_t;
int size_fd_set;
int size_dirent;
int size_dirent64;
int size_statfs;
int size_statfs64;
int size_sockaddr;
int size_int;
int size_long;
int size_ulong;
int size_msghdr;
int size_itimerval;
int size_stat;
int size_old_utsname;
int size_sysinfo;
int size_msqid_ds;
int size_shmid_ds;
int size_new_utsname;
int size_timex;
int size_mem_dqinfo;
int size_if_dqblk;
int size_fs_quota_stat;
int size_timespec;
int size_pollfd;
int size_NFS_FHSIZE;
int size_knfsd_fh;
int size_TASK_COMM_LEN;
int size_sigaction;
int size_sigset_t;
int size_siginfo_t;
int size_cap_user_data_t;
int size_stack_t;
int size_off_t;
int size_stat64;
int size_gid_t;
int size_uid_t;
int size_PAGE_SIZE;
int size_flock64;
int size_user_desc;
int size_io_event;
int size_iocb;
int size_epoll_event;
int size_itimerspec;
int size_mq_attr;
int size_siginfo;
int size_termios;
int size_termios2;
int size_pid_t;
int size_winsize;
int size_char;
int size_serial_struct;
int size_serial_icounter_struct;
int size_hayes_esp_config;
/* The values of the second argument of system call "sys_ioctl". */
int ioctl_TCGETS;
int ioctl_TCSETS;
int ioctl_TCSETSW;
int ioctl_TCSETSF;
int ioctl_TCGETA;
int ioctl_TCSETA;
int ioctl_TCSETAW;
int ioctl_TCSETAF;
int ioctl_TCSBRK;
int ioctl_TCXONC;
int ioctl_TCFLSH;
int ioctl_TIOCEXCL;
int ioctl_TIOCNXCL;
int ioctl_TIOCSCTTY;
int ioctl_TIOCGPGRP;
int ioctl_TIOCSPGRP;
int ioctl_TIOCOUTQ;
int ioctl_TIOCSTI;
int ioctl_TIOCGWINSZ;
int ioctl_TIOCSWINSZ;
int ioctl_TIOCMGET;
int ioctl_TIOCMBIS;
int ioctl_TIOCMBIC;
int ioctl_TIOCMSET;
int ioctl_TIOCGSOFTCAR;
int ioctl_TIOCSSOFTCAR;
int ioctl_FIONREAD;
int ioctl_TIOCINQ;
int ioctl_TIOCLINUX;
int ioctl_TIOCCONS;
int ioctl_TIOCGSERIAL;
int ioctl_TIOCSSERIAL;
int ioctl_TIOCPKT;
int ioctl_FIONBIO;
int ioctl_TIOCNOTTY;
int ioctl_TIOCSETD;
int ioctl_TIOCGETD;
int ioctl_TCSBRKP;
int ioctl_TIOCTTYGSTRUCT;
int ioctl_TIOCSBRK;
int ioctl_TIOCCBRK;
int ioctl_TIOCGSID;
int ioctl_TCGETS2;
int ioctl_TCSETS2;
int ioctl_TCSETSW2;
int ioctl_TCSETSF2;
int ioctl_TIOCGPTN;
int ioctl_TIOCSPTLCK;
int ioctl_FIONCLEX;
int ioctl_FIOCLEX;
int ioctl_FIOASYNC;
int ioctl_TIOCSERCONFIG;
int ioctl_TIOCSERGWILD;
int ioctl_TIOCSERSWILD;
int ioctl_TIOCGLCKTRMIOS;
int ioctl_TIOCSLCKTRMIOS;
int ioctl_TIOCSERGSTRUCT;
int ioctl_TIOCSERGETLSR;
int ioctl_TIOCSERGETMULTI;
int ioctl_TIOCSERSETMULTI;
int ioctl_TIOCMIWAIT;
int ioctl_TIOCGICOUNT;
int ioctl_TIOCGHAYESESP;
int ioctl_TIOCSHAYESESP;
int ioctl_FIOQSIZE;
/* The number of the registers that are used as the arguments of
a system call. */
int arg1;
int arg2;
int arg3;
int arg4;
int arg5;
};
extern int record_linux_system_call (int num, struct regcache *regcache,
struct linux_record_tdep *tdep);
#endif /* _LINUX_RECORD_H_ */