mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-09 08:17:53 -06:00
linux-user: Make cpu_env accessible in strace.c
Variable "cpu_env" is used in file "syscall.c" to store the information about the cpu environment. This variable is used because values of some syscalls can vary between cpu architectures. This patch makes the "cpu_env" accessible in "strace.c" so it can enable aproppriate "-strace" argument printing for these syscalls. This will be a useful addition for future "-strace" implementation in QEMU. Implementation notes: Functions "print_syscall()" and "print_syscall_ret()" which are stated and defined in "qemu.h" and "strace.c" respectively are used to print syscall arguments before and after syscall execution. These functions were changed with addition of a new argument "void *cpu_env". Strucute "struct syscallname" in "strace.c" is used to store the information about syscalls. Fields "call" and "result" represent pointers to functions which are used to print syscall arguments before and after execution. These fields were also changed with addition of a new "void *" argumetn. Also, all defined "print_*" and "print_syscall_ret*" functions in "strace.c" were changed to have the new "void *cpu_env". This was done to not cause build errors (even though none of these functions use this argument). Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-2-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
913b03c264
commit
e400e11941
3 changed files with 247 additions and 241 deletions
|
@ -400,10 +400,10 @@ extern long safe_syscall_base(int *pending, long number, ...);
|
||||||
int host_to_target_waitstatus(int status);
|
int host_to_target_waitstatus(int status);
|
||||||
|
|
||||||
/* strace.c */
|
/* strace.c */
|
||||||
void print_syscall(int num,
|
void print_syscall(void *cpu_env, int num,
|
||||||
abi_long arg1, abi_long arg2, abi_long arg3,
|
abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
abi_long arg4, abi_long arg5, abi_long arg6);
|
abi_long arg4, abi_long arg5, abi_long arg6);
|
||||||
void print_syscall_ret(int num, abi_long ret,
|
void print_syscall_ret(void *cpu_env, int num, abi_long ret,
|
||||||
abi_long arg1, abi_long arg2, abi_long arg3,
|
abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
abi_long arg4, abi_long arg5, abi_long arg6);
|
abi_long arg4, abi_long arg5, abi_long arg6);
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,10 +16,10 @@ struct syscallname {
|
||||||
int nr;
|
int nr;
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *format;
|
const char *format;
|
||||||
void (*call)(const struct syscallname *,
|
void (*call)(void *, const struct syscallname *,
|
||||||
abi_long, abi_long, abi_long,
|
abi_long, abi_long, abi_long,
|
||||||
abi_long, abi_long, abi_long);
|
abi_long, abi_long, abi_long);
|
||||||
void (*result)(const struct syscallname *, abi_long,
|
void (*result)(void *, const struct syscallname *, abi_long,
|
||||||
abi_long, abi_long, abi_long,
|
abi_long, abi_long, abi_long,
|
||||||
abi_long, abi_long, abi_long);
|
abi_long, abi_long, abi_long);
|
||||||
};
|
};
|
||||||
|
@ -638,7 +638,7 @@ print_clockid(int clockid, int last)
|
||||||
/* select */
|
/* select */
|
||||||
#ifdef TARGET_NR__newselect
|
#ifdef TARGET_NR__newselect
|
||||||
static void
|
static void
|
||||||
print_newselect(const struct syscallname *name,
|
print_newselect(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg1, abi_long arg2, abi_long arg3,
|
abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
abi_long arg4, abi_long arg5, abi_long arg6)
|
abi_long arg4, abi_long arg5, abi_long arg6)
|
||||||
{
|
{
|
||||||
|
@ -656,7 +656,7 @@ print_newselect(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_semctl
|
#ifdef TARGET_NR_semctl
|
||||||
static void
|
static void
|
||||||
print_semctl(const struct syscallname *name,
|
print_semctl(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg1, abi_long arg2, abi_long arg3,
|
abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
abi_long arg4, abi_long arg5, abi_long arg6)
|
abi_long arg4, abi_long arg5, abi_long arg6)
|
||||||
{
|
{
|
||||||
|
@ -668,7 +668,7 @@ print_semctl(const struct syscallname *name,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_execve(const struct syscallname *name,
|
print_execve(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg1, abi_long arg2, abi_long arg3,
|
abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
abi_long arg4, abi_long arg5, abi_long arg6)
|
abi_long arg4, abi_long arg5, abi_long arg6)
|
||||||
{
|
{
|
||||||
|
@ -701,7 +701,7 @@ print_execve(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_ipc
|
#ifdef TARGET_NR_ipc
|
||||||
static void
|
static void
|
||||||
print_ipc(const struct syscallname *name,
|
print_ipc(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg1, abi_long arg2, abi_long arg3,
|
abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
abi_long arg4, abi_long arg5, abi_long arg6)
|
abi_long arg4, abi_long arg5, abi_long arg6)
|
||||||
{
|
{
|
||||||
|
@ -745,9 +745,10 @@ print_syscall_err(abi_long ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_syscall_ret_addr(const struct syscallname *name, abi_long ret,
|
print_syscall_ret_addr(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long ret, abi_long arg0, abi_long arg1,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg2, abi_long arg3, abi_long arg4,
|
||||||
|
abi_long arg5)
|
||||||
{
|
{
|
||||||
if (!print_syscall_err(ret)) {
|
if (!print_syscall_err(ret)) {
|
||||||
qemu_log("0x" TARGET_ABI_FMT_lx, ret);
|
qemu_log("0x" TARGET_ABI_FMT_lx, ret);
|
||||||
|
@ -765,9 +766,10 @@ print_syscall_ret_raw(struct syscallname *name, abi_long ret)
|
||||||
|
|
||||||
#ifdef TARGET_NR__newselect
|
#ifdef TARGET_NR__newselect
|
||||||
static void
|
static void
|
||||||
print_syscall_ret_newselect(const struct syscallname *name, abi_long ret,
|
print_syscall_ret_newselect(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long ret, abi_long arg0, abi_long arg1,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg2, abi_long arg3, abi_long arg4,
|
||||||
|
abi_long arg5)
|
||||||
{
|
{
|
||||||
if (!print_syscall_err(ret)) {
|
if (!print_syscall_err(ret)) {
|
||||||
qemu_log(" = 0x" TARGET_ABI_FMT_lx " (", ret);
|
qemu_log(" = 0x" TARGET_ABI_FMT_lx " (", ret);
|
||||||
|
@ -794,9 +796,10 @@ print_syscall_ret_newselect(const struct syscallname *name, abi_long ret,
|
||||||
#define TARGET_TIME_ERROR 5 /* clock not synchronized */
|
#define TARGET_TIME_ERROR 5 /* clock not synchronized */
|
||||||
#ifdef TARGET_NR_adjtimex
|
#ifdef TARGET_NR_adjtimex
|
||||||
static void
|
static void
|
||||||
print_syscall_ret_adjtimex(const struct syscallname *name, abi_long ret,
|
print_syscall_ret_adjtimex(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long ret, abi_long arg0, abi_long arg1,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg2, abi_long arg3, abi_long arg4,
|
||||||
|
abi_long arg5)
|
||||||
{
|
{
|
||||||
if (!print_syscall_err(ret)) {
|
if (!print_syscall_err(ret)) {
|
||||||
qemu_log(TARGET_ABI_FMT_ld, ret);
|
qemu_log(TARGET_ABI_FMT_ld, ret);
|
||||||
|
@ -829,9 +832,10 @@ print_syscall_ret_adjtimex(const struct syscallname *name, abi_long ret,
|
||||||
#if defined(TARGET_NR_listxattr) || defined(TARGET_NR_llistxattr) \
|
#if defined(TARGET_NR_listxattr) || defined(TARGET_NR_llistxattr) \
|
||||||
|| defined(TARGGET_NR_flistxattr)
|
|| defined(TARGGET_NR_flistxattr)
|
||||||
static void
|
static void
|
||||||
print_syscall_ret_listxattr(const struct syscallname *name, abi_long ret,
|
print_syscall_ret_listxattr(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long ret, abi_long arg0, abi_long arg1,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg2, abi_long arg3, abi_long arg4,
|
||||||
|
abi_long arg5)
|
||||||
{
|
{
|
||||||
if (!print_syscall_err(ret)) {
|
if (!print_syscall_err(ret)) {
|
||||||
qemu_log(TARGET_ABI_FMT_ld, ret);
|
qemu_log(TARGET_ABI_FMT_ld, ret);
|
||||||
|
@ -860,9 +864,10 @@ print_syscall_ret_listxattr(const struct syscallname *name, abi_long ret,
|
||||||
|
|
||||||
#ifdef TARGET_NR_ioctl
|
#ifdef TARGET_NR_ioctl
|
||||||
static void
|
static void
|
||||||
print_syscall_ret_ioctl(const struct syscallname *name, abi_long ret,
|
print_syscall_ret_ioctl(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long ret, abi_long arg0, abi_long arg1,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg2, abi_long arg3, abi_long arg4,
|
||||||
|
abi_long arg5)
|
||||||
{
|
{
|
||||||
if (!print_syscall_err(ret)) {
|
if (!print_syscall_err(ret)) {
|
||||||
qemu_log(TARGET_ABI_FMT_ld, ret);
|
qemu_log(TARGET_ABI_FMT_ld, ret);
|
||||||
|
@ -1424,7 +1429,7 @@ print_timezone(abi_ulong tz_addr, int last)
|
||||||
|
|
||||||
#ifdef TARGET_NR_accept
|
#ifdef TARGET_NR_accept
|
||||||
static void
|
static void
|
||||||
print_accept(const struct syscallname *name,
|
print_accept(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1438,7 +1443,7 @@ print_accept(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_access
|
#ifdef TARGET_NR_access
|
||||||
static void
|
static void
|
||||||
print_access(const struct syscallname *name,
|
print_access(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1451,7 +1456,7 @@ print_access(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_acct
|
#ifdef TARGET_NR_acct
|
||||||
static void
|
static void
|
||||||
print_acct(const struct syscallname *name,
|
print_acct(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1463,7 +1468,7 @@ print_acct(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_brk
|
#ifdef TARGET_NR_brk
|
||||||
static void
|
static void
|
||||||
print_brk(const struct syscallname *name,
|
print_brk(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1475,7 +1480,7 @@ print_brk(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_chdir
|
#ifdef TARGET_NR_chdir
|
||||||
static void
|
static void
|
||||||
print_chdir(const struct syscallname *name,
|
print_chdir(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1487,7 +1492,7 @@ print_chdir(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_chroot
|
#ifdef TARGET_NR_chroot
|
||||||
static void
|
static void
|
||||||
print_chroot(const struct syscallname *name,
|
print_chroot(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1499,7 +1504,7 @@ print_chroot(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_chmod
|
#ifdef TARGET_NR_chmod
|
||||||
static void
|
static void
|
||||||
print_chmod(const struct syscallname *name,
|
print_chmod(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1512,7 +1517,7 @@ print_chmod(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_chown) || defined(TARGET_NR_lchown)
|
#if defined(TARGET_NR_chown) || defined(TARGET_NR_lchown)
|
||||||
static void
|
static void
|
||||||
print_chown(const struct syscallname *name,
|
print_chown(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1527,7 +1532,7 @@ print_chown(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_clock_adjtime
|
#ifdef TARGET_NR_clock_adjtime
|
||||||
static void
|
static void
|
||||||
print_clock_adjtime(const struct syscallname *name,
|
print_clock_adjtime(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1551,7 +1556,7 @@ static void do_print_clone(unsigned int flags, abi_ulong newsp,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_clone(const struct syscallname *name,
|
print_clone(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg1, abi_long arg2, abi_long arg3,
|
abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
abi_long arg4, abi_long arg5, abi_long arg6)
|
abi_long arg4, abi_long arg5, abi_long arg6)
|
||||||
{
|
{
|
||||||
|
@ -1571,7 +1576,7 @@ print_clone(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_creat
|
#ifdef TARGET_NR_creat
|
||||||
static void
|
static void
|
||||||
print_creat(const struct syscallname *name,
|
print_creat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1584,7 +1589,7 @@ print_creat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_execv
|
#ifdef TARGET_NR_execv
|
||||||
static void
|
static void
|
||||||
print_execv(const struct syscallname *name,
|
print_execv(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1597,7 +1602,7 @@ print_execv(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_faccessat
|
#ifdef TARGET_NR_faccessat
|
||||||
static void
|
static void
|
||||||
print_faccessat(const struct syscallname *name,
|
print_faccessat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1612,7 +1617,7 @@ print_faccessat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_fallocate
|
#ifdef TARGET_NR_fallocate
|
||||||
static void
|
static void
|
||||||
print_fallocate(const struct syscallname *name,
|
print_fallocate(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1632,7 +1637,7 @@ print_fallocate(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_fchmodat
|
#ifdef TARGET_NR_fchmodat
|
||||||
static void
|
static void
|
||||||
print_fchmodat(const struct syscallname *name,
|
print_fchmodat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1647,7 +1652,7 @@ print_fchmodat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_fchownat
|
#ifdef TARGET_NR_fchownat
|
||||||
static void
|
static void
|
||||||
print_fchownat(const struct syscallname *name,
|
print_fchownat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1663,7 +1668,7 @@ print_fchownat(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_fcntl) || defined(TARGET_NR_fcntl64)
|
#if defined(TARGET_NR_fcntl) || defined(TARGET_NR_fcntl64)
|
||||||
static void
|
static void
|
||||||
print_fcntl(const struct syscallname *name,
|
print_fcntl(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1762,7 +1767,7 @@ print_fcntl(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_fgetxattr
|
#ifdef TARGET_NR_fgetxattr
|
||||||
static void
|
static void
|
||||||
print_fgetxattr(const struct syscallname *name,
|
print_fgetxattr(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1777,7 +1782,7 @@ print_fgetxattr(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_flistxattr
|
#ifdef TARGET_NR_flistxattr
|
||||||
static void
|
static void
|
||||||
print_flistxattr(const struct syscallname *name,
|
print_flistxattr(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1791,7 +1796,7 @@ print_flistxattr(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_getxattr) || defined(TARGET_NR_lgetxattr)
|
#if defined(TARGET_NR_getxattr) || defined(TARGET_NR_lgetxattr)
|
||||||
static void
|
static void
|
||||||
print_getxattr(const struct syscallname *name,
|
print_getxattr(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1807,7 +1812,7 @@ print_getxattr(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_listxattr) || defined(TARGET_NR_llistxattr)
|
#if defined(TARGET_NR_listxattr) || defined(TARGET_NR_llistxattr)
|
||||||
static void
|
static void
|
||||||
print_listxattr(const struct syscallname *name,
|
print_listxattr(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1822,7 +1827,7 @@ print_listxattr(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_fremovexattr)
|
#if defined(TARGET_NR_fremovexattr)
|
||||||
static void
|
static void
|
||||||
print_fremovexattr(const struct syscallname *name,
|
print_fremovexattr(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1835,7 +1840,7 @@ print_fremovexattr(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_removexattr) || defined(TARGET_NR_lremovexattr)
|
#if defined(TARGET_NR_removexattr) || defined(TARGET_NR_lremovexattr)
|
||||||
static void
|
static void
|
||||||
print_removexattr(const struct syscallname *name,
|
print_removexattr(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1849,7 +1854,7 @@ print_removexattr(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_futimesat
|
#ifdef TARGET_NR_futimesat
|
||||||
static void
|
static void
|
||||||
print_futimesat(const struct syscallname *name,
|
print_futimesat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1864,7 +1869,7 @@ print_futimesat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_settimeofday
|
#ifdef TARGET_NR_settimeofday
|
||||||
static void
|
static void
|
||||||
print_settimeofday(const struct syscallname *name,
|
print_settimeofday(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1877,7 +1882,7 @@ print_settimeofday(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_link
|
#ifdef TARGET_NR_link
|
||||||
static void
|
static void
|
||||||
print_link(const struct syscallname *name,
|
print_link(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1890,7 +1895,7 @@ print_link(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_linkat
|
#ifdef TARGET_NR_linkat
|
||||||
static void
|
static void
|
||||||
print_linkat(const struct syscallname *name,
|
print_linkat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1906,7 +1911,7 @@ print_linkat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR__llseek
|
#ifdef TARGET_NR__llseek
|
||||||
static void
|
static void
|
||||||
print__llseek(const struct syscallname *name,
|
print__llseek(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1928,7 +1933,7 @@ print__llseek(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_lseek
|
#ifdef TARGET_NR_lseek
|
||||||
static void
|
static void
|
||||||
print_lseek(const struct syscallname *name,
|
print_lseek(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -1959,7 +1964,7 @@ print_lseek(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_socket)
|
#if defined(TARGET_NR_socket)
|
||||||
static void
|
static void
|
||||||
print_socket(const struct syscallname *name,
|
print_socket(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2308,7 +2313,7 @@ static struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_socketcall(const struct syscallname *name,
|
print_socketcall(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2329,7 +2334,7 @@ print_socketcall(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_bind)
|
#if defined(TARGET_NR_bind)
|
||||||
static void
|
static void
|
||||||
print_bind(const struct syscallname *name,
|
print_bind(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2343,7 +2348,7 @@ print_bind(const struct syscallname *name,
|
||||||
#if defined(TARGET_NR_stat) || defined(TARGET_NR_stat64) || \
|
#if defined(TARGET_NR_stat) || defined(TARGET_NR_stat64) || \
|
||||||
defined(TARGET_NR_lstat) || defined(TARGET_NR_lstat64)
|
defined(TARGET_NR_lstat) || defined(TARGET_NR_lstat64)
|
||||||
static void
|
static void
|
||||||
print_stat(const struct syscallname *name,
|
print_stat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2359,7 +2364,7 @@ print_stat(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_fstat) || defined(TARGET_NR_fstat64)
|
#if defined(TARGET_NR_fstat) || defined(TARGET_NR_fstat64)
|
||||||
static void
|
static void
|
||||||
print_fstat(const struct syscallname *name,
|
print_fstat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2373,7 +2378,7 @@ print_fstat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_mkdir
|
#ifdef TARGET_NR_mkdir
|
||||||
static void
|
static void
|
||||||
print_mkdir(const struct syscallname *name,
|
print_mkdir(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2386,7 +2391,7 @@ print_mkdir(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_mkdirat
|
#ifdef TARGET_NR_mkdirat
|
||||||
static void
|
static void
|
||||||
print_mkdirat(const struct syscallname *name,
|
print_mkdirat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2400,7 +2405,7 @@ print_mkdirat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_rmdir
|
#ifdef TARGET_NR_rmdir
|
||||||
static void
|
static void
|
||||||
print_rmdir(const struct syscallname *name,
|
print_rmdir(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2412,7 +2417,7 @@ print_rmdir(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_rt_sigaction
|
#ifdef TARGET_NR_rt_sigaction
|
||||||
static void
|
static void
|
||||||
print_rt_sigaction(const struct syscallname *name,
|
print_rt_sigaction(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2426,7 +2431,7 @@ print_rt_sigaction(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_rt_sigprocmask
|
#ifdef TARGET_NR_rt_sigprocmask
|
||||||
static void
|
static void
|
||||||
print_rt_sigprocmask(const struct syscallname *name,
|
print_rt_sigprocmask(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2446,7 +2451,7 @@ print_rt_sigprocmask(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_rt_sigqueueinfo
|
#ifdef TARGET_NR_rt_sigqueueinfo
|
||||||
static void
|
static void
|
||||||
print_rt_sigqueueinfo(const struct syscallname *name,
|
print_rt_sigqueueinfo(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2471,7 +2476,7 @@ print_rt_sigqueueinfo(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_rt_tgsigqueueinfo
|
#ifdef TARGET_NR_rt_tgsigqueueinfo
|
||||||
static void
|
static void
|
||||||
print_rt_tgsigqueueinfo(const struct syscallname *name,
|
print_rt_tgsigqueueinfo(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2555,7 +2560,7 @@ print_syslog_action(abi_ulong arg, int last)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_syslog(const struct syscallname *name,
|
print_syslog(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2569,7 +2574,7 @@ print_syslog(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_mknod
|
#ifdef TARGET_NR_mknod
|
||||||
static void
|
static void
|
||||||
print_mknod(const struct syscallname *name,
|
print_mknod(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2588,7 +2593,7 @@ print_mknod(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_mknodat
|
#ifdef TARGET_NR_mknodat
|
||||||
static void
|
static void
|
||||||
print_mknodat(const struct syscallname *name,
|
print_mknodat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2608,7 +2613,7 @@ print_mknodat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_mq_open
|
#ifdef TARGET_NR_mq_open
|
||||||
static void
|
static void
|
||||||
print_mq_open(const struct syscallname *name,
|
print_mq_open(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2627,7 +2632,7 @@ print_mq_open(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_open
|
#ifdef TARGET_NR_open
|
||||||
static void
|
static void
|
||||||
print_open(const struct syscallname *name,
|
print_open(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2644,7 +2649,7 @@ print_open(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_openat
|
#ifdef TARGET_NR_openat
|
||||||
static void
|
static void
|
||||||
print_openat(const struct syscallname *name,
|
print_openat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2662,7 +2667,7 @@ print_openat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_mq_unlink
|
#ifdef TARGET_NR_mq_unlink
|
||||||
static void
|
static void
|
||||||
print_mq_unlink(const struct syscallname *name,
|
print_mq_unlink(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2674,7 +2679,7 @@ print_mq_unlink(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_fstatat64) || defined(TARGET_NR_newfstatat)
|
#if defined(TARGET_NR_fstatat64) || defined(TARGET_NR_newfstatat)
|
||||||
static void
|
static void
|
||||||
print_fstatat64(const struct syscallname *name,
|
print_fstatat64(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2690,7 +2695,7 @@ print_fstatat64(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_readlink
|
#ifdef TARGET_NR_readlink
|
||||||
static void
|
static void
|
||||||
print_readlink(const struct syscallname *name,
|
print_readlink(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2704,7 +2709,7 @@ print_readlink(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_readlinkat
|
#ifdef TARGET_NR_readlinkat
|
||||||
static void
|
static void
|
||||||
print_readlinkat(const struct syscallname *name,
|
print_readlinkat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2719,7 +2724,7 @@ print_readlinkat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_rename
|
#ifdef TARGET_NR_rename
|
||||||
static void
|
static void
|
||||||
print_rename(const struct syscallname *name,
|
print_rename(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2732,7 +2737,7 @@ print_rename(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_renameat
|
#ifdef TARGET_NR_renameat
|
||||||
static void
|
static void
|
||||||
print_renameat(const struct syscallname *name,
|
print_renameat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2747,7 +2752,7 @@ print_renameat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_statfs
|
#ifdef TARGET_NR_statfs
|
||||||
static void
|
static void
|
||||||
print_statfs(const struct syscallname *name,
|
print_statfs(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2760,7 +2765,7 @@ print_statfs(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_statfs64
|
#ifdef TARGET_NR_statfs64
|
||||||
static void
|
static void
|
||||||
print_statfs64(const struct syscallname *name,
|
print_statfs64(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2773,7 +2778,7 @@ print_statfs64(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_symlink
|
#ifdef TARGET_NR_symlink
|
||||||
static void
|
static void
|
||||||
print_symlink(const struct syscallname *name,
|
print_symlink(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2786,7 +2791,7 @@ print_symlink(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_symlinkat
|
#ifdef TARGET_NR_symlinkat
|
||||||
static void
|
static void
|
||||||
print_symlinkat(const struct syscallname *name,
|
print_symlinkat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2800,7 +2805,7 @@ print_symlinkat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_mount
|
#ifdef TARGET_NR_mount
|
||||||
static void
|
static void
|
||||||
print_mount(const struct syscallname *name,
|
print_mount(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2816,7 +2821,7 @@ print_mount(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_umount
|
#ifdef TARGET_NR_umount
|
||||||
static void
|
static void
|
||||||
print_umount(const struct syscallname *name,
|
print_umount(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2828,7 +2833,7 @@ print_umount(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_umount2
|
#ifdef TARGET_NR_umount2
|
||||||
static void
|
static void
|
||||||
print_umount2(const struct syscallname *name,
|
print_umount2(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2841,7 +2846,7 @@ print_umount2(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_unlink
|
#ifdef TARGET_NR_unlink
|
||||||
static void
|
static void
|
||||||
print_unlink(const struct syscallname *name,
|
print_unlink(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2853,7 +2858,7 @@ print_unlink(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_unlinkat
|
#ifdef TARGET_NR_unlinkat
|
||||||
static void
|
static void
|
||||||
print_unlinkat(const struct syscallname *name,
|
print_unlinkat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2867,7 +2872,7 @@ print_unlinkat(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_utime
|
#ifdef TARGET_NR_utime
|
||||||
static void
|
static void
|
||||||
print_utime(const struct syscallname *name,
|
print_utime(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2880,7 +2885,7 @@ print_utime(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_utimes
|
#ifdef TARGET_NR_utimes
|
||||||
static void
|
static void
|
||||||
print_utimes(const struct syscallname *name,
|
print_utimes(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2893,7 +2898,7 @@ print_utimes(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_utimensat
|
#ifdef TARGET_NR_utimensat
|
||||||
static void
|
static void
|
||||||
print_utimensat(const struct syscallname *name,
|
print_utimensat(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2908,7 +2913,7 @@ print_utimensat(const struct syscallname *name,
|
||||||
|
|
||||||
#if defined(TARGET_NR_mmap) || defined(TARGET_NR_mmap2)
|
#if defined(TARGET_NR_mmap) || defined(TARGET_NR_mmap2)
|
||||||
static void
|
static void
|
||||||
print_mmap(const struct syscallname *name,
|
print_mmap(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2926,7 +2931,7 @@ print_mmap(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_mprotect
|
#ifdef TARGET_NR_mprotect
|
||||||
static void
|
static void
|
||||||
print_mprotect(const struct syscallname *name,
|
print_mprotect(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2940,7 +2945,7 @@ print_mprotect(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_munmap
|
#ifdef TARGET_NR_munmap
|
||||||
static void
|
static void
|
||||||
print_munmap(const struct syscallname *name,
|
print_munmap(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -2993,7 +2998,7 @@ if( cmd == val ) { \
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_futex(const struct syscallname *name,
|
print_futex(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -3010,7 +3015,7 @@ print_futex(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_kill
|
#ifdef TARGET_NR_kill
|
||||||
static void
|
static void
|
||||||
print_kill(const struct syscallname *name,
|
print_kill(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -3023,7 +3028,7 @@ print_kill(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_tkill
|
#ifdef TARGET_NR_tkill
|
||||||
static void
|
static void
|
||||||
print_tkill(const struct syscallname *name,
|
print_tkill(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -3036,7 +3041,7 @@ print_tkill(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_tgkill
|
#ifdef TARGET_NR_tgkill
|
||||||
static void
|
static void
|
||||||
print_tgkill(const struct syscallname *name,
|
print_tgkill(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -3050,7 +3055,7 @@ print_tgkill(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_statx
|
#ifdef TARGET_NR_statx
|
||||||
static void
|
static void
|
||||||
print_statx(const struct syscallname *name,
|
print_statx(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -3066,7 +3071,7 @@ print_statx(const struct syscallname *name,
|
||||||
|
|
||||||
#ifdef TARGET_NR_ioctl
|
#ifdef TARGET_NR_ioctl
|
||||||
static void
|
static void
|
||||||
print_ioctl(const struct syscallname *name,
|
print_ioctl(void *cpu_env, const struct syscallname *name,
|
||||||
abi_long arg0, abi_long arg1, abi_long arg2,
|
abi_long arg0, abi_long arg1, abi_long arg2,
|
||||||
abi_long arg3, abi_long arg4, abi_long arg5)
|
abi_long arg3, abi_long arg4, abi_long arg5)
|
||||||
{
|
{
|
||||||
|
@ -3151,7 +3156,7 @@ static int nsyscalls = ARRAY_SIZE(scnames);
|
||||||
* The public interface to this module.
|
* The public interface to this module.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
print_syscall(int num,
|
print_syscall(void *cpu_env, int num,
|
||||||
abi_long arg1, abi_long arg2, abi_long arg3,
|
abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
abi_long arg4, abi_long arg5, abi_long arg6)
|
abi_long arg4, abi_long arg5, abi_long arg6)
|
||||||
{
|
{
|
||||||
|
@ -3164,7 +3169,7 @@ print_syscall(int num,
|
||||||
if( scnames[i].nr == num ) {
|
if( scnames[i].nr == num ) {
|
||||||
if( scnames[i].call != NULL ) {
|
if( scnames[i].call != NULL ) {
|
||||||
scnames[i].call(
|
scnames[i].call(
|
||||||
&scnames[i], arg1, arg2, arg3, arg4, arg5, arg6);
|
cpu_env, &scnames[i], arg1, arg2, arg3, arg4, arg5, arg6);
|
||||||
} else {
|
} else {
|
||||||
/* XXX: this format system is broken because it uses
|
/* XXX: this format system is broken because it uses
|
||||||
host types and host pointers for strings */
|
host types and host pointers for strings */
|
||||||
|
@ -3180,7 +3185,7 @@ print_syscall(int num,
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
print_syscall_ret(int num, abi_long ret,
|
print_syscall_ret(void *cpu_env, int num, abi_long ret,
|
||||||
abi_long arg1, abi_long arg2, abi_long arg3,
|
abi_long arg1, abi_long arg2, abi_long arg3,
|
||||||
abi_long arg4, abi_long arg5, abi_long arg6)
|
abi_long arg4, abi_long arg5, abi_long arg6)
|
||||||
{
|
{
|
||||||
|
@ -3189,7 +3194,7 @@ print_syscall_ret(int num, abi_long ret,
|
||||||
for(i=0;i<nsyscalls;i++)
|
for(i=0;i<nsyscalls;i++)
|
||||||
if( scnames[i].nr == num ) {
|
if( scnames[i].nr == num ) {
|
||||||
if( scnames[i].result != NULL ) {
|
if( scnames[i].result != NULL ) {
|
||||||
scnames[i].result(&scnames[i], ret,
|
scnames[i].result(cpu_env, &scnames[i], ret,
|
||||||
arg1, arg2, arg3,
|
arg1, arg2, arg3,
|
||||||
arg4, arg5, arg6);
|
arg4, arg5, arg6);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -12769,14 +12769,15 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
||||||
arg2, arg3, arg4, arg5, arg6, arg7, arg8);
|
arg2, arg3, arg4, arg5, arg6, arg7, arg8);
|
||||||
|
|
||||||
if (unlikely(qemu_loglevel_mask(LOG_STRACE))) {
|
if (unlikely(qemu_loglevel_mask(LOG_STRACE))) {
|
||||||
print_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6);
|
print_syscall(cpu_env, num, arg1, arg2, arg3, arg4, arg5, arg6);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = do_syscall1(cpu_env, num, arg1, arg2, arg3, arg4,
|
ret = do_syscall1(cpu_env, num, arg1, arg2, arg3, arg4,
|
||||||
arg5, arg6, arg7, arg8);
|
arg5, arg6, arg7, arg8);
|
||||||
|
|
||||||
if (unlikely(qemu_loglevel_mask(LOG_STRACE))) {
|
if (unlikely(qemu_loglevel_mask(LOG_STRACE))) {
|
||||||
print_syscall_ret(num, ret, arg1, arg2, arg3, arg4, arg5, arg6);
|
print_syscall_ret(cpu_env, num, ret, arg1, arg2,
|
||||||
|
arg3, arg4, arg5, arg6);
|
||||||
}
|
}
|
||||||
|
|
||||||
record_syscall_return(cpu, num, ret);
|
record_syscall_return(cpu, num, ret);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue