1 /* Process record and replay target code for GNU/Linux.
3 Copyright (C) 2008, 2009 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
24 #include "linux-record.h"
26 /* These macros are the values of the first argument of system call
27 "sys_ptrace". The values of these macros were obtained from Linux
30 #define RECORD_PTRACE_PEEKTEXT 1
31 #define RECORD_PTRACE_PEEKDATA 2
32 #define RECORD_PTRACE_PEEKUSR 3
34 /* These macros are the values of the first argument of system call
35 "sys_socketcall". The values of these macros were obtained from
36 Linux Kernel source. */
38 #define RECORD_SYS_SOCKET 1
39 #define RECORD_SYS_BIND 2
40 #define RECORD_SYS_CONNECT 3
41 #define RECORD_SYS_LISTEN 4
42 #define RECORD_SYS_ACCEPT 5
43 #define RECORD_SYS_GETSOCKNAME 6
44 #define RECORD_SYS_GETPEERNAME 7
45 #define RECORD_SYS_SOCKETPAIR 8
46 #define RECORD_SYS_SEND 9
47 #define RECORD_SYS_RECV 10
48 #define RECORD_SYS_SENDTO 11
49 #define RECORD_SYS_RECVFROM 12
50 #define RECORD_SYS_SHUTDOWN 13
51 #define RECORD_SYS_SETSOCKOPT 14
52 #define RECORD_SYS_GETSOCKOPT 15
53 #define RECORD_SYS_SENDMSG 16
54 #define RECORD_SYS_RECVMSG 17
56 /* These macros are the values of the first argument of system call
57 "sys_ipc". The values of these macros were obtained from Linux
60 #define RECORD_SEMOP 1
61 #define RECORD_SEMGET 2
62 #define RECORD_SEMCTL 3
63 #define RECORD_SEMTIMEDOP 4
64 #define RECORD_MSGSND 11
65 #define RECORD_MSGRCV 12
66 #define RECORD_MSGGET 13
67 #define RECORD_MSGCTL 14
68 #define RECORD_SHMAT 21
69 #define RECORD_SHMDT 22
70 #define RECORD_SHMGET 23
71 #define RECORD_SHMCTL 24
73 /* These macros are the values of the first argument of system call
74 "sys_quotactl". The values of these macros were obtained from Linux
77 #define RECORD_Q_GETFMT 0x800004
78 #define RECORD_Q_GETINFO 0x800005
79 #define RECORD_Q_GETQUOTA 0x800007
80 #define RECORD_Q_XGETQSTAT (('5' << 8) + 5)
81 #define RECORD_Q_XGETQUOTA (('3' << 8) + 3)
83 /* When the architecture process record get a Linux syscall
84 instruction, it will get a Linux syscall number of this
85 architecture and convert it to the Linux syscall number "num" which
86 is internal to GDB. Most Linux syscalls across architectures in
87 Linux would be similar and mostly differ by sizes of types and
88 structures. This sizes are put to "tdep".
90 Record the values of the registers and memory that will be changed
91 in current system call.
93 Return -1 if something wrong. */
96 record_linux_system_call (int num, struct regcache *regcache,
97 struct linux_record_tdep *tdep)
103 /* sys_restart_syscall */
111 target_terminal_ours ();
113 yquery (_ ("The next instruction is syscall exit. "
114 "It will make the program exit. "
115 "Do you want to stop the program?"));
116 target_terminal_inferior ();
129 uint32_t addr, count;
130 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & addr);
131 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & count);
132 if (record_arch_list_add_mem (addr, count))
173 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
174 if (record_arch_list_add_mem (tmpu32, tdep->size__old_kernel_stat))
196 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
197 if (tmpu32 == RECORD_PTRACE_PEEKTEXT
198 || tmpu32 == RECORD_PTRACE_PEEKDATA
199 || tmpu32 == RECORD_PTRACE_PEEKUSR)
201 regcache_raw_read (regcache, tdep->arg4,
202 (gdb_byte *) & tmpu32);
203 if (record_arch_list_add_mem (tmpu32, 4))
242 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
243 if (record_arch_list_add_mem (tmpu32, tdep->size_tms))
271 /* XXX Need to add a lot of support of other ioctl requests. */
272 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
273 if (tmpu32 == tdep->ioctl_FIOCLEX || tmpu32 == tdep->ioctl_FIONCLEX
274 || tmpu32 == tdep->ioctl_FIONBIO || tmpu32 == tdep->ioctl_FIOASYNC
275 || tmpu32 == tdep->ioctl_TCSETS || tmpu32 == tdep->ioctl_TCSETSW
276 || tmpu32 == tdep->ioctl_TCSETSF || tmpu32 == tdep->ioctl_TCSETA
277 || tmpu32 == tdep->ioctl_TCSETAW || tmpu32 == tdep->ioctl_TCSETAF
278 || tmpu32 == tdep->ioctl_TCSBRK || tmpu32 == tdep->ioctl_TCXONC
279 || tmpu32 == tdep->ioctl_TCFLSH || tmpu32 == tdep->ioctl_TIOCEXCL
280 || tmpu32 == tdep->ioctl_TIOCNXCL
281 || tmpu32 == tdep->ioctl_TIOCSCTTY
282 || tmpu32 == tdep->ioctl_TIOCSPGRP || tmpu32 == tdep->ioctl_TIOCSTI
283 || tmpu32 == tdep->ioctl_TIOCSWINSZ
284 || tmpu32 == tdep->ioctl_TIOCMBIS || tmpu32 == tdep->ioctl_TIOCMBIC
285 || tmpu32 == tdep->ioctl_TIOCMSET
286 || tmpu32 == tdep->ioctl_TIOCSSOFTCAR
287 || tmpu32 == tdep->ioctl_TIOCCONS
288 || tmpu32 == tdep->ioctl_TIOCSSERIAL
289 || tmpu32 == tdep->ioctl_TIOCPKT || tmpu32 == tdep->ioctl_TIOCNOTTY
290 || tmpu32 == tdep->ioctl_TIOCSETD || tmpu32 == tdep->ioctl_TCSBRKP
291 || tmpu32 == tdep->ioctl_TIOCTTYGSTRUCT
292 || tmpu32 == tdep->ioctl_TIOCSBRK || tmpu32 == tdep->ioctl_TIOCCBRK
293 || tmpu32 == tdep->ioctl_TCSETS2 || tmpu32 == tdep->ioctl_TCSETSW2
294 || tmpu32 == tdep->ioctl_TCSETSF2
295 || tmpu32 == tdep->ioctl_TIOCSPTLCK
296 || tmpu32 == tdep->ioctl_TIOCSERCONFIG
297 || tmpu32 == tdep->ioctl_TIOCSERGWILD
298 || tmpu32 == tdep->ioctl_TIOCSERSWILD
299 || tmpu32 == tdep->ioctl_TIOCSLCKTRMIOS
300 || tmpu32 == tdep->ioctl_TIOCSERGETMULTI
301 || tmpu32 == tdep->ioctl_TIOCSERSETMULTI
302 || tmpu32 == tdep->ioctl_TIOCMIWAIT
303 || tmpu32 == tdep->ioctl_TIOCSHAYESESP)
307 else if (tmpu32 == tdep->ioctl_TCGETS || tmpu32 == tdep->ioctl_TCGETA
308 || tmpu32 == tdep->ioctl_TIOCGLCKTRMIOS)
310 regcache_raw_read (regcache, tdep->arg3,
311 (gdb_byte *) & tmpu32);
312 if (record_arch_list_add_mem (tmpu32, tdep->size_termios))
315 else if (tmpu32 == tdep->ioctl_TIOCGPGRP
316 || tmpu32 == tdep->ioctl_TIOCGSID)
318 regcache_raw_read (regcache, tdep->arg3,
319 (gdb_byte *) & tmpu32);
320 if (record_arch_list_add_mem (tmpu32, tdep->size_pid_t))
323 else if (tmpu32 == tdep->ioctl_TIOCOUTQ
324 || tmpu32 == tdep->ioctl_TIOCMGET
325 || tmpu32 == tdep->ioctl_TIOCGSOFTCAR
326 || tmpu32 == tdep->ioctl_FIONREAD
327 || tmpu32 == tdep->ioctl_TIOCINQ
328 || tmpu32 == tdep->ioctl_TIOCGETD
329 || tmpu32 == tdep->ioctl_TIOCGPTN
330 || tmpu32 == tdep->ioctl_TIOCSERGETLSR)
332 regcache_raw_read (regcache, tdep->arg3,
333 (gdb_byte *) & tmpu32);
334 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
337 else if (tmpu32 == tdep->ioctl_TIOCGWINSZ)
339 regcache_raw_read (regcache, tdep->arg3,
340 (gdb_byte *) & tmpu32);
341 if (record_arch_list_add_mem (tmpu32, tdep->size_winsize))
344 else if (tmpu32 == tdep->ioctl_TIOCLINUX)
346 regcache_raw_read (regcache, tdep->arg3,
347 (gdb_byte *) & tmpu32);
348 if (record_arch_list_add_mem (tmpu32, tdep->size_char))
351 else if (tmpu32 == tdep->ioctl_TIOCGSERIAL)
353 regcache_raw_read (regcache, tdep->arg3,
354 (gdb_byte *) & tmpu32);
355 if (record_arch_list_add_mem (tmpu32, tdep->size_serial_struct))
358 else if (tmpu32 == tdep->ioctl_TCGETS2)
360 regcache_raw_read (regcache, tdep->arg3,
361 (gdb_byte *) & tmpu32);
362 if (record_arch_list_add_mem (tmpu32, tdep->size_termios2))
365 else if (tmpu32 == tdep->ioctl_FIOQSIZE)
367 regcache_raw_read (regcache, tdep->arg3,
368 (gdb_byte *) & tmpu32);
369 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
372 else if (tmpu32 == tdep->ioctl_TIOCGICOUNT)
374 regcache_raw_read (regcache, tdep->arg3,
375 (gdb_byte *) & tmpu32);
376 if (record_arch_list_add_mem
377 (tmpu32, tdep->size_serial_icounter_struct))
380 else if (tmpu32 == tdep->ioctl_TIOCGHAYESESP)
382 regcache_raw_read (regcache, tdep->arg3,
383 (gdb_byte *) & tmpu32);
384 if (record_arch_list_add_mem (tmpu32, tdep->size_hayes_esp_config))
387 else if (tmpu32 == tdep->ioctl_TIOCSERGSTRUCT)
389 printf_unfiltered (_("Process record and replay target doesn't "
390 "support ioctl request TIOCSERGSTRUCT\n"));
395 printf_unfiltered (_("Process record and replay target doesn't "
396 "support ioctl request 0x%s.\n"),
397 phex_nz (tmpu32, 4));
405 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
407 if (tmpu32 == tdep->fcntl_F_GETLK)
409 regcache_raw_read (regcache, tdep->arg3,
410 (gdb_byte *) & tmpu32);
411 if (record_arch_list_add_mem (tmpu32, tdep->size_flock))
426 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
427 if (record_arch_list_add_mem (tmpu32, tdep->size_oldold_utsname))
439 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
440 if (record_arch_list_add_mem (tmpu32, tdep->size_ustat))
456 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
457 if (record_arch_list_add_mem (tmpu32, tdep->size_old_sigaction))
475 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
476 if (record_arch_list_add_mem (tmpu32, tdep->size_old_sigset_t))
480 /* sys_sethostname */
486 /* sys_old_getrlimit */
488 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
489 if (record_arch_list_add_mem (tmpu32, tdep->size_rlimit))
495 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
496 if (record_arch_list_add_mem (tmpu32, tdep->size_rusage))
500 /* sys_gettimeofday */
502 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
503 if (record_arch_list_add_mem (tmpu32, tdep->size_timeval))
505 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
506 if (record_arch_list_add_mem (tmpu32, tdep->size_timezone))
510 /* sys_settimeofday */
514 /* sys_getgroups16 */
516 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
517 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
521 /* sys_setgroups16 */
523 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
524 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
531 struct sel_arg_struct
540 regcache_raw_read (regcache, tdep->arg1,
541 (gdb_byte *) & tmpu32);
544 if (target_read_memory (tmpu32, (gdb_byte *) & sel, sizeof (sel)))
547 fprintf_unfiltered (gdb_stdlog,
548 "Process record: error reading memory "
549 "at addr = 0x%s len = %lu.\n",
551 (unsigned long)sizeof (sel));
554 if (record_arch_list_add_mem (sel.inp, tdep->size_fd_set))
556 if (record_arch_list_add_mem (sel.outp, tdep->size_fd_set))
558 if (record_arch_list_add_mem (sel.exp, tdep->size_fd_set))
560 if (record_arch_list_add_mem (sel.tvp, tdep->size_timeval))
574 regcache_raw_read (regcache, tdep->arg2,
575 (gdb_byte *) & tmpu32);
576 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & len);
577 if (record_arch_list_add_mem (tmpu32, len))
592 target_terminal_ours ();
594 yquery (_("The next instruction is syscall reboot. "
595 "It will restart the computer. "
596 "Do you want to stop the program?"));
597 target_terminal_inferior ();
605 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
606 if (record_arch_list_add_mem (tmpu32, tdep->size_dirent))
620 regcache_raw_read (regcache, tdep->arg1,
621 (gdb_byte *) & tmpu32);
622 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & len);
623 target_terminal_ours ();
625 yquery (_("The next instruction is syscall munmap. "
626 "It will free the memory addr = 0x%s len = %u. "
627 "It will make record target get error. "
628 "Do you want to stop the program?"),
629 paddr_nz (tmpu32), (int)len);
630 target_terminal_inferior ();
644 /* sys_getpriority */
646 /* sys_setpriority */
656 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
657 if (record_arch_list_add_mem (tmpu32, tdep->size_statfs))
667 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
670 case RECORD_SYS_SOCKET:
671 case RECORD_SYS_BIND:
672 case RECORD_SYS_CONNECT:
673 case RECORD_SYS_LISTEN:
675 case RECORD_SYS_ACCEPT:
676 case RECORD_SYS_GETSOCKNAME:
677 case RECORD_SYS_GETPEERNAME:
680 regcache_raw_read (regcache, tdep->arg2,
681 (gdb_byte *) & tmpu32);
684 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
687 fprintf_unfiltered (gdb_stdlog,
688 "Process record: error reading "
689 "memory at addr = 0x%s len = %lu.\n",
691 (unsigned long)sizeof (a));
694 if (record_arch_list_add_mem (a[1], tdep->size_sockaddr))
696 if (record_arch_list_add_mem (a[2], tdep->size_int))
702 case RECORD_SYS_SOCKETPAIR:
705 regcache_raw_read (regcache, tdep->arg2,
706 (gdb_byte *) & tmpu32);
709 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
712 fprintf_unfiltered (gdb_stdlog,
713 "Process record: error reading "
714 "memory at addr = 0x%s len = %lu.\n",
716 (unsigned long)sizeof (a));
719 if (record_arch_list_add_mem (a[3], tdep->size_int))
724 case RECORD_SYS_SEND:
725 case RECORD_SYS_SENDTO:
727 case RECORD_SYS_RECV:
730 regcache_raw_read (regcache, tdep->arg2,
731 (gdb_byte *) & tmpu32);
734 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
737 fprintf_unfiltered (gdb_stdlog,
738 "Process record: error reading "
739 "memory at addr = 0x%s len = %lu.\n",
741 (unsigned long)sizeof (a));
746 if (target_read_memory
747 (a[2], (gdb_byte *) & (a[2]), sizeof (a[2])))
750 fprintf_unfiltered (gdb_stdlog,
751 "Process record: error reading "
752 "memory at addr = 0x%s "
755 (unsigned long)sizeof (a[2]));
758 if (record_arch_list_add_mem (a[1], a[2]))
764 case RECORD_SYS_RECVFROM:
767 regcache_raw_read (regcache, tdep->arg2,
768 (gdb_byte *) & tmpu32);
771 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
774 fprintf_unfiltered (gdb_stdlog,
775 "Process record: error reading "
776 "memory at addr = 0x%s len = %lu.\n",
778 (unsigned long)sizeof (a));
783 if (target_read_memory
784 (a[2], (gdb_byte *) & (a[2]), sizeof (a[2])))
787 fprintf_unfiltered (gdb_stdlog,
788 "Process record: error reading "
789 "memory at addr = 0x%s "
792 (unsigned long)sizeof (a[2]));
795 if (record_arch_list_add_mem (a[1], a[2]))
797 if (record_arch_list_add_mem (a[4], tdep->size_sockaddr))
799 if (record_arch_list_add_mem (a[5], tdep->size_int))
805 case RECORD_SYS_SHUTDOWN:
806 case RECORD_SYS_SETSOCKOPT:
808 case RECORD_SYS_GETSOCKOPT:
813 regcache_raw_read (regcache, tdep->arg2,
814 (gdb_byte *) & tmpu32);
817 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
820 fprintf_unfiltered (gdb_stdlog,
821 "Process record: error reading "
822 "memory at addr = 0x%s len = %lu.\n",
824 (unsigned long)sizeof (a));
829 if (target_read_memory
830 (a[4], (gdb_byte *) & av, sizeof (av)))
833 fprintf_unfiltered (gdb_stdlog,
834 "Process record: error reading "
835 "memory at addr = 0x%s "
838 (unsigned long)sizeof (av));
841 if (record_arch_list_add_mem (a[3], av))
843 if (record_arch_list_add_mem (a[4], tdep->size_int))
849 case RECORD_SYS_SENDMSG:
851 case RECORD_SYS_RECVMSG:
857 uint32_t msg_namelen;
860 uint32_t msg_control;
861 uint32_t msg_controllen;
870 regcache_raw_read (regcache, tdep->arg2,
871 (gdb_byte *) & tmpu32);
874 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
877 fprintf_unfiltered (gdb_stdlog,
878 "Process record: error reading "
879 "memory at addr = 0x%s len = %lu.\n",
881 (unsigned long)sizeof (a));
884 if (record_arch_list_add_mem (a[1], tdep->size_msghdr))
888 if (target_read_memory
889 (a[1], (gdb_byte *) & rec, sizeof (rec)))
892 fprintf_unfiltered (gdb_stdlog,
893 "Process record: error reading "
894 "memory at addr = 0x%s "
897 (unsigned long)sizeof (rec));
900 if (record_arch_list_add_mem
901 (rec.msg_name, rec.msg_namelen))
903 if (record_arch_list_add_mem
904 (rec.msg_control, rec.msg_controllen))
908 for (i = 0; i < rec.msg_iovlen; i++)
910 if (target_read_memory
911 (rec.msg_iov, (gdb_byte *) & iov,
915 fprintf_unfiltered (gdb_stdlog,
916 "Process record: error "
922 (unsigned long)sizeof (iov));
925 if (record_arch_list_add_mem
926 (iov.iov_base, iov.iov_len))
928 rec.msg_iov += sizeof (struct record_iovec);
936 printf_unfiltered (_("Process record and replay target "
937 "doesn't support socketcall call 0x%s\n"),
938 phex_nz (tmpu32, 4));
950 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
951 if (record_arch_list_add_mem (tmpu32, tdep->size_itimerval))
957 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
958 if (record_arch_list_add_mem (tmpu32, tdep->size_itimerval))
968 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
969 if (record_arch_list_add_mem (tmpu32, tdep->size_stat))
975 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
976 if (record_arch_list_add_mem (tmpu32, tdep->size_old_utsname))
992 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
993 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
995 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
996 if (record_arch_list_add_mem (tmpu32, tdep->size_rusage))
1006 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1007 if (record_arch_list_add_mem (tmpu32, tdep->size_sysinfo))
1013 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1020 regcache_raw_read (regcache, tdep->arg3,
1021 (gdb_byte *) & second);
1022 regcache_raw_read (regcache, tdep->arg5,
1023 (gdb_byte *) & ptr);
1024 if (record_arch_list_add_mem (ptr, second + tdep->size_long))
1029 regcache_raw_read (regcache, tdep->arg5,
1030 (gdb_byte *) & tmpu32);
1031 if (record_arch_list_add_mem (tmpu32, tdep->size_msqid_ds))
1035 regcache_raw_read (regcache, tdep->arg4,
1036 (gdb_byte *) & tmpu32);
1037 if (record_arch_list_add_mem (tmpu32, tdep->size_ulong))
1041 regcache_raw_read (regcache, tdep->arg5,
1042 (gdb_byte *) & tmpu32);
1043 if (record_arch_list_add_mem (tmpu32, tdep->size_shmid_ds))
1055 /* sys_setdomainname */
1061 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1062 if (record_arch_list_add_mem (tmpu32, tdep->size_new_utsname))
1066 /* sys_modify_ldt */
1068 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1069 if (tmpu32 == 0 || tmpu32 == 2)
1071 uint32_t ptr, bytecount;
1072 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & ptr);
1073 regcache_raw_read (regcache, tdep->arg3,
1074 (gdb_byte *) & bytecount);
1075 if (record_arch_list_add_mem (ptr, bytecount))
1082 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1083 if (record_arch_list_add_mem (tmpu32, tdep->size_timex))
1091 /* sys_sigprocmask */
1093 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1094 if (record_arch_list_add_mem (tmpu32, tdep->size_old_sigset_t))
1098 /* sys_ni_syscall */
1100 /* sys_init_module */
1102 /* sys_delete_module */
1104 /* sys_ni_syscall */
1110 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1113 case RECORD_Q_GETFMT:
1114 regcache_raw_read (regcache, tdep->arg4,
1115 (gdb_byte *) & tmpu32);
1116 if (record_arch_list_add_mem (tmpu32, 4))
1119 case RECORD_Q_GETINFO:
1120 regcache_raw_read (regcache, tdep->arg4,
1121 (gdb_byte *) & tmpu32);
1122 if (record_arch_list_add_mem (tmpu32, tdep->size_mem_dqinfo))
1125 case RECORD_Q_GETQUOTA:
1126 regcache_raw_read (regcache, tdep->arg4,
1127 (gdb_byte *) & tmpu32);
1128 if (record_arch_list_add_mem (tmpu32, tdep->size_if_dqblk))
1131 case RECORD_Q_XGETQSTAT:
1132 case RECORD_Q_XGETQUOTA:
1133 regcache_raw_read (regcache, tdep->arg4,
1134 (gdb_byte *) & tmpu32);
1135 if (record_arch_list_add_mem (tmpu32, tdep->size_fs_quota_stat))
1151 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1154 regcache_raw_read (regcache, tdep->arg3,
1155 (gdb_byte *) & tmpu32);
1156 /*XXX the size of memory is not very clear. */
1157 if (record_arch_list_add_mem (tmpu32, 10))
1162 /* sys_personality */
1164 /* sys_ni_syscall */
1166 /* sys_setfsuid16 */
1168 /* sys_setfsgid16 */
1174 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1175 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
1183 regcache_raw_read (regcache, tdep->arg2,
1184 (gdb_byte *) & tmpu32);
1185 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & count);
1186 if (record_arch_list_add_mem (tmpu32, tdep->size_dirent * count))
1193 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1194 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
1196 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1197 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
1199 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1200 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
1202 regcache_raw_read (regcache, tdep->arg5, (gdb_byte *) & tmpu32);
1203 if (record_arch_list_add_mem (tmpu32, tdep->size_timeval))
1223 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & vec);
1226 regcache_raw_read (regcache, tdep->arg3,
1227 (gdb_byte *) & vlen);
1228 for (tmpu32 = 0; tmpu32 < vlen; tmpu32++)
1230 if (target_read_memory
1231 (vec, (gdb_byte *) & iov, sizeof (struct record_iovec)))
1234 fprintf_unfiltered (gdb_stdlog,
1235 "Process record: error reading "
1236 "memory at addr = 0x%s len = %lu.\n",
1238 (unsigned long)sizeof (struct record_iovec));
1241 if (record_arch_list_add_mem (iov.iov_base, iov.iov_len))
1243 vec += sizeof (struct record_iovec);
1263 /* sys_munlockall */
1265 /* sys_sched_setparam */
1269 /* sys_sched_getparam */
1271 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1272 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1276 /* sys_sched_setscheduler */
1278 /* sys_sched_getscheduler */
1280 /* sys_sched_yield */
1282 /* sys_sched_get_priority_max */
1284 /* sys_sched_get_priority_min */
1288 /* sys_sched_rr_get_interval */
1292 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1293 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
1299 /* sys_setresuid16 */
1303 /* sys_getresuid16 */
1305 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1306 if (record_arch_list_add_mem (tmpu32, tdep->size_old_uid_t))
1308 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1309 if (record_arch_list_add_mem (tmpu32, tdep->size_old_uid_t))
1311 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1312 if (record_arch_list_add_mem (tmpu32, tdep->size_old_uid_t))
1318 /* sys_ni_syscall */
1324 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1328 regcache_raw_read (regcache, tdep->arg2,
1329 (gdb_byte *) & nfds);
1330 if (record_arch_list_add_mem (tmpu32, tdep->size_pollfd * nfds))
1335 /* sys_nfsservctl */
1337 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1338 if (tmpu32 == 7 || tmpu32 == 8)
1342 rsize = tdep->size_NFS_FHSIZE;
1344 rsize = tdep->size_knfsd_fh;
1345 regcache_raw_read (regcache, tdep->arg3,
1346 (gdb_byte *) & tmpu32);
1347 if (record_arch_list_add_mem (tmpu32, rsize))
1352 /* sys_setresgid16 */
1356 /* sys_getresgid16 */
1358 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1359 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
1361 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1362 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
1364 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1365 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
1371 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1375 regcache_raw_read (regcache, tdep->arg2,
1376 (gdb_byte *) & tmpu32);
1377 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1381 regcache_raw_read (regcache, tdep->arg2,
1382 (gdb_byte *) & tmpu32);
1383 if (record_arch_list_add_mem (tmpu32, tdep->size_TASK_COMM_LEN))
1389 /* sys_rt_sigreturn */
1393 /* sys_rt_sigaction */
1395 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1396 if (record_arch_list_add_mem (tmpu32, tdep->size_sigaction))
1400 /* sys_rt_sigprocmask */
1402 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1403 if (record_arch_list_add_mem (tmpu32, tdep->size_sigset_t))
1407 /* sys_rt_sigpending */
1409 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1412 uint32_t sigsetsize;
1413 regcache_raw_read (regcache, tdep->arg2,
1414 (gdb_byte *) & sigsetsize);
1415 if (record_arch_list_add_mem (tmpu32, sigsetsize))
1420 /* sys_rt_sigtimedwait */
1422 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1423 if (record_arch_list_add_mem (tmpu32, tdep->size_siginfo_t))
1427 /* sys_rt_sigqueueinfo */
1429 /* sys_rt_sigsuspend */
1435 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1439 regcache_raw_read (regcache, tdep->arg3,
1440 (gdb_byte *) & count);
1441 if (record_arch_list_add_mem (tmpu32, count))
1454 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1458 regcache_raw_read (regcache, tdep->arg2,
1459 (gdb_byte *) & size);
1460 if (record_arch_list_add_mem (tmpu32, size))
1467 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1468 if (record_arch_list_add_mem (tmpu32, tdep->size_cap_user_data_t))
1476 /* sys_sigaltstack */
1478 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1479 if (record_arch_list_add_mem (tmpu32, tdep->size_stack_t))
1485 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1486 if (record_arch_list_add_mem (tmpu32, tdep->size_off_t))
1490 /* sys_ni_syscall */
1492 /* sys_ni_syscall */
1500 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1501 if (record_arch_list_add_mem (tmpu32, tdep->size_rlimit))
1509 /* sys_truncate64 */
1511 /* sys_ftruncate64 */
1521 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1522 if (record_arch_list_add_mem (tmpu32, tdep->size_stat64))
1544 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1548 regcache_raw_read (regcache, tdep->arg1,
1549 (gdb_byte *) & gidsetsize);
1550 if (record_arch_list_add_mem
1551 (tmpu32, tdep->size_gid_t * gidsetsize))
1566 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1567 if (record_arch_list_add_mem (tmpu32, tdep->size_uid_t))
1569 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1570 if (record_arch_list_add_mem (tmpu32, tdep->size_uid_t))
1572 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1573 if (record_arch_list_add_mem (tmpu32, tdep->size_uid_t))
1583 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1584 if (record_arch_list_add_mem (tmpu32, tdep->size_gid_t))
1586 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1587 if (record_arch_list_add_mem (tmpu32, tdep->size_gid_t))
1589 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1590 if (record_arch_list_add_mem (tmpu32, tdep->size_gid_t))
1604 /* sys_pivot_root */
1610 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1611 if (record_arch_list_add_mem (tmpu32, tdep->size_PAGE_SIZE))
1619 /* sys_getdents64 */
1623 regcache_raw_read (regcache, tdep->arg2,
1624 (gdb_byte *) & tmpu32);
1625 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & count);
1626 if (record_arch_list_add_mem (tmpu32, tdep->size_dirent64 * count))
1633 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1634 if (tmpu32 == tdep->fcntl_F_GETLK64)
1636 regcache_raw_read (regcache, tdep->arg3,
1637 (gdb_byte *) & tmpu32);
1638 if (record_arch_list_add_mem (tmpu32, tdep->size_flock64))
1641 else if (tmpu32 != tdep->fcntl_F_SETLK64
1642 && tmpu32 != tdep->fcntl_F_SETLKW64)
1648 /* sys_ni_syscall */
1650 /* sys_ni_syscall */
1670 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1674 regcache_raw_read (regcache, tdep->arg4,
1675 (gdb_byte *) & size);
1676 if (record_arch_list_add_mem (tmpu32, size))
1683 /* sys_llistxattr */
1685 /* sys_flistxattr */
1687 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1691 regcache_raw_read (regcache, tdep->arg3,
1692 (gdb_byte *) & size);
1693 if (record_arch_list_add_mem (tmpu32, size))
1698 /* sys_removexattr */
1700 /* sys_lremovexattr */
1702 /* sys_fremovexattr */
1708 /* sys_sendfile64 */
1710 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1711 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
1717 /* sys_sched_setaffinity */
1721 /* sys_sched_getaffinity */
1723 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1727 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & len);
1728 if (record_arch_list_add_mem (tmpu32, len))
1733 /* sys_set_thread_area */
1735 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1736 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1740 /* sys_get_thread_area */
1742 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1743 if (record_arch_list_add_mem (tmpu32, tdep->size_user_desc))
1749 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1750 if (record_arch_list_add_mem (tmpu32, tdep->size_long))
1754 /* sys_io_destroy */
1758 /* sys_io_getevents */
1760 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1764 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & nr);
1765 if (record_arch_list_add_mem (tmpu32, nr * tdep->size_io_event))
1772 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1777 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & nr);
1778 iocbp = (uint32_t *) alloca (nr * tdep->size_int);
1779 if (target_read_memory
1780 (tmpu32, (gdb_byte *) iocbp, nr * tdep->size_int))
1783 fprintf_unfiltered (gdb_stdlog,
1784 "Process record: error reading memory "
1785 "at addr = 0x%s len = %u.\n",
1787 (int)(nr * tdep->size_int));
1790 for (i = 0; i < nr; i++)
1792 if (record_arch_list_add_mem (iocbp[i], tdep->size_iocb))
1800 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1801 if (record_arch_list_add_mem (tmpu32, tdep->size_io_event))
1807 /* sys_ni_syscall */
1811 /* sys_exit_group */
1815 target_terminal_ours ();
1817 yquery (_("The next instruction is syscall exit_group. "
1818 "It will make the program exit. "
1819 "Do you want to stop the program?"));
1820 target_terminal_inferior ();
1826 /* sys_lookup_dcookie */
1828 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1832 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & len);
1833 if (record_arch_list_add_mem (tmpu32, len))
1838 /* sys_epoll_create */
1844 /* sys_epoll_wait */
1846 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1850 regcache_raw_read (regcache, tdep->arg3,
1851 (gdb_byte *) & maxevents);
1852 if (record_arch_list_add_mem
1853 (tmpu32, maxevents * tdep->size_epoll_event))
1858 /* sys_remap_file_pages */
1860 /* sys_set_tid_address */
1864 /* sys_timer_create */
1866 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1867 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1871 /* sys_timer_settime */
1873 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1874 if (record_arch_list_add_mem (tmpu32, tdep->size_itimerspec))
1878 /* sys_timer_gettime */
1880 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1881 if (record_arch_list_add_mem (tmpu32, tdep->size_itimerspec))
1885 /* sys_timer_getoverrun */
1887 /* sys_timer_delete */
1889 /* sys_clock_settime */
1893 /* sys_clock_gettime */
1895 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1896 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
1900 /* sys_clock_getres */
1902 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1903 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
1907 /* sys_clock_nanosleep */
1909 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1910 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
1918 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1919 if (record_arch_list_add_mem (tmpu32, tdep->size_statfs64))
1927 /* sys_fadvise64_64 */
1929 /* sys_ni_syscall */
1935 /* sys_get_mempolicy */
1937 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1938 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1940 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1944 regcache_raw_read (regcache, tdep->arg3,
1945 (gdb_byte *) & maxnode);
1946 if (record_arch_list_add_mem (tmpu32, maxnode * tdep->size_long))
1951 /* sys_set_mempolicy */
1957 /* sys_mq_timedsend */
1961 /* sys_mq_timedreceive */
1963 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1967 regcache_raw_read (regcache, tdep->arg3,
1968 (gdb_byte *) & msg_len);
1969 if (record_arch_list_add_mem (tmpu32, msg_len))
1972 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1973 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1981 /* sys_mq_getsetattr */
1983 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1984 if (record_arch_list_add_mem (tmpu32, tdep->size_mq_attr))
1988 /* sys_kexec_load */
1994 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1995 if (record_arch_list_add_mem (tmpu32, tdep->size_siginfo))
1997 regcache_raw_read (regcache, tdep->arg5, (gdb_byte *) & tmpu32);
1998 if (record_arch_list_add_mem (tmpu32, tdep->size_rusage))
2002 /* sys_ni_syscall */
2006 /* sys_request_key */
2012 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
2013 if (tmpu32 == 6 || tmpu32 == 11)
2015 regcache_raw_read (regcache, tdep->arg3,
2016 (gdb_byte *) & tmpu32);
2020 regcache_raw_read (regcache, tdep->arg4,
2021 (gdb_byte *) & buflen);
2022 if (record_arch_list_add_mem (tmpu32, buflen))
2028 /* sys_ioprio_set */
2030 /* sys_ioprio_get */
2032 /* sys_inotify_init */
2034 /* sys_inotify_add_watch */
2036 /* sys_inotify_rm_watch */
2038 /* sys_migrate_pages */
2054 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2055 if (record_arch_list_add_mem (tmpu32, tdep->size_stat64))
2069 /* sys_readlinkat */
2071 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2075 regcache_raw_read (regcache, tdep->arg4,
2076 (gdb_byte *) & bufsiz);
2077 if (record_arch_list_add_mem (tmpu32, bufsiz))
2090 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2091 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
2093 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2094 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
2096 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
2097 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
2099 regcache_raw_read (regcache, tdep->arg5, (gdb_byte *) & tmpu32);
2100 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
2106 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
2110 regcache_raw_read (regcache, tdep->arg2,
2111 (gdb_byte *) & nfds);
2112 if (record_arch_list_add_mem (tmpu32, tdep->size_pollfd * nfds))
2115 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2116 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
2122 /* sys_set_robust_list */
2126 /* sys_get_robust_list */
2128 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2129 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
2131 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2132 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
2138 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2139 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
2141 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
2142 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
2146 /* sys_sync_file_range */
2154 /* sys_move_pages */
2156 regcache_raw_read (regcache, tdep->arg5, (gdb_byte *) & tmpu32);
2160 regcache_raw_read (regcache, tdep->arg2,
2161 (gdb_byte *) & nr_pages);
2162 if (record_arch_list_add_mem (tmpu32, nr_pages * tdep->size_int))
2169 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
2170 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
2172 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2173 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
2175 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2176 if (record_arch_list_add_mem (tmpu32, tdep->size_ulong * 2))
2180 /* sys_epoll_pwait */
2182 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2186 regcache_raw_read (regcache, tdep->arg3,
2187 (gdb_byte *) & maxevents);
2188 if (record_arch_list_add_mem
2189 (tmpu32, maxevents * tdep->size_epoll_event))
2195 printf_unfiltered (_("Process record and replay target doesn't "
2196 "support syscall number %u\n"),