2009-04-30 11:04:28 +08:00
|
|
|
/* Process record and replay target code for GNU/Linux.
|
|
|
|
|
2024-01-12 23:30:44 +08:00
|
|
|
Copyright (C) 2008-2024 Free Software Foundation, Inc.
|
2009-04-30 11:04:28 +08:00
|
|
|
|
|
|
|
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/>. */
|
|
|
|
|
2024-04-23 04:10:14 +08:00
|
|
|
#include "extract-store-integer.h"
|
2009-04-30 11:04:28 +08:00
|
|
|
#include "target.h"
|
2009-08-10 11:04:45 +08:00
|
|
|
#include "gdbtypes.h"
|
2009-04-30 11:04:28 +08:00
|
|
|
#include "regcache.h"
|
|
|
|
#include "record.h"
|
Split record.h into record.h and record-full.h.
Split record.c into record.c and record-full.c.
The split leaves the command part in record.c and moves the target part into
record-full.c.
gdb/
* record.h: Split into this and ...
* record-full.h: ... this.
* record.c: Split into this and ...
* record-full.c: ... this.
* target.h (target_ops): Add new fields to_info_record,
to_save_record, to_delete_record, to_record_is_replaying,
to_goto_record_begin, to_goto_record_end, to_goto_record.
(target_info_record): New.
(target_save_record): New.
(target_supports_delete_record): New.
(target_delete_record): New.
(target_record_is_replaying): New.
(target_goto_record_begin): New.
(target_goto_record_end): New.
(target_goto_record): New.
* target.c (target_info_record): New.
(target_save_record): New.
(target_supports_delete_record): New.
(target_delete_record): New.
(target_record_is_replaying): New.
(target_goto_record_begin): New.
(target_goto_record_end): New.
(target_goto_record): New.
* record.h: Declare struct cmd_list_element.
(record_cmdlist): New declaration.
(set_record_cmdlist): New declaration.
(show_record_cmdlist): New declaration.
(info_record_cmdlist): New declaration.
(cmd_record_goto): New declaration.
* record.c: Remove unnecessary includes.
Include inferior.h.
(cmd_record_goto): Remove declaration.
(record_cmdlist): Now extern. Initialize.
(set_record_cmdlist): Now extern. Initialize.
(show_record_cmdlist): Now extern. Initialize.
(info_record_cmdlist): Now extern. Initialize.
(find_record_target): New.
(require_record_target): New.
(cmd_record_start): Update.
(cmd_record_delete): Remove target-specific code.
Call target_delete_record.
(cmd_record_stop): Unpush any record target.
(set_record_insn_max_num): Move to record-full.c
(set_record_command): Add comment.
(show_record_command): Add comment.
(info_record_command): Update comment.
Remove target-specific code.
Call the record target's to_info_record.
(cmd_record_start): New.
(cmd_record_goto): Now extern.
Remove target-specific code.
Call target_goto_begin, target_goto_end, or target_goto.
(_initialize_record): Move record target ops initialization to
record-full.c.
Change "record" command help text.
Move "record restore", "record set", and "record show" commands to
record-full.c.
* Makefile.in (SFILES): Add record-full.c.
(HFILES_NO_SRCDIR): Add record-full.h.
(COMMON_OBS): Add record-full.o.
* amd64-linux-tdep.c: Include record-full.h instead of record.h.
* arm-tdep.c: Include record-full.h.
* i386-linux-tdep.c: Include record-full.h instead of record.h.
* i386-tdep.c: Include record-full.h.
* infrun.c: Include record-full.h.
* linux-record.c: Include record-full.h.
* moxie-tdep.c: Include record-full.h.
* record-full.c: Include record-full.h.
Change module comment.
(set_record_full_cmdlist): New.
(show_record_full_cmdlist): New.
(record_full_cmdlist): New.
(record_goto_insn): New declaration.
(record_save): New declaration.
(record_check_insn_num): Change query string.
(record_info): New.
(record_delete): New.
(record_is_replaying): New.
(record_goto_entry): New.
(record_goto_begin): New.
(record_goto_end): New.
(record_goto): New.
(init_record_ops): Update.
(init_record_core_ops): Update.
(cmd_record_save): Rename to record_save. Remove target and arg checks.
(cmd_record_start): New.
(set_record_insn_max_num): Moved from record.c
(set_record_full_command): New.
(show_record_full_command): New.
(_initialize_record_full): New.
2013-03-11 16:42:55 +08:00
|
|
|
#include "record-full.h"
|
2009-04-30 11:04:28 +08:00
|
|
|
#include "linux-record.h"
|
Don't include gdbarch.h from defs.h
I touched symtab.h and was surprised to see how many files were
rebuilt. I looked into it a bit, and found that defs.h includes
gdbarch.h, which in turn includes many things.
gdbarch.h is only needed by a minority ofthe files in gdb, so this
patch removes the include from defs.h and updates the fallout.
I did "wc -l" on the files in build/gdb/.deps; this patch reduces the
line count from 139935 to 137030; so there are definitely future
build-time savings here.
Note that while I configured with --enable-targets=all, it's possible
that some *-nat.c file needs an update. I could not test all of
these. The buildbot caught a few problems along these lines.
gdb/ChangeLog
2019-07-10 Tom Tromey <tom@tromey.com>
* defs.h: Don't include gdbarch.h.
* aarch64-ravenscar-thread.c, aarch64-tdep.c, alpha-bsd-tdep.h,
alpha-linux-tdep.c, alpha-mdebug-tdep.c, arch-utils.h, arm-tdep.h,
ax-general.c, btrace.c, buildsym-legacy.c, buildsym.h, c-lang.c,
cli/cli-decode.h, cli/cli-dump.c, cli/cli-script.h,
cli/cli-style.h, coff-pe-read.h, compile/compile-c-support.c,
compile/compile-cplus.h, compile/compile-loc2c.c, corefile.c,
cp-valprint.c, cris-linux-tdep.c, ctf.c, d-lang.c, d-namespace.c,
dcache.c, dicos-tdep.c, dictionary.c, disasm-selftests.c,
dummy-frame.c, dummy-frame.h, dwarf2-frame-tailcall.c,
dwarf2expr.c, expression.h, f-lang.c, frame-base.c,
frame-unwind.c, frv-linux-tdep.c, gdbarch-selftests.c, gdbtypes.h,
go-lang.c, hppa-nbsd-tdep.c, hppa-obsd-tdep.c, i386-dicos-tdep.c,
i386-tdep.h, ia64-vms-tdep.c, interps.h, language.c,
linux-record.c, location.h, m2-lang.c, m32r-linux-tdep.c,
mem-break.c, memattr.c, mn10300-linux-tdep.c, nios2-linux-tdep.c,
objfiles.h, opencl-lang.c, or1k-linux-tdep.c, p-lang.c,
parser-defs.h, ppc-tdep.h, probe.h, python/py-record-btrace.c,
record-btrace.c, record.h, regcache-dump.c, regcache.h,
riscv-fbsd-tdep.c, riscv-linux-tdep.c, rust-exp.y,
sh-linux-tdep.c, sh-nbsd-tdep.c, source-cache.c,
sparc-nbsd-tdep.c, sparc-obsd-tdep.c, sparc-ravenscar-thread.c,
sparc64-fbsd-tdep.c, std-regs.c, target-descriptions.h,
target-float.c, tic6x-linux-tdep.c, tilegx-linux-tdep.c, top.c,
tracefile.c, trad-frame.c, type-stack.h, ui-style.c, utils.c,
utils.h, valarith.c, valprint.c, varobj.c, x86-tdep.c,
xml-support.h, xtensa-linux-tdep.c, cli/cli-cmds.h: Update.
* s390-linux-nat.c, procfs.c, inf-ptrace.c: Likewise.
2019-06-10 05:21:02 +08:00
|
|
|
#include "gdbarch.h"
|
2009-04-30 11:04:28 +08:00
|
|
|
|
|
|
|
/* These macros are the values of the first argument of system call
|
|
|
|
"sys_ptrace". The values of these macros were obtained from Linux
|
|
|
|
Kernel source. */
|
|
|
|
|
|
|
|
#define RECORD_PTRACE_PEEKTEXT 1
|
|
|
|
#define RECORD_PTRACE_PEEKDATA 2
|
|
|
|
#define RECORD_PTRACE_PEEKUSR 3
|
|
|
|
|
|
|
|
/* These macros are the values of the first argument of system call
|
|
|
|
"sys_socketcall". The values of these macros were obtained from
|
|
|
|
Linux Kernel source. */
|
|
|
|
|
|
|
|
#define RECORD_SYS_SOCKET 1
|
|
|
|
#define RECORD_SYS_BIND 2
|
|
|
|
#define RECORD_SYS_CONNECT 3
|
|
|
|
#define RECORD_SYS_LISTEN 4
|
|
|
|
#define RECORD_SYS_ACCEPT 5
|
|
|
|
#define RECORD_SYS_GETSOCKNAME 6
|
|
|
|
#define RECORD_SYS_GETPEERNAME 7
|
|
|
|
#define RECORD_SYS_SOCKETPAIR 8
|
|
|
|
#define RECORD_SYS_SEND 9
|
|
|
|
#define RECORD_SYS_RECV 10
|
|
|
|
#define RECORD_SYS_SENDTO 11
|
|
|
|
#define RECORD_SYS_RECVFROM 12
|
|
|
|
#define RECORD_SYS_SHUTDOWN 13
|
|
|
|
#define RECORD_SYS_SETSOCKOPT 14
|
|
|
|
#define RECORD_SYS_GETSOCKOPT 15
|
|
|
|
#define RECORD_SYS_SENDMSG 16
|
|
|
|
#define RECORD_SYS_RECVMSG 17
|
|
|
|
|
|
|
|
/* These macros are the values of the first argument of system call
|
|
|
|
"sys_ipc". The values of these macros were obtained from Linux
|
|
|
|
Kernel source. */
|
|
|
|
|
|
|
|
#define RECORD_SEMOP 1
|
|
|
|
#define RECORD_SEMGET 2
|
|
|
|
#define RECORD_SEMCTL 3
|
|
|
|
#define RECORD_SEMTIMEDOP 4
|
|
|
|
#define RECORD_MSGSND 11
|
|
|
|
#define RECORD_MSGRCV 12
|
|
|
|
#define RECORD_MSGGET 13
|
|
|
|
#define RECORD_MSGCTL 14
|
|
|
|
#define RECORD_SHMAT 21
|
|
|
|
#define RECORD_SHMDT 22
|
|
|
|
#define RECORD_SHMGET 23
|
|
|
|
#define RECORD_SHMCTL 24
|
|
|
|
|
|
|
|
/* These macros are the values of the first argument of system call
|
|
|
|
"sys_quotactl". The values of these macros were obtained from Linux
|
|
|
|
Kernel source. */
|
|
|
|
|
|
|
|
#define RECORD_Q_GETFMT 0x800004
|
|
|
|
#define RECORD_Q_GETINFO 0x800005
|
|
|
|
#define RECORD_Q_GETQUOTA 0x800007
|
|
|
|
#define RECORD_Q_XGETQSTAT (('5' << 8) + 5)
|
|
|
|
#define RECORD_Q_XGETQUOTA (('3' << 8) + 3)
|
|
|
|
|
2009-08-10 11:04:45 +08:00
|
|
|
#define OUTPUT_REG(val, num) phex_nz ((val), \
|
2022-09-21 23:05:21 +08:00
|
|
|
gdbarch_register_type (regcache->arch (), (num))->length ())
|
2009-08-10 11:04:45 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
/* Record a memory area of length LEN pointed to by register
|
|
|
|
REGNUM. */
|
|
|
|
|
|
|
|
static int
|
|
|
|
record_mem_at_reg (struct regcache *regcache, int regnum, int len)
|
|
|
|
{
|
|
|
|
ULONGEST addr;
|
|
|
|
|
|
|
|
regcache_raw_read_unsigned (regcache, regnum, &addr);
|
|
|
|
return record_full_arch_list_add_mem ((CORE_ADDR) addr, len);
|
|
|
|
}
|
|
|
|
|
2009-08-10 11:04:45 +08:00
|
|
|
static int
|
|
|
|
record_linux_sockaddr (struct regcache *regcache,
|
2016-03-17 16:58:57 +08:00
|
|
|
struct linux_record_tdep *tdep, ULONGEST addr,
|
|
|
|
ULONGEST len)
|
2009-08-10 11:04:45 +08:00
|
|
|
{
|
|
|
|
gdb_byte *a;
|
|
|
|
int addrlen;
|
2017-10-25 23:37:03 +08:00
|
|
|
struct gdbarch *gdbarch = regcache->arch ();
|
2009-08-10 11:04:45 +08:00
|
|
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
|
|
|
|
|
|
|
if (!addr)
|
|
|
|
return 0;
|
|
|
|
|
2015-09-26 02:08:06 +08:00
|
|
|
a = (gdb_byte *) alloca (tdep->size_int);
|
2009-08-10 11:04:45 +08:00
|
|
|
|
2013-03-11 16:45:54 +08:00
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) len, tdep->size_int))
|
2009-08-10 11:04:45 +08:00
|
|
|
return -1;
|
|
|
|
|
|
|
|
/* Get the addrlen. */
|
|
|
|
if (target_read_memory ((CORE_ADDR) len, a, tdep->size_int))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s len = %d.\n",
|
|
|
|
phex_nz (len, tdep->size_pointer),
|
|
|
|
tdep->size_int);
|
2016-01-26 03:29:54 +08:00
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
}
|
|
|
|
addrlen = (int) extract_unsigned_integer (a, tdep->size_int, byte_order);
|
|
|
|
if (addrlen <= 0 || addrlen > tdep->size_sockaddr)
|
|
|
|
addrlen = tdep->size_sockaddr;
|
|
|
|
|
2013-03-11 16:45:54 +08:00
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) addr, addrlen))
|
2009-08-10 11:04:45 +08:00
|
|
|
return -1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
record_linux_msghdr (struct regcache *regcache,
|
2016-03-17 16:58:57 +08:00
|
|
|
struct linux_record_tdep *tdep, ULONGEST addr)
|
2009-08-10 11:04:45 +08:00
|
|
|
{
|
|
|
|
gdb_byte *a;
|
2017-10-25 23:37:03 +08:00
|
|
|
struct gdbarch *gdbarch = regcache->arch ();
|
2009-08-10 11:04:45 +08:00
|
|
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
|
|
|
CORE_ADDR tmpaddr;
|
|
|
|
int tmpint;
|
|
|
|
|
|
|
|
if (!addr)
|
|
|
|
return 0;
|
|
|
|
|
2013-03-11 16:45:54 +08:00
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) addr, tdep->size_msghdr))
|
2009-08-10 11:04:45 +08:00
|
|
|
return -1;
|
|
|
|
|
2015-09-26 02:08:06 +08:00
|
|
|
a = (gdb_byte *) alloca (tdep->size_msghdr);
|
2009-08-10 11:04:45 +08:00
|
|
|
if (target_read_memory ((CORE_ADDR) addr, a, tdep->size_msghdr))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s "
|
|
|
|
"len = %d.\n",
|
|
|
|
phex_nz (addr, tdep->size_pointer),
|
|
|
|
tdep->size_msghdr);
|
2016-01-26 03:29:54 +08:00
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* msg_name msg_namelen */
|
|
|
|
addr = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
|
|
|
|
a += tdep->size_pointer;
|
2013-03-11 16:45:54 +08:00
|
|
|
if (record_full_arch_list_add_mem
|
|
|
|
((CORE_ADDR) addr,
|
|
|
|
(int) extract_unsigned_integer (a,
|
|
|
|
tdep->size_int,
|
|
|
|
byte_order)))
|
2009-08-10 11:04:45 +08:00
|
|
|
return -1;
|
2015-10-30 23:51:58 +08:00
|
|
|
/* We have read an int, but skip size_pointer bytes to account for alignment
|
|
|
|
of the next field on 64-bit targets. */
|
|
|
|
a += tdep->size_pointer;
|
2009-08-10 11:04:45 +08:00
|
|
|
|
|
|
|
/* msg_iov msg_iovlen */
|
|
|
|
addr = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
|
|
|
|
a += tdep->size_pointer;
|
|
|
|
if (addr)
|
|
|
|
{
|
|
|
|
ULONGEST i;
|
|
|
|
ULONGEST len = extract_unsigned_integer (a, tdep->size_size_t,
|
2016-03-17 16:58:57 +08:00
|
|
|
byte_order);
|
2015-09-26 02:08:06 +08:00
|
|
|
gdb_byte *iov = (gdb_byte *) alloca (tdep->size_iovec);
|
2009-08-10 11:04:45 +08:00
|
|
|
|
|
|
|
for (i = 0; i < len; i++)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
if (target_read_memory ((CORE_ADDR) addr, iov, tdep->size_iovec))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error "
|
|
|
|
"reading memory at "
|
|
|
|
"addr = 0x%s "
|
|
|
|
"len = %d.\n",
|
|
|
|
phex_nz (addr,tdep->size_pointer),
|
|
|
|
tdep->size_iovec);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
tmpaddr = (CORE_ADDR) extract_unsigned_integer (iov,
|
|
|
|
tdep->size_pointer,
|
|
|
|
byte_order);
|
|
|
|
tmpint = (int) extract_unsigned_integer (iov + tdep->size_pointer,
|
|
|
|
tdep->size_size_t,
|
|
|
|
byte_order);
|
|
|
|
if (record_full_arch_list_add_mem (tmpaddr, tmpint))
|
|
|
|
return -1;
|
|
|
|
addr += tdep->size_iovec;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
}
|
|
|
|
a += tdep->size_size_t;
|
|
|
|
|
|
|
|
/* msg_control msg_controllen */
|
|
|
|
addr = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
|
|
|
|
a += tdep->size_pointer;
|
|
|
|
tmpint = (int) extract_unsigned_integer (a, tdep->size_size_t, byte_order);
|
2013-03-11 16:45:54 +08:00
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) addr, tmpint))
|
2009-08-10 11:04:45 +08:00
|
|
|
return -1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2009-04-30 11:04:28 +08:00
|
|
|
/* When the architecture process record get a Linux syscall
|
|
|
|
instruction, it will get a Linux syscall number of this
|
|
|
|
architecture and convert it to the Linux syscall number "num" which
|
|
|
|
is internal to GDB. Most Linux syscalls across architectures in
|
|
|
|
Linux would be similar and mostly differ by sizes of types and
|
|
|
|
structures. This sizes are put to "tdep".
|
|
|
|
|
|
|
|
Record the values of the registers and memory that will be changed
|
|
|
|
in current system call.
|
|
|
|
|
|
|
|
Return -1 if something wrong. */
|
|
|
|
|
|
|
|
int
|
2016-03-17 16:58:57 +08:00
|
|
|
record_linux_system_call (enum gdb_syscall syscall,
|
2009-09-09 06:50:59 +08:00
|
|
|
struct regcache *regcache,
|
2016-03-17 16:58:57 +08:00
|
|
|
struct linux_record_tdep *tdep)
|
2009-04-30 11:04:28 +08:00
|
|
|
{
|
2017-10-25 23:37:03 +08:00
|
|
|
struct gdbarch *gdbarch = regcache->arch ();
|
2009-08-10 11:04:45 +08:00
|
|
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
|
|
|
ULONGEST tmpulongest;
|
|
|
|
CORE_ADDR tmpaddr;
|
|
|
|
int tmpint;
|
2009-04-30 11:04:28 +08:00
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
switch (syscall)
|
2009-04-30 11:04:28 +08:00
|
|
|
{
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_restart_syscall:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_exit:
|
2016-04-12 23:49:32 +08:00
|
|
|
if (yquery (_("The next instruction is syscall exit. "
|
|
|
|
"It will make the program exit. "
|
|
|
|
"Do you want to stop the program?")))
|
|
|
|
return 1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_fork:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_read:
|
2016-04-19 22:53:40 +08:00
|
|
|
case gdb_sys_readlink:
|
|
|
|
case gdb_sys_recv:
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
|
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, (int) tmpulongest))
|
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_write:
|
|
|
|
case gdb_sys_open:
|
|
|
|
case gdb_sys_close:
|
2015-10-30 23:51:59 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_waitpid:
|
2015-10-30 23:51:59 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2015-10-30 23:51:59 +08:00
|
|
|
tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2015-10-30 23:51:59 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_creat:
|
|
|
|
case gdb_sys_link:
|
|
|
|
case gdb_sys_unlink:
|
|
|
|
case gdb_sys_execve:
|
|
|
|
case gdb_sys_chdir:
|
2015-10-30 23:51:59 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_time:
|
2015-10-30 23:51:59 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2015-10-30 23:51:59 +08:00
|
|
|
tdep->size_time_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2015-10-30 23:51:59 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_mknod:
|
|
|
|
case gdb_sys_chmod:
|
|
|
|
case gdb_sys_lchown16:
|
|
|
|
case gdb_sys_ni_syscall17:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case gdb_sys_stat:
|
|
|
|
case gdb_sys_fstat:
|
|
|
|
case gdb_sys_lstat:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2,
|
|
|
|
tdep->size__old_kernel_stat))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_lseek:
|
|
|
|
case gdb_sys_getpid:
|
|
|
|
case gdb_sys_mount:
|
|
|
|
case gdb_sys_oldumount:
|
|
|
|
case gdb_sys_setuid16:
|
|
|
|
case gdb_sys_getuid16:
|
|
|
|
case gdb_sys_stime:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ptrace:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest == RECORD_PTRACE_PEEKTEXT
|
2016-03-17 16:58:57 +08:00
|
|
|
|| tmpulongest == RECORD_PTRACE_PEEKDATA
|
|
|
|
|| tmpulongest == RECORD_PTRACE_PEEKUSR)
|
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4, 4))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_alarm:
|
|
|
|
case gdb_sys_pause:
|
|
|
|
case gdb_sys_utime:
|
|
|
|
case gdb_sys_ni_syscall31:
|
|
|
|
case gdb_sys_ni_syscall32:
|
|
|
|
case gdb_sys_access:
|
|
|
|
case gdb_sys_nice:
|
|
|
|
case gdb_sys_ni_syscall35:
|
|
|
|
case gdb_sys_sync:
|
|
|
|
case gdb_sys_kill:
|
|
|
|
case gdb_sys_rename:
|
|
|
|
case gdb_sys_mkdir:
|
|
|
|
case gdb_sys_rmdir:
|
|
|
|
case gdb_sys_dup:
|
2015-10-30 23:51:59 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_pipe:
|
2016-04-19 22:53:40 +08:00
|
|
|
case gdb_sys_pipe2:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int * 2))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-09-09 06:50:59 +08:00
|
|
|
break;
|
|
|
|
|
2022-07-12 21:15:19 +08:00
|
|
|
case gdb_sys_getrandom:
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tmpulongest))
|
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_times:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_tms))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ni_syscall44:
|
|
|
|
case gdb_sys_brk:
|
|
|
|
case gdb_sys_setgid16:
|
|
|
|
case gdb_sys_getgid16:
|
|
|
|
case gdb_sys_signal:
|
|
|
|
case gdb_sys_geteuid16:
|
|
|
|
case gdb_sys_getegid16:
|
|
|
|
case gdb_sys_acct:
|
|
|
|
case gdb_sys_umount:
|
|
|
|
case gdb_sys_ni_syscall53:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case gdb_sys_ioctl:
|
2009-04-30 11:04:28 +08:00
|
|
|
/* XXX Need to add a lot of support of other ioctl requests. */
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest == tdep->ioctl_FIOCLEX
|
2016-03-17 16:58:57 +08:00
|
|
|
|| tmpulongest == tdep->ioctl_FIONCLEX
|
|
|
|
|| tmpulongest == tdep->ioctl_FIONBIO
|
|
|
|
|| tmpulongest == tdep->ioctl_FIOASYNC
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSETS
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSETSW
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSETSF
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSETA
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSETAW
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSETAF
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSBRK
|
|
|
|
|| tmpulongest == tdep->ioctl_TCXONC
|
|
|
|
|| tmpulongest == tdep->ioctl_TCFLSH
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCEXCL
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCNXCL
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSCTTY
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSPGRP
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSTI
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSWINSZ
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCMBIS
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCMBIC
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCMSET
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSSOFTCAR
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCCONS
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSSERIAL
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCPKT
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCNOTTY
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSETD
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSBRKP
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCTTYGSTRUCT
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSBRK
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCCBRK
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSETS2
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSETSW2
|
|
|
|
|| tmpulongest == tdep->ioctl_TCSETSF2
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSPTLCK
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSERCONFIG
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSERGWILD
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSERSWILD
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSLCKTRMIOS
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSERGETMULTI
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSERSETMULTI
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCMIWAIT
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSHAYESESP)
|
|
|
|
{
|
|
|
|
/* Nothing to do. */
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TCGETS
|
2016-03-17 16:58:57 +08:00
|
|
|
|| tmpulongest == tdep->ioctl_TCGETA
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCGLCKTRMIOS)
|
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_termios))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TIOCGPGRP
|
2016-03-17 16:58:57 +08:00
|
|
|
|| tmpulongest == tdep->ioctl_TIOCGSID)
|
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_pid_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TIOCOUTQ
|
2016-03-17 16:58:57 +08:00
|
|
|
|| tmpulongest == tdep->ioctl_TIOCMGET
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCGSOFTCAR
|
|
|
|
|| tmpulongest == tdep->ioctl_FIONREAD
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCINQ
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCGETD
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCGPTN
|
|
|
|
|| tmpulongest == tdep->ioctl_TIOCSERGETLSR)
|
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TIOCGWINSZ)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_winsize))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TIOCLINUX)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2009-09-09 06:50:59 +08:00
|
|
|
/* This syscall affects a char-size memory. */
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, 1))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TIOCGSERIAL)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_serial_struct))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TCGETS2)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_termios2))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_FIOQSIZE)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_loff_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TIOCGICOUNT)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_serial_icounter_struct))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TIOCGHAYESESP)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_hayes_esp_config))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest == tdep->ioctl_TIOCSERGSTRUCT)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stderr,
|
|
|
|
_("Process record and replay target doesn't "
|
|
|
|
"support ioctl request TIOCSERGSTRUCT\n"));
|
2016-03-17 16:58:57 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
else
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stderr,
|
|
|
|
_("Process record and replay target doesn't "
|
|
|
|
"support ioctl request 0x%s.\n"),
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg2));
|
2016-03-17 16:58:57 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_fcntl:
|
2009-04-30 11:04:28 +08:00
|
|
|
/* XXX */
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
2009-04-30 11:04:28 +08:00
|
|
|
sys_fcntl:
|
2009-08-10 11:04:45 +08:00
|
|
|
if (tmpulongest == tdep->fcntl_F_GETLK)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_flock))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ni_syscall56:
|
|
|
|
case gdb_sys_setpgid:
|
|
|
|
case gdb_sys_ni_syscall58:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_olduname:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1,
|
|
|
|
tdep->size_oldold_utsname))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_umask:
|
|
|
|
case gdb_sys_chroot:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ustat:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_ustat))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_dup2:
|
|
|
|
case gdb_sys_getppid:
|
|
|
|
case gdb_sys_getpgrp:
|
|
|
|
case gdb_sys_setsid:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sigaction:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_old_sigaction))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sgetmask:
|
|
|
|
case gdb_sys_ssetmask:
|
|
|
|
case gdb_sys_setreuid16:
|
|
|
|
case gdb_sys_setregid16:
|
|
|
|
case gdb_sys_sigsuspend:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sigpending:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1,
|
|
|
|
tdep->size_old_sigset_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sethostname:
|
|
|
|
case gdb_sys_setrlimit:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_old_getrlimit:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_rlimit))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getrusage:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_rusage))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_gettimeofday:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_timeval)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg2, tdep->size_timezone))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_settimeofday:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getgroups16:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
2015-10-30 23:51:59 +08:00
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST gidsetsize;
|
2015-10-30 23:51:59 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1,
|
|
|
|
&gidsetsize);
|
|
|
|
tmpint = tdep->size_old_gid_t * (int) gidsetsize;
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
|
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_setgroups16:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_old_select:
|
2009-04-30 11:04:28 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
unsigned long sz_sel_arg = tdep->size_long + tdep->size_pointer * 4;
|
|
|
|
gdb_byte *a = (gdb_byte *) alloca (sz_sel_arg);
|
|
|
|
CORE_ADDR inp, outp, exp, tvp;
|
|
|
|
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1,
|
|
|
|
&tmpulongest);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
if (target_read_memory (tmpulongest, a, sz_sel_arg))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading memory "
|
|
|
|
"at addr = 0x%s len = %lu.\n",
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg1),
|
|
|
|
sz_sel_arg);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
/* Skip n. */
|
|
|
|
a += tdep->size_long;
|
|
|
|
inp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
|
|
|
|
a += tdep->size_pointer;
|
|
|
|
outp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
|
|
|
|
a += tdep->size_pointer;
|
|
|
|
exp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
|
|
|
|
a += tdep->size_pointer;
|
|
|
|
tvp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
|
|
|
|
if (inp)
|
|
|
|
if (record_full_arch_list_add_mem (inp, tdep->size_fd_set))
|
|
|
|
return -1;
|
|
|
|
if (outp)
|
|
|
|
if (record_full_arch_list_add_mem (outp, tdep->size_fd_set))
|
|
|
|
return -1;
|
|
|
|
if (exp)
|
|
|
|
if (record_full_arch_list_add_mem (exp, tdep->size_fd_set))
|
|
|
|
return -1;
|
|
|
|
if (tvp)
|
|
|
|
if (record_full_arch_list_add_mem (tvp, tdep->size_timeval))
|
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_symlink:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_uselib:
|
|
|
|
case gdb_sys_swapon:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_reboot:
|
2016-04-12 23:49:32 +08:00
|
|
|
if (yquery (_("The next instruction is syscall reboot. "
|
|
|
|
"It will restart the computer. "
|
|
|
|
"Do you want to stop the program?")))
|
|
|
|
return 1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_old_readdir:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_old_dirent))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_old_mmap:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_munmap:
|
2009-04-30 11:04:28 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
ULONGEST len;
|
2009-08-10 11:04:45 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1,
|
|
|
|
&tmpulongest);
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
|
|
|
|
if (record_full_memory_query)
|
|
|
|
{
|
2016-04-12 23:49:32 +08:00
|
|
|
if (yquery (_("\
|
2010-06-22 10:15:46 +08:00
|
|
|
The next instruction is syscall munmap.\n\
|
|
|
|
It will free the memory addr = 0x%s len = %u.\n\
|
|
|
|
It will make record target cannot record some memory change.\n\
|
|
|
|
Do you want to stop the program?"),
|
2016-04-12 23:49:32 +08:00
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg1), (int) len))
|
2016-03-17 16:58:57 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_truncate:
|
|
|
|
case gdb_sys_ftruncate:
|
|
|
|
case gdb_sys_fchmod:
|
|
|
|
case gdb_sys_fchown16:
|
|
|
|
case gdb_sys_getpriority:
|
|
|
|
case gdb_sys_setpriority:
|
|
|
|
case gdb_sys_ni_syscall98:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case gdb_sys_statfs:
|
|
|
|
case gdb_sys_fstatfs:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_statfs))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ioperm:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_socket:
|
|
|
|
case gdb_sys_sendto:
|
|
|
|
case gdb_sys_sendmsg:
|
|
|
|
case gdb_sys_shutdown:
|
|
|
|
case gdb_sys_bind:
|
|
|
|
case gdb_sys_connect:
|
|
|
|
case gdb_sys_listen:
|
|
|
|
case gdb_sys_setsockopt:
|
2009-08-10 11:04:45 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_accept:
|
|
|
|
case gdb_sys_getsockname:
|
|
|
|
case gdb_sys_getpeername:
|
2009-08-10 11:04:45 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
ULONGEST len;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
|
|
|
|
if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
|
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_recvfrom:
|
2009-08-10 11:04:45 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
ULONGEST len;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg5, &len);
|
|
|
|
if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
|
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
}
|
2011-03-01 02:10:30 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_recvmsg:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (record_linux_msghdr (regcache, tdep, tmpulongest))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_socketpair:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getsockopt:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST optvalp;
|
|
|
|
gdb_byte *optlenp = (gdb_byte *) alloca (tdep->size_int);
|
|
|
|
|
|
|
|
if (target_read_memory ((CORE_ADDR) tmpulongest, optlenp,
|
|
|
|
tdep->size_int))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s "
|
|
|
|
"len = %d.\n",
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg5),
|
|
|
|
tdep->size_int);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg4, &optvalp);
|
|
|
|
tmpint = (int) extract_signed_integer (optlenp, tdep->size_int,
|
|
|
|
byte_order);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) optvalp, tmpint))
|
|
|
|
return -1;
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_socketcall:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
switch (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
case RECORD_SYS_SOCKET:
|
|
|
|
case RECORD_SYS_BIND:
|
|
|
|
case RECORD_SYS_CONNECT:
|
|
|
|
case RECORD_SYS_LISTEN:
|
|
|
|
break;
|
|
|
|
case RECORD_SYS_ACCEPT:
|
|
|
|
case RECORD_SYS_GETSOCKNAME:
|
|
|
|
case RECORD_SYS_GETPEERNAME:
|
|
|
|
{
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2,
|
|
|
|
&tmpulongest);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
|
|
|
|
ULONGEST len;
|
|
|
|
|
|
|
|
tmpulongest += tdep->size_ulong;
|
|
|
|
if (target_read_memory ((CORE_ADDR) tmpulongest, a,
|
|
|
|
tdep->size_ulong * 2))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s len = %d.\n",
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg2),
|
|
|
|
tdep->size_ulong * 2);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
tmpulongest = extract_unsigned_integer (a,
|
|
|
|
tdep->size_ulong,
|
|
|
|
byte_order);
|
|
|
|
len = extract_unsigned_integer (a + tdep->size_ulong,
|
|
|
|
tdep->size_ulong, byte_order);
|
|
|
|
if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RECORD_SYS_SOCKETPAIR:
|
|
|
|
{
|
|
|
|
gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong);
|
|
|
|
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2,
|
|
|
|
&tmpulongest);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
tmpulongest += tdep->size_ulong * 3;
|
|
|
|
if (target_read_memory ((CORE_ADDR) tmpulongest, a,
|
|
|
|
tdep->size_ulong))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s len = %d.\n",
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg2),
|
|
|
|
tdep->size_ulong);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
tmpaddr
|
|
|
|
= (CORE_ADDR) extract_unsigned_integer (a, tdep->size_ulong,
|
|
|
|
byte_order);
|
|
|
|
if (record_full_arch_list_add_mem (tmpaddr, tdep->size_int))
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case RECORD_SYS_SEND:
|
|
|
|
case RECORD_SYS_SENDTO:
|
|
|
|
break;
|
|
|
|
case RECORD_SYS_RECVFROM:
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2,
|
|
|
|
&tmpulongest);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
|
|
|
|
ULONGEST len;
|
|
|
|
|
|
|
|
tmpulongest += tdep->size_ulong * 4;
|
|
|
|
if (target_read_memory ((CORE_ADDR) tmpulongest, a,
|
|
|
|
tdep->size_ulong * 2))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s len = %d.\n",
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg2),
|
|
|
|
tdep->size_ulong * 2);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
|
|
|
|
byte_order);
|
|
|
|
len = extract_unsigned_integer (a + tdep->size_ulong,
|
|
|
|
tdep->size_ulong, byte_order);
|
|
|
|
if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
|
|
|
|
return -1;
|
|
|
|
}
|
2018-04-06 05:37:56 +08:00
|
|
|
break;
|
2016-03-17 16:58:57 +08:00
|
|
|
case RECORD_SYS_RECV:
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2,
|
|
|
|
&tmpulongest);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
|
|
|
|
|
|
|
|
tmpulongest += tdep->size_ulong;
|
|
|
|
if (target_read_memory ((CORE_ADDR) tmpulongest, a,
|
|
|
|
tdep->size_ulong))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s len = %d.\n",
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg2),
|
|
|
|
tdep->size_ulong);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
|
|
|
|
byte_order);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
a += tdep->size_ulong;
|
|
|
|
tmpint = (int) extract_unsigned_integer (a, tdep->size_ulong,
|
|
|
|
byte_order);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
tmpint))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case RECORD_SYS_SHUTDOWN:
|
|
|
|
case RECORD_SYS_SETSOCKOPT:
|
|
|
|
break;
|
|
|
|
case RECORD_SYS_GETSOCKOPT:
|
|
|
|
{
|
|
|
|
gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
|
|
|
|
gdb_byte *av = (gdb_byte *) alloca (tdep->size_int);
|
|
|
|
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2,
|
|
|
|
&tmpulongest);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
tmpulongest += tdep->size_ulong * 3;
|
|
|
|
if (target_read_memory ((CORE_ADDR) tmpulongest, a,
|
|
|
|
tdep->size_ulong * 2))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s len = %d.\n",
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg2),
|
|
|
|
tdep->size_ulong * 2);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
tmpulongest = extract_unsigned_integer (a + tdep->size_ulong,
|
|
|
|
tdep->size_ulong,
|
|
|
|
byte_order);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
if (target_read_memory ((CORE_ADDR) tmpulongest, av,
|
|
|
|
tdep->size_int))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s "
|
|
|
|
"len = %d.\n",
|
|
|
|
phex_nz (tmpulongest,
|
|
|
|
tdep->size_ulong),
|
|
|
|
tdep->size_int);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
tmpaddr
|
|
|
|
= (CORE_ADDR) extract_unsigned_integer (a,
|
|
|
|
tdep->size_ulong,
|
|
|
|
byte_order);
|
|
|
|
tmpint = (int) extract_unsigned_integer (av,
|
|
|
|
tdep->size_int,
|
|
|
|
byte_order);
|
|
|
|
if (record_full_arch_list_add_mem (tmpaddr, tmpint))
|
|
|
|
return -1;
|
|
|
|
a += tdep->size_ulong;
|
|
|
|
tmpaddr
|
|
|
|
= (CORE_ADDR) extract_unsigned_integer (a,
|
|
|
|
tdep->size_ulong,
|
|
|
|
byte_order);
|
|
|
|
if (record_full_arch_list_add_mem (tmpaddr,
|
2013-03-11 16:45:54 +08:00
|
|
|
tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case RECORD_SYS_SENDMSG:
|
|
|
|
break;
|
|
|
|
case RECORD_SYS_RECVMSG:
|
|
|
|
{
|
|
|
|
gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong);
|
|
|
|
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2,
|
|
|
|
&tmpulongest);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
tmpulongest += tdep->size_ulong;
|
|
|
|
if (target_read_memory ((CORE_ADDR) tmpulongest, a,
|
|
|
|
tdep->size_ulong))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s len = %d.\n",
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg2),
|
|
|
|
tdep->size_ulong);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
|
|
|
|
byte_order);
|
|
|
|
if (record_linux_msghdr (regcache, tdep, tmpulongest))
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stderr,
|
|
|
|
_("Process record and replay target "
|
|
|
|
"doesn't support socketcall call 0x%s\n"),
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg1));
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_syslog:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_setitimer:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_itimerval))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getitimer:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_itimerval))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_newstat:
|
|
|
|
case gdb_sys_newlstat:
|
|
|
|
case gdb_sys_newfstat:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_stat))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2015-10-30 23:52:00 +08:00
|
|
|
case gdb_sys_newfstatat:
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
|
|
|
tdep->size_stat))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2015-10-30 23:52:00 +08:00
|
|
|
break;
|
|
|
|
|
[gdb/record] Handle statx system call
When running test-case gdb.reverse/fstatat-reverse.exp with target board
unix/-m32 on openSUSE Tumbleweed, I run into:
...
(gdb) PASS: gdb.reverse/fstatat-reverse.exp: set breakpoint at marker2
continue^M
Continuing.^M
Process record and replay target doesn't support syscall number 383^M
Process record: failed to record execution log.^M
^M
Program stopped.^M
0xf7fc5555 in __kernel_vsyscall ()^M
(gdb) FAIL: gdb.reverse/fstatat-reverse.exp: continue to breakpoint: marker2
...
The problems is that while with native we're trying to record these syscalls
(showing strace output):
...
openat(AT_FDCWD, "/", O_RDONLY|O_PATH) = 3
newfstatat(3, ".", {st_mode=S_IFDIR|0755, st_size=146, ...}, 0) = 0
...
with unix/-m32 we have instead:
...
openat(AT_FDCWD, "/", O_RDONLY|O_PATH) = 3
statx(3, ".", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, \
{stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=STATX_ATTR_MOUNT_ROOT, \
stx_mode=S_IFDIR|0755, stx_size=146, ...}) = 0
...
and statx is not supported.
Fix this by adding support for recording syscall statx.
Tested on x86_64-linux.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28461
2022-05-11 14:35:33 +08:00
|
|
|
case gdb_sys_statx:
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 256))
|
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_uname:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1,
|
|
|
|
tdep->size_old_utsname))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_iopl:
|
|
|
|
case gdb_sys_vhangup:
|
|
|
|
case gdb_sys_ni_syscall112:
|
|
|
|
case gdb_sys_vm86old:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_wait4:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg4, tdep->size_rusage))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_swapoff:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sysinfo:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_sysinfo))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_shmget:
|
|
|
|
case gdb_sys_semget:
|
|
|
|
case gdb_sys_semop:
|
|
|
|
case gdb_sys_msgget:
|
2009-08-10 11:04:45 +08:00
|
|
|
/* XXX maybe need do some record works with sys_shmdt. */
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_shmdt:
|
|
|
|
case gdb_sys_msgsnd:
|
|
|
|
case gdb_sys_semtimedop:
|
2009-08-10 11:04:45 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_shmat:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_ulong))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_shmctl:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_shmid_ds))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
/* XXX sys_semctl 525 still not supported. */
|
2009-08-10 11:04:45 +08:00
|
|
|
/* sys_semctl */
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_msgrcv:
|
2009-08-10 11:04:45 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
LONGEST l;
|
|
|
|
|
|
|
|
regcache_raw_read_signed (regcache, tdep->arg3, &l);
|
|
|
|
tmpint = l + tdep->size_long;
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tmpint))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_msgctl:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_msqid_ds))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ipc:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
tmpulongest &= 0xffff;
|
|
|
|
switch (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
case RECORD_SEMOP:
|
|
|
|
case RECORD_SEMGET:
|
|
|
|
case RECORD_SEMTIMEDOP:
|
|
|
|
case RECORD_MSGSND:
|
|
|
|
case RECORD_MSGGET:
|
2009-09-09 06:50:59 +08:00
|
|
|
/* XXX maybe need do some record works with RECORD_SHMDT. */
|
2016-03-17 16:58:57 +08:00
|
|
|
case RECORD_SHMDT:
|
|
|
|
case RECORD_SHMGET:
|
|
|
|
break;
|
|
|
|
case RECORD_MSGRCV:
|
|
|
|
{
|
|
|
|
LONGEST second;
|
|
|
|
|
|
|
|
regcache_raw_read_signed (regcache, tdep->arg3, &second);
|
|
|
|
tmpint = (int) second + tdep->size_long;
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg5, tmpint))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case RECORD_MSGCTL:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg5,
|
|
|
|
tdep->size_msqid_ds))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
case RECORD_SHMAT:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_ulong))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
case RECORD_SHMCTL:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg5,
|
|
|
|
tdep->size_shmid_ds))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
default:
|
2009-09-09 06:50:59 +08:00
|
|
|
/* XXX RECORD_SEMCTL still not supported. */
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stderr,
|
|
|
|
_("Process record and replay target doesn't "
|
|
|
|
"support ipc number %s\n"),
|
|
|
|
pulongest (tmpulongest));
|
2016-03-17 16:58:57 +08:00
|
|
|
break;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_fsync:
|
|
|
|
case gdb_sys_sigreturn:
|
|
|
|
case gdb_sys_clone:
|
|
|
|
case gdb_sys_setdomainname:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_newuname:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1,
|
|
|
|
tdep->size_new_utsname))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_modify_ldt:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest == 0 || tmpulongest == 2)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
ULONGEST bytecount;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &bytecount);
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, (int) bytecount))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_adjtimex:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_timex))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_mprotect:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sigprocmask:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_old_sigset_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ni_syscall127:
|
|
|
|
case gdb_sys_init_module:
|
|
|
|
case gdb_sys_delete_module:
|
|
|
|
case gdb_sys_ni_syscall130:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_quotactl:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
switch (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
case RECORD_Q_GETFMT:
|
|
|
|
/* __u32 */
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4, 4))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
case RECORD_Q_GETINFO:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4,
|
|
|
|
tdep->size_mem_dqinfo))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
case RECORD_Q_GETQUOTA:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4,
|
|
|
|
tdep->size_if_dqblk))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
case RECORD_Q_XGETQSTAT:
|
|
|
|
case RECORD_Q_XGETQUOTA:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4,
|
|
|
|
tdep->size_fs_quota_stat))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getpgid:
|
|
|
|
case gdb_sys_fchdir:
|
|
|
|
case gdb_sys_bdflush:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sysfs:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest == 2)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2009-09-09 06:50:59 +08:00
|
|
|
/*XXX the size of memory is not very clear. */
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, 10))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_personality:
|
|
|
|
case gdb_sys_ni_syscall137:
|
|
|
|
case gdb_sys_setfsuid16:
|
|
|
|
case gdb_sys_setfsgid16:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_llseek:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_loff_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getdents:
|
gdb/linux-record: Fix readdir and getdents handling
getdents buffer size is given in bytes, not dirent entries (which have
variable size anyway). We don't need size_dirent and size_dirent64 for
this reason.
readdir, on the other hand, needs size of old_linux_dirent, which is
a somewhat different structure. Accordingly, rename size_dirent
to size_old_dirent.
gdb/ChangeLog:
* aarch64-linux-tdep.c (aarch64_linux_init_abi): Remove
size_dirent{,64}, add size_old_dirent.
* amd64-linux-tdep.c (amd64_linux_init_abi): Remove size_dirent{,64},
add size_old_dirent.
(amd64_x32_linux_init_abi): Remove size_dirent{,64}, add
size_old_dirent.
* arm-linux-tdep.c (arm_linux_init_abi): Remove size_dirent{,64},
add size_old_dirent.
* i386-linux-tdep.c (i386_linux_init_abi): Remove size_dirent{,64},
add size_old_dirent.
* linux-record.c (record_linux_system_call): Fix handling of readdir
and getdents{,64}.
* linux-record.h (struct linux_record_tdep): Remove size_dirent{,64},
add size_old_dirent.
* ppc-linux-tdep.c (ppc_init_linux_record_tdep): Remove
size_dirent{,64}, add size_old_dirent.
2015-10-30 23:51:58 +08:00
|
|
|
case gdb_sys_getdents64:
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
|
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tmpulongest))
|
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_select:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_fd_set)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg3, tdep->size_fd_set)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg4, tdep->size_fd_set)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg5, tdep->size_timeval))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_flock:
|
|
|
|
case gdb_sys_msync:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_readv:
|
2009-04-30 11:04:28 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
ULONGEST vec, vlen;
|
|
|
|
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &vec);
|
|
|
|
if (vec)
|
|
|
|
{
|
|
|
|
gdb_byte *iov = (gdb_byte *) alloca (tdep->size_iovec);
|
|
|
|
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &vlen);
|
|
|
|
for (tmpulongest = 0; tmpulongest < vlen; tmpulongest++)
|
|
|
|
{
|
|
|
|
if (target_read_memory ((CORE_ADDR) vec, iov,
|
|
|
|
tdep->size_iovec))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading "
|
|
|
|
"memory at addr = 0x%s len = %d.\n",
|
|
|
|
OUTPUT_REG (vec, tdep->arg2),
|
|
|
|
tdep->size_iovec);
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
tmpaddr
|
|
|
|
= (CORE_ADDR) extract_unsigned_integer (iov,
|
|
|
|
tdep->size_pointer,
|
|
|
|
byte_order);
|
|
|
|
tmpint
|
|
|
|
= (int) extract_unsigned_integer (iov + tdep->size_pointer,
|
|
|
|
tdep->size_size_t,
|
|
|
|
byte_order);
|
|
|
|
if (record_full_arch_list_add_mem (tmpaddr, tmpint))
|
|
|
|
return -1;
|
|
|
|
vec += tdep->size_iovec;
|
|
|
|
}
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_writev:
|
|
|
|
case gdb_sys_getsid:
|
|
|
|
case gdb_sys_fdatasync:
|
|
|
|
case gdb_sys_sysctl:
|
|
|
|
case gdb_sys_mlock:
|
|
|
|
case gdb_sys_munlock:
|
|
|
|
case gdb_sys_mlockall:
|
|
|
|
case gdb_sys_munlockall:
|
|
|
|
case gdb_sys_sched_setparam:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case gdb_sys_sched_getparam:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sched_setscheduler:
|
|
|
|
case gdb_sys_sched_getscheduler:
|
|
|
|
case gdb_sys_sched_yield:
|
|
|
|
case gdb_sys_sched_get_priority_max:
|
|
|
|
case gdb_sys_sched_get_priority_min:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sched_rr_get_interval:
|
|
|
|
case gdb_sys_nanosleep:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_timespec))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_mremap:
|
|
|
|
case gdb_sys_setresuid16:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getresuid16:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_old_uid_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg2,
|
|
|
|
tdep->size_old_uid_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_old_uid_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_vm86:
|
|
|
|
case gdb_sys_ni_syscall167:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_poll:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST nfds;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
tdep->size_pollfd * nfds))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_nfsservctl:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest == 7 || tmpulongest == 8)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
int rsize;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
if (tmpulongest == 7)
|
|
|
|
rsize = tdep->size_NFS_FHSIZE;
|
|
|
|
else
|
|
|
|
rsize = tdep->size_knfsd_fh;
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, rsize))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_setresgid16:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getresgid16:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_old_gid_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg2,
|
|
|
|
tdep->size_old_gid_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_old_gid_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_prctl:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
switch (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
case 2:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
case 16:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2,
|
|
|
|
tdep->size_TASK_COMM_LEN))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_rt_sigreturn:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_rt_sigaction:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_sigaction))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_rt_sigprocmask:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_sigset_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_rt_sigpending:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST sigsetsize;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2,&sigsetsize);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) sigsetsize))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_rt_sigtimedwait:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_siginfo_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_rt_sigqueueinfo:
|
|
|
|
case gdb_sys_rt_sigsuspend:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_pread64:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST count;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3,&count);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) count))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_pwrite64:
|
|
|
|
case gdb_sys_chown16:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getcwd:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST size;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &size);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) size))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_capget:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2,
|
|
|
|
tdep->size_cap_user_data_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_capset:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sigaltstack:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_stack_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sendfile:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_off_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ni_syscall188:
|
|
|
|
case gdb_sys_ni_syscall189:
|
|
|
|
case gdb_sys_vfork:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getrlimit:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_rlimit))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_mmap2:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_truncate64:
|
|
|
|
case gdb_sys_ftruncate64:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_stat64:
|
|
|
|
case gdb_sys_lstat64:
|
|
|
|
case gdb_sys_fstat64:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_stat64))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_lchown:
|
|
|
|
case gdb_sys_getuid:
|
|
|
|
case gdb_sys_getgid:
|
|
|
|
case gdb_sys_geteuid:
|
|
|
|
case gdb_sys_getegid:
|
|
|
|
case gdb_sys_setreuid:
|
|
|
|
case gdb_sys_setregid:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getgroups:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST gidsetsize;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1,
|
|
|
|
&gidsetsize);
|
|
|
|
tmpint = tdep->size_gid_t * (int) gidsetsize;
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
|
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_setgroups:
|
|
|
|
case gdb_sys_fchown:
|
|
|
|
case gdb_sys_setresuid:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getresuid:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_uid_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg2, tdep->size_uid_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg3, tdep->size_uid_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_setresgid:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getresgid:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_gid_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg2, tdep->size_gid_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg3, tdep->size_gid_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_chown:
|
|
|
|
case gdb_sys_setuid:
|
|
|
|
case gdb_sys_setgid:
|
|
|
|
case gdb_sys_setfsuid:
|
|
|
|
case gdb_sys_setfsgid:
|
|
|
|
case gdb_sys_pivot_root:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_mincore:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_PAGE_SIZE))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_madvise:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_fcntl64:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest == tdep->fcntl_F_GETLK64)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_flock64))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-08-10 11:04:45 +08:00
|
|
|
else if (tmpulongest != tdep->fcntl_F_SETLK64
|
2016-03-17 16:58:57 +08:00
|
|
|
&& tmpulongest != tdep->fcntl_F_SETLKW64)
|
|
|
|
{
|
|
|
|
goto sys_fcntl;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ni_syscall222:
|
|
|
|
case gdb_sys_ni_syscall223:
|
|
|
|
case gdb_sys_gettid:
|
|
|
|
case gdb_sys_readahead:
|
|
|
|
case gdb_sys_setxattr:
|
|
|
|
case gdb_sys_lsetxattr:
|
|
|
|
case gdb_sys_fsetxattr:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case gdb_sys_getxattr:
|
|
|
|
case gdb_sys_lgetxattr:
|
|
|
|
case gdb_sys_fgetxattr:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST size;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg4, &size);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) size))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_listxattr:
|
|
|
|
case gdb_sys_llistxattr:
|
|
|
|
case gdb_sys_flistxattr:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST size;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) size))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_removexattr:
|
|
|
|
case gdb_sys_lremovexattr:
|
|
|
|
case gdb_sys_fremovexattr:
|
|
|
|
case gdb_sys_tkill:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sendfile64:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_loff_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_futex:
|
|
|
|
case gdb_sys_sched_setaffinity:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sched_getaffinity:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST len;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) len))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_set_thread_area:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_get_thread_area:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_user_desc))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_io_setup:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_long))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_io_destroy:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_io_getevents:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST nr;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &nr);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
nr * tdep->size_io_event))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_io_submit:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST nr, i;
|
|
|
|
gdb_byte *iocbp;
|
|
|
|
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &nr);
|
|
|
|
iocbp = (gdb_byte *) alloca (nr * tdep->size_pointer);
|
|
|
|
if (target_read_memory ((CORE_ADDR) tmpulongest, iocbp,
|
|
|
|
nr * tdep->size_pointer))
|
|
|
|
{
|
|
|
|
if (record_debug)
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stdlog,
|
|
|
|
"Process record: error reading memory "
|
|
|
|
"at addr = 0x%s len = %u.\n",
|
|
|
|
OUTPUT_REG (tmpulongest, tdep->arg2),
|
|
|
|
(int) (nr * tdep->size_pointer));
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
for (i = 0; i < nr; i++)
|
|
|
|
{
|
|
|
|
tmpaddr
|
|
|
|
= (CORE_ADDR) extract_unsigned_integer (iocbp,
|
|
|
|
tdep->size_pointer,
|
|
|
|
byte_order);
|
|
|
|
if (record_full_arch_list_add_mem (tmpaddr, tdep->size_iocb))
|
|
|
|
return -1;
|
|
|
|
iocbp += tdep->size_pointer;
|
|
|
|
}
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_io_cancel:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_io_event))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_fadvise64:
|
|
|
|
case gdb_sys_ni_syscall251:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_exit_group:
|
2016-04-12 23:49:32 +08:00
|
|
|
if (yquery (_("The next instruction is syscall exit_group. "
|
|
|
|
"It will make the program exit. "
|
|
|
|
"Do you want to stop the program?")))
|
|
|
|
return 1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_lookup_dcookie:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST len;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) len))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_epoll_create:
|
|
|
|
case gdb_sys_epoll_ctl:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_epoll_wait:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST maxevents;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(maxevents
|
|
|
|
* tdep->size_epoll_event)))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_remap_file_pages:
|
|
|
|
case gdb_sys_set_tid_address:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_timer_create:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_timer_settime:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_itimerspec))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_timer_gettime:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_itimerspec))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_timer_getoverrun:
|
|
|
|
case gdb_sys_timer_delete:
|
|
|
|
case gdb_sys_clock_settime:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_clock_gettime:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_timespec))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2024-11-14 05:41:35 +08:00
|
|
|
case gdb_sys_clock_gettime64:
|
|
|
|
/* Size of struct __timespec64 is 16. */
|
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, 16))
|
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_clock_getres:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_timespec))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_clock_nanosleep:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_timespec))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_statfs64:
|
|
|
|
case gdb_sys_fstatfs64:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_statfs64))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_tgkill:
|
|
|
|
case gdb_sys_utimes:
|
|
|
|
case gdb_sys_fadvise64_64:
|
|
|
|
case gdb_sys_ni_syscall273:
|
|
|
|
case gdb_sys_mbind:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_get_mempolicy:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST maxnode;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &maxnode);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
maxnode * tdep->size_long))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_set_mempolicy:
|
|
|
|
case gdb_sys_mq_open:
|
|
|
|
case gdb_sys_mq_unlink:
|
|
|
|
case gdb_sys_mq_timedsend:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_mq_timedreceive:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST msg_len;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &msg_len);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) msg_len))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_mq_notify:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_mq_getsetattr:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_mq_attr))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_kexec_load:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_waitid:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_siginfo_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg5, tdep->size_rusage))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ni_syscall285:
|
|
|
|
case gdb_sys_add_key:
|
|
|
|
case gdb_sys_request_key:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_keyctl:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest == 6 || tmpulongest == 11)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3,
|
|
|
|
&tmpulongest);
|
|
|
|
if (tmpulongest)
|
|
|
|
{
|
|
|
|
ULONGEST buflen;
|
|
|
|
|
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg4, &buflen);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) buflen))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ioprio_set:
|
|
|
|
case gdb_sys_ioprio_get:
|
|
|
|
case gdb_sys_inotify_init:
|
|
|
|
case gdb_sys_inotify_add_watch:
|
|
|
|
case gdb_sys_inotify_rm_watch:
|
|
|
|
case gdb_sys_migrate_pages:
|
|
|
|
case gdb_sys_openat:
|
|
|
|
case gdb_sys_mkdirat:
|
|
|
|
case gdb_sys_mknodat:
|
|
|
|
case gdb_sys_fchownat:
|
|
|
|
case gdb_sys_futimesat:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case gdb_sys_fstatat64:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_stat64))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_unlinkat:
|
|
|
|
case gdb_sys_renameat:
|
|
|
|
case gdb_sys_linkat:
|
|
|
|
case gdb_sys_symlinkat:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_readlinkat:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST bufsiz;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg4, &bufsiz);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
(int) bufsiz))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_fchmodat:
|
|
|
|
case gdb_sys_faccessat:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_pselect6:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_fd_set)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg3, tdep->size_fd_set)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg4, tdep->size_fd_set)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg5, tdep->size_timespec))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_ppoll:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST nfds;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
tdep->size_pollfd * nfds))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_timespec))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_unshare:
|
|
|
|
case gdb_sys_set_robust_list:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_get_robust_list:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg3, tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_splice:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_loff_t)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg4, tdep->size_loff_t))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_sync_file_range:
|
|
|
|
case gdb_sys_tee:
|
|
|
|
case gdb_sys_vmsplice:
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_move_pages:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST nr_pages;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &nr_pages);
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
|
2013-03-11 16:45:54 +08:00
|
|
|
nr_pages * tdep->size_int))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_getcpu:
|
2016-03-17 16:58:57 +08:00
|
|
|
if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg2, tdep->size_int)
|
|
|
|
|| record_mem_at_reg (regcache, tdep->arg3,
|
|
|
|
tdep->size_ulong * 2))
|
2016-03-17 16:58:57 +08:00
|
|
|
return -1;
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2009-09-09 06:50:59 +08:00
|
|
|
case gdb_sys_epoll_pwait:
|
2009-08-10 11:04:45 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
|
|
|
|
if (tmpulongest)
|
2016-03-17 16:58:57 +08:00
|
|
|
{
|
|
|
|
ULONGEST maxevents;
|
2010-05-15 07:41:05 +08:00
|
|
|
|
2016-03-17 16:58:57 +08:00
|
|
|
regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
|
|
|
|
tmpint = (int) maxevents * tdep->size_epoll_event;
|
|
|
|
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
|
|
|
|
return -1;
|
|
|
|
}
|
2009-04-30 11:04:28 +08:00
|
|
|
break;
|
|
|
|
|
2016-02-19 23:51:03 +08:00
|
|
|
case gdb_sys_fallocate:
|
|
|
|
case gdb_sys_eventfd2:
|
|
|
|
case gdb_sys_epoll_create1:
|
|
|
|
case gdb_sys_dup3:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case gdb_sys_inotify_init1:
|
|
|
|
break;
|
|
|
|
|
2009-04-30 11:04:28 +08:00
|
|
|
default:
|
2022-01-03 02:46:15 +08:00
|
|
|
gdb_printf (gdb_stderr,
|
|
|
|
_("Process record and replay target doesn't "
|
|
|
|
"support syscall number %d\n"), syscall);
|
2009-04-30 11:04:28 +08:00
|
|
|
return -1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|