33#define RECORD_PTRACE_PEEKTEXT 1
34#define RECORD_PTRACE_PEEKDATA 2
35#define RECORD_PTRACE_PEEKUSR 3
41#define RECORD_SYS_SOCKET 1
42#define RECORD_SYS_BIND 2
43#define RECORD_SYS_CONNECT 3
44#define RECORD_SYS_LISTEN 4
45#define RECORD_SYS_ACCEPT 5
46#define RECORD_SYS_GETSOCKNAME 6
47#define RECORD_SYS_GETPEERNAME 7
48#define RECORD_SYS_SOCKETPAIR 8
49#define RECORD_SYS_SEND 9
50#define RECORD_SYS_RECV 10
51#define RECORD_SYS_SENDTO 11
52#define RECORD_SYS_RECVFROM 12
53#define RECORD_SYS_SHUTDOWN 13
54#define RECORD_SYS_SETSOCKOPT 14
55#define RECORD_SYS_GETSOCKOPT 15
56#define RECORD_SYS_SENDMSG 16
57#define RECORD_SYS_RECVMSG 17
64#define RECORD_SEMGET 2
65#define RECORD_SEMCTL 3
66#define RECORD_SEMTIMEDOP 4
67#define RECORD_MSGSND 11
68#define RECORD_MSGRCV 12
69#define RECORD_MSGGET 13
70#define RECORD_MSGCTL 14
71#define RECORD_SHMAT 21
72#define RECORD_SHMDT 22
73#define RECORD_SHMGET 23
74#define RECORD_SHMCTL 24
80#define RECORD_Q_GETFMT 0x800004
81#define RECORD_Q_GETINFO 0x800005
82#define RECORD_Q_GETQUOTA 0x800007
83#define RECORD_Q_XGETQSTAT (('5' << 8) + 5)
84#define RECORD_Q_XGETQUOTA (('3' << 8) + 3)
86#define OUTPUT_REG(val, num) phex_nz ((val), \
87 gdbarch_register_type (regcache->arch (), (num))->length ())
114 a = (gdb_byte *) alloca (tdep->
size_int);
124 "Process record: error reading "
125 "memory at addr = 0x%s len = %d.\n",
161 "Process record: error reading "
162 "memory at addr = 0x%s "
190 gdb_byte *iov = (gdb_byte *) alloca (tdep->
size_iovec);
192 for (i = 0; i < len; i++)
198 "Process record: error "
248 ULONGEST tmpulongest;
258 if (
yquery (_(
"The next instruction is syscall exit. "
259 "It will make the program exit. "
260 "Do you want to stop the program?")))
502 _(
"Process record and replay target doesn't "
503 "support ioctl request TIOCSERGSTRUCT\n"));
509 _(
"Process record and replay target doesn't "
510 "support ioctl request 0x%s.\n"),
615 gdb_byte *a = (gdb_byte *) alloca (sz_sel_arg);
616 CORE_ADDR inp, outp, exp, tvp;
626 "Process record: error reading memory "
627 "at addr = 0x%s len = %lu.\n",
665 if (
yquery (_(
"The next instruction is syscall reboot. "
666 "It will restart the computer. "
667 "Do you want to stop the program?")))
689The next instruction is syscall munmap.\n\
690It will free the memory addr = 0x%s len = %u.\n\
691It will make record target cannot record some memory change.\n\
692Do you want to stop the program?"),
767 gdb_byte *optlenp = (gdb_byte *) alloca (tdep->
size_int);
774 "Process record: error reading "
775 "memory at addr = 0x%s "
809 gdb_byte *a = (gdb_byte *) alloca (tdep->
size_ulong * 2);
818 "Process record: error reading "
819 "memory at addr = 0x%s len = %d.\n",
837 gdb_byte *a = (gdb_byte *) alloca (tdep->
size_ulong);
849 "Process record: error reading "
850 "memory at addr = 0x%s len = %d.\n",
871 gdb_byte *a = (gdb_byte *) alloca (tdep->
size_ulong * 2);
880 "Process record: error reading "
881 "memory at addr = 0x%s len = %d.\n",
899 gdb_byte *a = (gdb_byte *) alloca (tdep->
size_ulong * 2);
907 "Process record: error reading "
908 "memory at addr = 0x%s len = %d.\n",
931 gdb_byte *a = (gdb_byte *) alloca (tdep->
size_ulong * 2);
932 gdb_byte *av = (gdb_byte *) alloca (tdep->
size_int);
944 "Process record: error reading "
945 "memory at addr = 0x%s len = %d.\n",
960 "Process record: error reading "
961 "memory at addr = 0x%s "
963 phex_nz (tmpulongest,
993 gdb_byte *a = (gdb_byte *) alloca (tdep->
size_ulong);
1005 "Process record: error reading "
1006 "memory at addr = 0x%s len = %d.\n",
1020 _(
"Process record and replay target "
1021 "doesn't support socketcall call 0x%s\n"),
1128 tmpulongest &= 0xffff;
1129 switch (tmpulongest)
1145 tmpint = (int) second + tdep->
size_long;
1167 _(
"Process record and replay target doesn't "
1168 "support ipc number %s\n"),
1169 pulongest (tmpulongest));
1188 if (tmpulongest == 0 || tmpulongest == 2)
1220 switch (tmpulongest)
1253 if (tmpulongest == 2)
1298 gdb_byte *iov = (gdb_byte *) alloca (tdep->
size_iovec);
1301 for (tmpulongest = 0; tmpulongest < vlen; tmpulongest++)
1308 "Process record: error reading "
1309 "memory at addr = 0x%s len = %d.\n",
1391 if (tmpulongest == 7 || tmpulongest == 8)
1395 if (tmpulongest == 7)
1418 switch (tmpulongest)
1449 ULONGEST sigsetsize;
1553 ULONGEST gidsetsize;
1557 tmpint = tdep->
size_gid_t * (int) gidsetsize;
1728 "Process record: error reading memory "
1729 "at addr = 0x%s len = %u.\n",
1734 for (i = 0; i < nr; i++)
1757 if (
yquery (_(
"The next instruction is syscall exit_group. "
1758 "It will make the program exit. "
1759 "Do you want to stop the program?")))
1906 if (tmpulongest == 6 || tmpulongest == 11)
2052 _(
"Process record and replay target doesn't "
2053 "support syscall number %d\n"),
syscall);
static LONGEST extract_signed_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
#define RECORD_SYS_RECVMSG
#define RECORD_SYS_SETSOCKOPT
#define RECORD_SYS_RECVFROM
#define RECORD_SYS_CONNECT
int record_linux_system_call(enum gdb_syscall syscall, struct regcache *regcache, struct linux_record_tdep *tdep)
#define RECORD_SYS_GETSOCKOPT
#define RECORD_Q_XGETQSTAT
#define RECORD_SYS_SHUTDOWN
#define RECORD_Q_XGETQUOTA
#define OUTPUT_REG(val, num)
static int record_linux_msghdr(struct regcache *regcache, struct linux_record_tdep *tdep, ULONGEST addr)
#define RECORD_SEMTIMEDOP
#define RECORD_SYS_LISTEN
#define RECORD_SYS_ACCEPT
#define RECORD_PTRACE_PEEKUSR
#define RECORD_PTRACE_PEEKTEXT
#define RECORD_SYS_GETSOCKNAME
static int record_mem_at_reg(struct regcache *regcache, int regnum, int len)
#define RECORD_Q_GETQUOTA
#define RECORD_PTRACE_PEEKDATA
#define RECORD_SYS_SENDMSG
static int record_linux_sockaddr(struct regcache *regcache, struct linux_record_tdep *tdep, ULONGEST addr, ULONGEST len)
#define RECORD_SYS_SOCKET
#define RECORD_SYS_SOCKETPAIR
#define RECORD_SYS_GETPEERNAME
#define RECORD_SYS_SENDTO
@ gdb_sys_rt_sigqueueinfo
@ gdb_sys_timer_getoverrun
@ gdb_sys_inotify_add_watch
@ gdb_sys_sched_getscheduler
@ gdb_sys_restart_syscall
@ gdb_sys_mq_timedreceive
@ gdb_sys_sched_get_priority_min
@ gdb_sys_rt_sigtimedwait
@ gdb_sys_sched_getaffinity
@ gdb_sys_sched_rr_get_interval
@ gdb_sys_get_robust_list
@ gdb_sys_sched_get_priority_max
@ gdb_sys_clock_nanosleep
@ gdb_sys_inotify_rm_watch
@ gdb_sys_set_tid_address
@ gdb_sys_sync_file_range
@ gdb_sys_set_robust_list
@ gdb_sys_remap_file_pages
@ gdb_sys_get_thread_area
@ gdb_sys_set_thread_area
@ gdb_sys_sched_setaffinity
@ gdb_sys_sched_setscheduler
bool record_full_memory_query
int record_full_arch_list_add_mem(CORE_ADDR addr, int len)
unsigned int record_debug
enum register_status regcache_raw_read_signed(struct regcache *regcache, int regnum, LONGEST *val)
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
ULONGEST ioctl_TIOCGLCKTRMIOS
ULONGEST ioctl_TIOCMIWAIT
ULONGEST ioctl_TIOCGICOUNT
ULONGEST ioctl_TIOCSERGSTRUCT
ULONGEST ioctl_TIOCSERGETMULTI
ULONGEST ioctl_TIOCSERCONFIG
ULONGEST ioctl_TIOCSSOFTCAR
ULONGEST ioctl_TIOCSWINSZ
ULONGEST ioctl_TIOCTTYGSTRUCT
int size_hayes_esp_config
ULONGEST ioctl_TIOCSERSETMULTI
ULONGEST ioctl_TIOCSSERIAL
int size_serial_icounter_struct
ULONGEST ioctl_TIOCSPTLCK
ULONGEST ioctl_TIOCGSOFTCAR
ULONGEST ioctl_TIOCGSERIAL
ULONGEST ioctl_TIOCSERGETLSR
ULONGEST ioctl_TIOCGWINSZ
ULONGEST ioctl_TIOCSERGWILD
ULONGEST ioctl_TIOCSLCKTRMIOS
ULONGEST ioctl_TIOCSHAYESESP
ULONGEST ioctl_TIOCGHAYESESP
ULONGEST ioctl_TIOCSERSWILD
int size__old_kernel_stat
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
int yquery(const char *ctlstr,...)
void gdb_printf(struct ui_file *stream, const char *format,...)