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)
99 struct gdbarch *gdbarch = get_regcache_arch (regcache);
104 /* sys_restart_syscall */
112 target_terminal_ours ();
114 yquery (_ ("The next instruction is syscall exit. "
115 "It will make the program exit. "
116 "Do you want to stop the program?"));
117 target_terminal_inferior ();
130 uint32_t addr, count;
131 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & addr);
132 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & count);
133 if (record_arch_list_add_mem (addr, count))
174 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
175 if (record_arch_list_add_mem (tmpu32, tdep->size__old_kernel_stat))
197 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
198 if (tmpu32 == RECORD_PTRACE_PEEKTEXT
199 || tmpu32 == RECORD_PTRACE_PEEKDATA
200 || tmpu32 == RECORD_PTRACE_PEEKUSR)
202 regcache_raw_read (regcache, tdep->arg4,
203 (gdb_byte *) & tmpu32);
204 if (record_arch_list_add_mem (tmpu32, 4))
243 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
244 if (record_arch_list_add_mem (tmpu32, tdep->size_tms))
272 /* XXX Need to add a lot of support of other ioctl requests. */
273 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
274 if (tmpu32 == tdep->ioctl_FIOCLEX || tmpu32 == tdep->ioctl_FIONCLEX
275 || tmpu32 == tdep->ioctl_FIONBIO || tmpu32 == tdep->ioctl_FIOASYNC
276 || tmpu32 == tdep->ioctl_TCSETS || tmpu32 == tdep->ioctl_TCSETSW
277 || tmpu32 == tdep->ioctl_TCSETSF || tmpu32 == tdep->ioctl_TCSETA
278 || tmpu32 == tdep->ioctl_TCSETAW || tmpu32 == tdep->ioctl_TCSETAF
279 || tmpu32 == tdep->ioctl_TCSBRK || tmpu32 == tdep->ioctl_TCXONC
280 || tmpu32 == tdep->ioctl_TCFLSH || tmpu32 == tdep->ioctl_TIOCEXCL
281 || tmpu32 == tdep->ioctl_TIOCNXCL
282 || tmpu32 == tdep->ioctl_TIOCSCTTY
283 || tmpu32 == tdep->ioctl_TIOCSPGRP || tmpu32 == tdep->ioctl_TIOCSTI
284 || tmpu32 == tdep->ioctl_TIOCSWINSZ
285 || tmpu32 == tdep->ioctl_TIOCMBIS || tmpu32 == tdep->ioctl_TIOCMBIC
286 || tmpu32 == tdep->ioctl_TIOCMSET
287 || tmpu32 == tdep->ioctl_TIOCSSOFTCAR
288 || tmpu32 == tdep->ioctl_TIOCCONS
289 || tmpu32 == tdep->ioctl_TIOCSSERIAL
290 || tmpu32 == tdep->ioctl_TIOCPKT || tmpu32 == tdep->ioctl_TIOCNOTTY
291 || tmpu32 == tdep->ioctl_TIOCSETD || tmpu32 == tdep->ioctl_TCSBRKP
292 || tmpu32 == tdep->ioctl_TIOCTTYGSTRUCT
293 || tmpu32 == tdep->ioctl_TIOCSBRK || tmpu32 == tdep->ioctl_TIOCCBRK
294 || tmpu32 == tdep->ioctl_TCSETS2 || tmpu32 == tdep->ioctl_TCSETSW2
295 || tmpu32 == tdep->ioctl_TCSETSF2
296 || tmpu32 == tdep->ioctl_TIOCSPTLCK
297 || tmpu32 == tdep->ioctl_TIOCSERCONFIG
298 || tmpu32 == tdep->ioctl_TIOCSERGWILD
299 || tmpu32 == tdep->ioctl_TIOCSERSWILD
300 || tmpu32 == tdep->ioctl_TIOCSLCKTRMIOS
301 || tmpu32 == tdep->ioctl_TIOCSERGETMULTI
302 || tmpu32 == tdep->ioctl_TIOCSERSETMULTI
303 || tmpu32 == tdep->ioctl_TIOCMIWAIT
304 || tmpu32 == tdep->ioctl_TIOCSHAYESESP)
308 else if (tmpu32 == tdep->ioctl_TCGETS || tmpu32 == tdep->ioctl_TCGETA
309 || tmpu32 == tdep->ioctl_TIOCGLCKTRMIOS)
311 regcache_raw_read (regcache, tdep->arg3,
312 (gdb_byte *) & tmpu32);
313 if (record_arch_list_add_mem (tmpu32, tdep->size_termios))
316 else if (tmpu32 == tdep->ioctl_TIOCGPGRP
317 || tmpu32 == tdep->ioctl_TIOCGSID)
319 regcache_raw_read (regcache, tdep->arg3,
320 (gdb_byte *) & tmpu32);
321 if (record_arch_list_add_mem (tmpu32, tdep->size_pid_t))
324 else if (tmpu32 == tdep->ioctl_TIOCOUTQ
325 || tmpu32 == tdep->ioctl_TIOCMGET
326 || tmpu32 == tdep->ioctl_TIOCGSOFTCAR
327 || tmpu32 == tdep->ioctl_FIONREAD
328 || tmpu32 == tdep->ioctl_TIOCINQ
329 || tmpu32 == tdep->ioctl_TIOCGETD
330 || tmpu32 == tdep->ioctl_TIOCGPTN
331 || tmpu32 == tdep->ioctl_TIOCSERGETLSR)
333 regcache_raw_read (regcache, tdep->arg3,
334 (gdb_byte *) & tmpu32);
335 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
338 else if (tmpu32 == tdep->ioctl_TIOCGWINSZ)
340 regcache_raw_read (regcache, tdep->arg3,
341 (gdb_byte *) & tmpu32);
342 if (record_arch_list_add_mem (tmpu32, tdep->size_winsize))
345 else if (tmpu32 == tdep->ioctl_TIOCLINUX)
347 regcache_raw_read (regcache, tdep->arg3,
348 (gdb_byte *) & tmpu32);
349 /* This syscall affect a char size memory. */
350 if (record_arch_list_add_mem (tmpu32, 1))
353 else if (tmpu32 == tdep->ioctl_TIOCGSERIAL)
355 regcache_raw_read (regcache, tdep->arg3,
356 (gdb_byte *) & tmpu32);
357 if (record_arch_list_add_mem (tmpu32, tdep->size_serial_struct))
360 else if (tmpu32 == tdep->ioctl_TCGETS2)
362 regcache_raw_read (regcache, tdep->arg3,
363 (gdb_byte *) & tmpu32);
364 if (record_arch_list_add_mem (tmpu32, tdep->size_termios2))
367 else if (tmpu32 == tdep->ioctl_FIOQSIZE)
369 regcache_raw_read (regcache, tdep->arg3,
370 (gdb_byte *) & tmpu32);
371 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
374 else if (tmpu32 == tdep->ioctl_TIOCGICOUNT)
376 regcache_raw_read (regcache, tdep->arg3,
377 (gdb_byte *) & tmpu32);
378 if (record_arch_list_add_mem
379 (tmpu32, tdep->size_serial_icounter_struct))
382 else if (tmpu32 == tdep->ioctl_TIOCGHAYESESP)
384 regcache_raw_read (regcache, tdep->arg3,
385 (gdb_byte *) & tmpu32);
386 if (record_arch_list_add_mem (tmpu32, tdep->size_hayes_esp_config))
389 else if (tmpu32 == tdep->ioctl_TIOCSERGSTRUCT)
391 printf_unfiltered (_("Process record and replay target doesn't "
392 "support ioctl request TIOCSERGSTRUCT\n"));
397 printf_unfiltered (_("Process record and replay target doesn't "
398 "support ioctl request 0x%s.\n"),
399 phex_nz (tmpu32, 4));
407 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
409 if (tmpu32 == tdep->fcntl_F_GETLK)
411 regcache_raw_read (regcache, tdep->arg3,
412 (gdb_byte *) & tmpu32);
413 if (record_arch_list_add_mem (tmpu32, tdep->size_flock))
428 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
429 if (record_arch_list_add_mem (tmpu32, tdep->size_oldold_utsname))
441 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
442 if (record_arch_list_add_mem (tmpu32, tdep->size_ustat))
458 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
459 if (record_arch_list_add_mem (tmpu32, tdep->size_old_sigaction))
477 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
478 if (record_arch_list_add_mem (tmpu32, tdep->size_old_sigset_t))
482 /* sys_sethostname */
488 /* sys_old_getrlimit */
490 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
491 if (record_arch_list_add_mem (tmpu32, tdep->size_rlimit))
497 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
498 if (record_arch_list_add_mem (tmpu32, tdep->size_rusage))
502 /* sys_gettimeofday */
504 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
505 if (record_arch_list_add_mem (tmpu32, tdep->size_timeval))
507 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
508 if (record_arch_list_add_mem (tmpu32, tdep->size_timezone))
512 /* sys_settimeofday */
516 /* sys_getgroups16 */
518 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
519 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
523 /* sys_setgroups16 */
525 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
526 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
533 struct sel_arg_struct
542 regcache_raw_read (regcache, tdep->arg1,
543 (gdb_byte *) & tmpu32);
546 if (target_read_memory (tmpu32, (gdb_byte *) & sel, sizeof (sel)))
549 fprintf_unfiltered (gdb_stdlog,
550 "Process record: error reading memory "
551 "at addr = %s len = %lu.\n",
552 paddress (gdbarch, tmpu32),
553 (unsigned long)sizeof (sel));
556 if (record_arch_list_add_mem (sel.inp, tdep->size_fd_set))
558 if (record_arch_list_add_mem (sel.outp, tdep->size_fd_set))
560 if (record_arch_list_add_mem (sel.exp, tdep->size_fd_set))
562 if (record_arch_list_add_mem (sel.tvp, tdep->size_timeval))
576 regcache_raw_read (regcache, tdep->arg2,
577 (gdb_byte *) & tmpu32);
578 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & len);
579 if (record_arch_list_add_mem (tmpu32, len))
594 target_terminal_ours ();
596 yquery (_("The next instruction is syscall reboot. "
597 "It will restart the computer. "
598 "Do you want to stop the program?"));
599 target_terminal_inferior ();
607 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
608 if (record_arch_list_add_mem (tmpu32, tdep->size_dirent))
622 regcache_raw_read (regcache, tdep->arg1,
623 (gdb_byte *) & tmpu32);
624 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & len);
625 target_terminal_ours ();
627 yquery (_("The next instruction is syscall munmap. "
628 "It will free the memory addr = %s len = %u. "
629 "It will make record target get error. "
630 "Do you want to stop the program?"),
631 paddress (gdbarch, tmpu32), (int)len);
632 target_terminal_inferior ();
646 /* sys_getpriority */
648 /* sys_setpriority */
658 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
659 if (record_arch_list_add_mem (tmpu32, tdep->size_statfs))
669 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
672 case RECORD_SYS_SOCKET:
673 case RECORD_SYS_BIND:
674 case RECORD_SYS_CONNECT:
675 case RECORD_SYS_LISTEN:
677 case RECORD_SYS_ACCEPT:
678 case RECORD_SYS_GETSOCKNAME:
679 case RECORD_SYS_GETPEERNAME:
682 regcache_raw_read (regcache, tdep->arg2,
683 (gdb_byte *) & tmpu32);
686 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
689 fprintf_unfiltered (gdb_stdlog,
690 "Process record: error reading "
691 "memory at addr = %s len = %lu.\n",
692 paddress (gdbarch, tmpu32),
693 (unsigned long)sizeof (a));
696 if (record_arch_list_add_mem (a[1], tdep->size_sockaddr))
698 if (record_arch_list_add_mem (a[2], tdep->size_int))
704 case RECORD_SYS_SOCKETPAIR:
707 regcache_raw_read (regcache, tdep->arg2,
708 (gdb_byte *) & tmpu32);
711 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
714 fprintf_unfiltered (gdb_stdlog,
715 "Process record: error reading "
716 "memory at addr = %s len = %lu.\n",
717 paddress (gdbarch, tmpu32),
718 (unsigned long)sizeof (a));
721 if (record_arch_list_add_mem (a[3], tdep->size_int))
726 case RECORD_SYS_SEND:
727 case RECORD_SYS_SENDTO:
729 case RECORD_SYS_RECV:
732 regcache_raw_read (regcache, tdep->arg2,
733 (gdb_byte *) & tmpu32);
736 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
739 fprintf_unfiltered (gdb_stdlog,
740 "Process record: error reading "
741 "memory at addr = %s len = %lu.\n",
742 paddress (gdbarch, tmpu32),
743 (unsigned long)sizeof (a));
748 if (target_read_memory
749 (a[2], (gdb_byte *) & (a[2]), sizeof (a[2])))
752 fprintf_unfiltered (gdb_stdlog,
753 "Process record: error reading "
754 "memory at addr = %s "
756 paddress (gdbarch, a[2]),
757 (unsigned long)sizeof (a[2]));
760 if (record_arch_list_add_mem (a[1], a[2]))
766 case RECORD_SYS_RECVFROM:
769 regcache_raw_read (regcache, tdep->arg2,
770 (gdb_byte *) & tmpu32);
773 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
776 fprintf_unfiltered (gdb_stdlog,
777 "Process record: error reading "
778 "memory at addr = %s len = %lu.\n",
779 paddress (gdbarch, tmpu32),
780 (unsigned long)sizeof (a));
785 if (target_read_memory
786 (a[2], (gdb_byte *) & (a[2]), sizeof (a[2])))
789 fprintf_unfiltered (gdb_stdlog,
790 "Process record: error reading "
791 "memory at addr = %s "
793 paddress (gdbarch, a[2]),
794 (unsigned long)sizeof (a[2]));
797 if (record_arch_list_add_mem (a[1], a[2]))
799 if (record_arch_list_add_mem (a[4], tdep->size_sockaddr))
801 if (record_arch_list_add_mem (a[5], tdep->size_int))
807 case RECORD_SYS_SHUTDOWN:
808 case RECORD_SYS_SETSOCKOPT:
810 case RECORD_SYS_GETSOCKOPT:
815 regcache_raw_read (regcache, tdep->arg2,
816 (gdb_byte *) & tmpu32);
819 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
822 fprintf_unfiltered (gdb_stdlog,
823 "Process record: error reading "
824 "memory at addr = %s len = %lu.\n",
825 paddress (gdbarch, tmpu32),
826 (unsigned long)sizeof (a));
831 if (target_read_memory
832 (a[4], (gdb_byte *) & av, sizeof (av)))
835 fprintf_unfiltered (gdb_stdlog,
836 "Process record: error reading "
837 "memory at addr = %s "
839 paddress (gdbarch, a[4]),
840 (unsigned long)sizeof (av));
843 if (record_arch_list_add_mem (a[3], av))
845 if (record_arch_list_add_mem (a[4], tdep->size_int))
851 case RECORD_SYS_SENDMSG:
853 case RECORD_SYS_RECVMSG:
859 uint32_t msg_namelen;
862 uint32_t msg_control;
863 uint32_t msg_controllen;
872 regcache_raw_read (regcache, tdep->arg2,
873 (gdb_byte *) & tmpu32);
876 if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
879 fprintf_unfiltered (gdb_stdlog,
880 "Process record: error reading "
881 "memory at addr = %s len = %lu.\n",
882 paddress (gdbarch, tmpu32),
883 (unsigned long)sizeof (a));
886 if (record_arch_list_add_mem (a[1], tdep->size_msghdr))
890 if (target_read_memory
891 (a[1], (gdb_byte *) & rec, sizeof (rec)))
894 fprintf_unfiltered (gdb_stdlog,
895 "Process record: error reading "
896 "memory at addr = %s "
898 paddress (gdbarch, a[1]),
899 (unsigned long)sizeof (rec));
902 if (record_arch_list_add_mem
903 (rec.msg_name, rec.msg_namelen))
905 if (record_arch_list_add_mem
906 (rec.msg_control, rec.msg_controllen))
910 for (i = 0; i < rec.msg_iovlen; i++)
912 if (target_read_memory
913 (rec.msg_iov, (gdb_byte *) & iov,
917 fprintf_unfiltered (gdb_stdlog,
918 "Process record: error "
924 (unsigned long)sizeof (iov));
927 if (record_arch_list_add_mem
928 (iov.iov_base, iov.iov_len))
930 rec.msg_iov += sizeof (struct record_iovec);
938 printf_unfiltered (_("Process record and replay target "
939 "doesn't support socketcall call 0x%s\n"),
940 phex_nz (tmpu32, 4));
952 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
953 if (record_arch_list_add_mem (tmpu32, tdep->size_itimerval))
959 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
960 if (record_arch_list_add_mem (tmpu32, tdep->size_itimerval))
970 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
971 if (record_arch_list_add_mem (tmpu32, tdep->size_stat))
977 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
978 if (record_arch_list_add_mem (tmpu32, tdep->size_old_utsname))
994 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
995 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
997 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
998 if (record_arch_list_add_mem (tmpu32, tdep->size_rusage))
1008 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1009 if (record_arch_list_add_mem (tmpu32, tdep->size_sysinfo))
1015 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1022 regcache_raw_read (regcache, tdep->arg3,
1023 (gdb_byte *) & second);
1024 regcache_raw_read (regcache, tdep->arg5,
1025 (gdb_byte *) & ptr);
1026 if (record_arch_list_add_mem (ptr, second + tdep->size_long))
1031 regcache_raw_read (regcache, tdep->arg5,
1032 (gdb_byte *) & tmpu32);
1033 if (record_arch_list_add_mem (tmpu32, tdep->size_msqid_ds))
1037 regcache_raw_read (regcache, tdep->arg4,
1038 (gdb_byte *) & tmpu32);
1039 if (record_arch_list_add_mem (tmpu32, tdep->size_ulong))
1043 regcache_raw_read (regcache, tdep->arg5,
1044 (gdb_byte *) & tmpu32);
1045 if (record_arch_list_add_mem (tmpu32, tdep->size_shmid_ds))
1057 /* sys_setdomainname */
1063 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1064 if (record_arch_list_add_mem (tmpu32, tdep->size_new_utsname))
1068 /* sys_modify_ldt */
1070 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1071 if (tmpu32 == 0 || tmpu32 == 2)
1073 uint32_t ptr, bytecount;
1074 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & ptr);
1075 regcache_raw_read (regcache, tdep->arg3,
1076 (gdb_byte *) & bytecount);
1077 if (record_arch_list_add_mem (ptr, bytecount))
1084 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1085 if (record_arch_list_add_mem (tmpu32, tdep->size_timex))
1093 /* sys_sigprocmask */
1095 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1096 if (record_arch_list_add_mem (tmpu32, tdep->size_old_sigset_t))
1100 /* sys_ni_syscall */
1102 /* sys_init_module */
1104 /* sys_delete_module */
1106 /* sys_ni_syscall */
1112 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1115 case RECORD_Q_GETFMT:
1116 regcache_raw_read (regcache, tdep->arg4,
1117 (gdb_byte *) & tmpu32);
1118 if (record_arch_list_add_mem (tmpu32, 4))
1121 case RECORD_Q_GETINFO:
1122 regcache_raw_read (regcache, tdep->arg4,
1123 (gdb_byte *) & tmpu32);
1124 if (record_arch_list_add_mem (tmpu32, tdep->size_mem_dqinfo))
1127 case RECORD_Q_GETQUOTA:
1128 regcache_raw_read (regcache, tdep->arg4,
1129 (gdb_byte *) & tmpu32);
1130 if (record_arch_list_add_mem (tmpu32, tdep->size_if_dqblk))
1133 case RECORD_Q_XGETQSTAT:
1134 case RECORD_Q_XGETQUOTA:
1135 regcache_raw_read (regcache, tdep->arg4,
1136 (gdb_byte *) & tmpu32);
1137 if (record_arch_list_add_mem (tmpu32, tdep->size_fs_quota_stat))
1153 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1156 regcache_raw_read (regcache, tdep->arg3,
1157 (gdb_byte *) & tmpu32);
1158 /*XXX the size of memory is not very clear. */
1159 if (record_arch_list_add_mem (tmpu32, 10))
1164 /* sys_personality */
1166 /* sys_ni_syscall */
1168 /* sys_setfsuid16 */
1170 /* sys_setfsgid16 */
1176 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1177 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
1185 regcache_raw_read (regcache, tdep->arg2,
1186 (gdb_byte *) & tmpu32);
1187 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & count);
1188 if (record_arch_list_add_mem (tmpu32, tdep->size_dirent * count))
1195 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1196 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
1198 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1199 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
1201 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1202 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
1204 regcache_raw_read (regcache, tdep->arg5, (gdb_byte *) & tmpu32);
1205 if (record_arch_list_add_mem (tmpu32, tdep->size_timeval))
1225 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & vec);
1228 regcache_raw_read (regcache, tdep->arg3,
1229 (gdb_byte *) & vlen);
1230 for (tmpu32 = 0; tmpu32 < vlen; tmpu32++)
1232 if (target_read_memory
1233 (vec, (gdb_byte *) & iov, sizeof (struct record_iovec)))
1236 fprintf_unfiltered (gdb_stdlog,
1237 "Process record: error reading "
1238 "memory at addr = %s len = %lu.\n",
1239 paddress (gdbarch, vec),
1240 (unsigned long)sizeof (struct record_iovec));
1243 if (record_arch_list_add_mem (iov.iov_base, iov.iov_len))
1245 vec += sizeof (struct record_iovec);
1265 /* sys_munlockall */
1267 /* sys_sched_setparam */
1271 /* sys_sched_getparam */
1273 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1274 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1278 /* sys_sched_setscheduler */
1280 /* sys_sched_getscheduler */
1282 /* sys_sched_yield */
1284 /* sys_sched_get_priority_max */
1286 /* sys_sched_get_priority_min */
1290 /* sys_sched_rr_get_interval */
1294 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1295 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
1301 /* sys_setresuid16 */
1305 /* sys_getresuid16 */
1307 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1308 if (record_arch_list_add_mem (tmpu32, tdep->size_old_uid_t))
1310 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1311 if (record_arch_list_add_mem (tmpu32, tdep->size_old_uid_t))
1313 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1314 if (record_arch_list_add_mem (tmpu32, tdep->size_old_uid_t))
1320 /* sys_ni_syscall */
1326 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1330 regcache_raw_read (regcache, tdep->arg2,
1331 (gdb_byte *) & nfds);
1332 if (record_arch_list_add_mem (tmpu32, tdep->size_pollfd * nfds))
1337 /* sys_nfsservctl */
1339 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1340 if (tmpu32 == 7 || tmpu32 == 8)
1344 rsize = tdep->size_NFS_FHSIZE;
1346 rsize = tdep->size_knfsd_fh;
1347 regcache_raw_read (regcache, tdep->arg3,
1348 (gdb_byte *) & tmpu32);
1349 if (record_arch_list_add_mem (tmpu32, rsize))
1354 /* sys_setresgid16 */
1358 /* sys_getresgid16 */
1360 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1361 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
1363 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1364 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
1366 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1367 if (record_arch_list_add_mem (tmpu32, tdep->size_old_gid_t))
1373 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1377 regcache_raw_read (regcache, tdep->arg2,
1378 (gdb_byte *) & tmpu32);
1379 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1383 regcache_raw_read (regcache, tdep->arg2,
1384 (gdb_byte *) & tmpu32);
1385 if (record_arch_list_add_mem (tmpu32, tdep->size_TASK_COMM_LEN))
1391 /* sys_rt_sigreturn */
1395 /* sys_rt_sigaction */
1397 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1398 if (record_arch_list_add_mem (tmpu32, tdep->size_sigaction))
1402 /* sys_rt_sigprocmask */
1404 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1405 if (record_arch_list_add_mem (tmpu32, tdep->size_sigset_t))
1409 /* sys_rt_sigpending */
1411 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1414 uint32_t sigsetsize;
1415 regcache_raw_read (regcache, tdep->arg2,
1416 (gdb_byte *) & sigsetsize);
1417 if (record_arch_list_add_mem (tmpu32, sigsetsize))
1422 /* sys_rt_sigtimedwait */
1424 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1425 if (record_arch_list_add_mem (tmpu32, tdep->size_siginfo_t))
1429 /* sys_rt_sigqueueinfo */
1431 /* sys_rt_sigsuspend */
1437 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1441 regcache_raw_read (regcache, tdep->arg3,
1442 (gdb_byte *) & count);
1443 if (record_arch_list_add_mem (tmpu32, count))
1456 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1460 regcache_raw_read (regcache, tdep->arg2,
1461 (gdb_byte *) & size);
1462 if (record_arch_list_add_mem (tmpu32, size))
1469 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1470 if (record_arch_list_add_mem (tmpu32, tdep->size_cap_user_data_t))
1478 /* sys_sigaltstack */
1480 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1481 if (record_arch_list_add_mem (tmpu32, tdep->size_stack_t))
1487 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1488 if (record_arch_list_add_mem (tmpu32, tdep->size_off_t))
1492 /* sys_ni_syscall */
1494 /* sys_ni_syscall */
1502 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1503 if (record_arch_list_add_mem (tmpu32, tdep->size_rlimit))
1511 /* sys_truncate64 */
1513 /* sys_ftruncate64 */
1523 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1524 if (record_arch_list_add_mem (tmpu32, tdep->size_stat64))
1546 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1550 regcache_raw_read (regcache, tdep->arg1,
1551 (gdb_byte *) & gidsetsize);
1552 if (record_arch_list_add_mem
1553 (tmpu32, tdep->size_gid_t * gidsetsize))
1568 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1569 if (record_arch_list_add_mem (tmpu32, tdep->size_uid_t))
1571 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1572 if (record_arch_list_add_mem (tmpu32, tdep->size_uid_t))
1574 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1575 if (record_arch_list_add_mem (tmpu32, tdep->size_uid_t))
1585 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1586 if (record_arch_list_add_mem (tmpu32, tdep->size_gid_t))
1588 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1589 if (record_arch_list_add_mem (tmpu32, tdep->size_gid_t))
1591 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1592 if (record_arch_list_add_mem (tmpu32, tdep->size_gid_t))
1606 /* sys_pivot_root */
1612 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1613 if (record_arch_list_add_mem (tmpu32, tdep->size_PAGE_SIZE))
1621 /* sys_getdents64 */
1625 regcache_raw_read (regcache, tdep->arg2,
1626 (gdb_byte *) & tmpu32);
1627 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & count);
1628 if (record_arch_list_add_mem (tmpu32, tdep->size_dirent64 * count))
1635 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1636 if (tmpu32 == tdep->fcntl_F_GETLK64)
1638 regcache_raw_read (regcache, tdep->arg3,
1639 (gdb_byte *) & tmpu32);
1640 if (record_arch_list_add_mem (tmpu32, tdep->size_flock64))
1643 else if (tmpu32 != tdep->fcntl_F_SETLK64
1644 && tmpu32 != tdep->fcntl_F_SETLKW64)
1650 /* sys_ni_syscall */
1652 /* sys_ni_syscall */
1672 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1676 regcache_raw_read (regcache, tdep->arg4,
1677 (gdb_byte *) & size);
1678 if (record_arch_list_add_mem (tmpu32, size))
1685 /* sys_llistxattr */
1687 /* sys_flistxattr */
1689 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1693 regcache_raw_read (regcache, tdep->arg3,
1694 (gdb_byte *) & size);
1695 if (record_arch_list_add_mem (tmpu32, size))
1700 /* sys_removexattr */
1702 /* sys_lremovexattr */
1704 /* sys_fremovexattr */
1710 /* sys_sendfile64 */
1712 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1713 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
1719 /* sys_sched_setaffinity */
1723 /* sys_sched_getaffinity */
1725 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1729 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & len);
1730 if (record_arch_list_add_mem (tmpu32, len))
1735 /* sys_set_thread_area */
1737 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1738 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1742 /* sys_get_thread_area */
1744 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1745 if (record_arch_list_add_mem (tmpu32, tdep->size_user_desc))
1751 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1752 if (record_arch_list_add_mem (tmpu32, tdep->size_long))
1756 /* sys_io_destroy */
1760 /* sys_io_getevents */
1762 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1766 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & nr);
1767 if (record_arch_list_add_mem (tmpu32, nr * tdep->size_io_event))
1774 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1779 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & nr);
1780 iocbp = (uint32_t *) alloca (nr * tdep->size_int);
1781 if (target_read_memory
1782 (tmpu32, (gdb_byte *) iocbp, nr * tdep->size_int))
1785 fprintf_unfiltered (gdb_stdlog,
1786 "Process record: error reading memory "
1787 "at addr = %s len = %u.\n",
1788 paddress (gdbarch, tmpu32),
1789 (int)(nr * tdep->size_int));
1792 for (i = 0; i < nr; i++)
1794 if (record_arch_list_add_mem (iocbp[i], tdep->size_iocb))
1802 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1803 if (record_arch_list_add_mem (tmpu32, tdep->size_io_event))
1809 /* sys_ni_syscall */
1813 /* sys_exit_group */
1817 target_terminal_ours ();
1819 yquery (_("The next instruction is syscall exit_group. "
1820 "It will make the program exit. "
1821 "Do you want to stop the program?"));
1822 target_terminal_inferior ();
1828 /* sys_lookup_dcookie */
1830 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1834 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & len);
1835 if (record_arch_list_add_mem (tmpu32, len))
1840 /* sys_epoll_create */
1846 /* sys_epoll_wait */
1848 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1852 regcache_raw_read (regcache, tdep->arg3,
1853 (gdb_byte *) & maxevents);
1854 if (record_arch_list_add_mem
1855 (tmpu32, maxevents * tdep->size_epoll_event))
1860 /* sys_remap_file_pages */
1862 /* sys_set_tid_address */
1866 /* sys_timer_create */
1868 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1869 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1873 /* sys_timer_settime */
1875 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1876 if (record_arch_list_add_mem (tmpu32, tdep->size_itimerspec))
1880 /* sys_timer_gettime */
1882 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1883 if (record_arch_list_add_mem (tmpu32, tdep->size_itimerspec))
1887 /* sys_timer_getoverrun */
1889 /* sys_timer_delete */
1891 /* sys_clock_settime */
1895 /* sys_clock_gettime */
1897 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1898 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
1902 /* sys_clock_getres */
1904 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1905 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
1909 /* sys_clock_nanosleep */
1911 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1912 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
1920 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1921 if (record_arch_list_add_mem (tmpu32, tdep->size_statfs64))
1929 /* sys_fadvise64_64 */
1931 /* sys_ni_syscall */
1937 /* sys_get_mempolicy */
1939 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
1940 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1942 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1946 regcache_raw_read (regcache, tdep->arg3,
1947 (gdb_byte *) & maxnode);
1948 if (record_arch_list_add_mem (tmpu32, maxnode * tdep->size_long))
1953 /* sys_set_mempolicy */
1959 /* sys_mq_timedsend */
1963 /* sys_mq_timedreceive */
1965 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
1969 regcache_raw_read (regcache, tdep->arg3,
1970 (gdb_byte *) & msg_len);
1971 if (record_arch_list_add_mem (tmpu32, msg_len))
1974 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
1975 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
1983 /* sys_mq_getsetattr */
1985 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1986 if (record_arch_list_add_mem (tmpu32, tdep->size_mq_attr))
1990 /* sys_kexec_load */
1996 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
1997 if (record_arch_list_add_mem (tmpu32, tdep->size_siginfo))
1999 regcache_raw_read (regcache, tdep->arg5, (gdb_byte *) & tmpu32);
2000 if (record_arch_list_add_mem (tmpu32, tdep->size_rusage))
2004 /* sys_ni_syscall */
2008 /* sys_request_key */
2014 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
2015 if (tmpu32 == 6 || tmpu32 == 11)
2017 regcache_raw_read (regcache, tdep->arg3,
2018 (gdb_byte *) & tmpu32);
2022 regcache_raw_read (regcache, tdep->arg4,
2023 (gdb_byte *) & buflen);
2024 if (record_arch_list_add_mem (tmpu32, buflen))
2030 /* sys_ioprio_set */
2032 /* sys_ioprio_get */
2034 /* sys_inotify_init */
2036 /* sys_inotify_add_watch */
2038 /* sys_inotify_rm_watch */
2040 /* sys_migrate_pages */
2056 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2057 if (record_arch_list_add_mem (tmpu32, tdep->size_stat64))
2071 /* sys_readlinkat */
2073 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2077 regcache_raw_read (regcache, tdep->arg4,
2078 (gdb_byte *) & bufsiz);
2079 if (record_arch_list_add_mem (tmpu32, bufsiz))
2092 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2093 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
2095 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2096 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
2098 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
2099 if (record_arch_list_add_mem (tmpu32, tdep->size_fd_set))
2101 regcache_raw_read (regcache, tdep->arg5, (gdb_byte *) & tmpu32);
2102 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
2108 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
2112 regcache_raw_read (regcache, tdep->arg2,
2113 (gdb_byte *) & nfds);
2114 if (record_arch_list_add_mem (tmpu32, tdep->size_pollfd * nfds))
2117 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2118 if (record_arch_list_add_mem (tmpu32, tdep->size_timespec))
2124 /* sys_set_robust_list */
2128 /* sys_get_robust_list */
2130 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2131 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
2133 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2134 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
2140 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2141 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
2143 regcache_raw_read (regcache, tdep->arg4, (gdb_byte *) & tmpu32);
2144 if (record_arch_list_add_mem (tmpu32, tdep->size_loff_t))
2148 /* sys_sync_file_range */
2156 /* sys_move_pages */
2158 regcache_raw_read (regcache, tdep->arg5, (gdb_byte *) & tmpu32);
2162 regcache_raw_read (regcache, tdep->arg2,
2163 (gdb_byte *) & nr_pages);
2164 if (record_arch_list_add_mem (tmpu32, nr_pages * tdep->size_int))
2171 regcache_raw_read (regcache, tdep->arg1, (gdb_byte *) & tmpu32);
2172 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
2174 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2175 if (record_arch_list_add_mem (tmpu32, tdep->size_int))
2177 regcache_raw_read (regcache, tdep->arg3, (gdb_byte *) & tmpu32);
2178 if (record_arch_list_add_mem (tmpu32, tdep->size_ulong * 2))
2182 /* sys_epoll_pwait */
2184 regcache_raw_read (regcache, tdep->arg2, (gdb_byte *) & tmpu32);
2188 regcache_raw_read (regcache, tdep->arg3,
2189 (gdb_byte *) & maxevents);
2190 if (record_arch_list_add_mem
2191 (tmpu32, maxevents * tdep->size_epoll_event))
2197 printf_unfiltered (_("Process record and replay target doesn't "
2198 "support syscall number %u\n"),