SHA256
1
0
forked from pool/strace
strace/strace-4.5.18.diff

100 lines
2.8 KiB
Diff

--- net.c
+++ net.c
@@ -1281,13 +1281,15 @@ struct tcb *tcp;
} else if (!tcp->u_arg[2])
tprintf("%#lx, NULL", tcp->u_arg[1]);
else {
- if (tcp->u_arg[1] == 0 || syserror(tcp)) {
+ int len;
+ if (tcp->u_arg[1] == 0 || syserror(tcp)
+ || umove (tcp, tcp->u_arg[2], &len) < 0) {
tprintf("%#lx", tcp->u_arg[1]);
} else {
- printsock(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ printsock(tcp, tcp->u_arg[1], len);
}
tprintf(", ");
- printnum(tcp, tcp->u_arg[2], "%lu");
+ printnum_int(tcp, tcp->u_arg[2], "%u");
}
return 0;
}
--- process.c
+++ process.c
@@ -765,12 +765,13 @@ setarg(tcp, argnum)
{
#if defined (IA64)
{
- unsigned long *bsp, *ap;
+ unsigned long *ap;
+ long bsp;
- if (upeek(tcp->pid, PT_AR_BSP, (long *) &bsp) , 0)
+ if (upeek(tcp->pid, PT_AR_BSP, &bsp) , 0)
return -1;
- ap = ia64_rse_skip_regs(bsp, argnum);
+ ap = ia64_rse_skip_regs((unsigned long *) bsp, argnum);
errno = 0;
ptrace(PTRACE_POKEDATA, tcp->pid, (char *) ap, tcp->u_arg[argnum]);
if (errno)
@@ -2289,6 +2290,18 @@ static const struct xlat ptrace_cmds[] =
#ifdef PTRACE_SETVRREGS
{ PTRACE_SETVRREGS, "PTRACE_SETVRREGS", },
#endif
+#ifdef PTRACE_SETOPTIONS
+ { PTRACE_SETOPTIONS, "PTRACE_SETOPTIONS", },
+#endif
+#ifdef PTRACE_GETEVENTMSG
+ { PTRACE_GETEVENTMSG, "PTRACE_GETEVENTMSG", },
+#endif
+#ifdef PTRACE_GETSIGINFO
+ { PTRACE_GETSIGINFO, "PTRACE_GETSIGINFO", },
+#endif
+#ifdef PTRACE_SETSIGINFO
+ { PTRACE_SETSIGINFO, "PTRACE_SETSIGINFO", },
+#endif
#ifdef SUNOS4
{ PTRACE_READDATA, "PTRACE_READDATA" },
{ PTRACE_WRITEDATA, "PTRACE_WRITEDATA" },
--- resource.c
+++ resource.c
@@ -388,10 +388,10 @@ struct tcb *tcp;
si.loads[2]);
tprintf("totalram=%lu, freeram=%lu, ",
si.totalram, si.freeram);
- tprintf("sharedram=%lu, bufferram=%lu} ",
+ tprintf("sharedram=%lu, bufferram=%lu, ",
si.sharedram, si.bufferram);
- tprintf("totalswap=%lu, freeswap=%lu, procs=%hu}",
- si.totalswap, si.freeswap, si.procs);
+ tprintf("totalswap=%lu, freeswap=%lu, procs=%hu, mem_unit=%u}",
+ si.totalswap, si.freeswap, si.procs, si.mem_unit);
}
}
return 0;
--- strace-graph
+++ strace-graph
@@ -229,7 +229,7 @@ sub handle_trace {
push @$seq, ['EXEC', $filename, $argv];
$pr{$pid}{seq} = $seq;
- } elsif ($call eq 'fork' || $call eq 'clone' || $call eq 'vfork') {
+ } elsif ($call eq 'fork' || $call eq 'clone' || $call eq 'clone2' || $call eq 'vfork') {
return if $result == 0;
my $seq = $pr{$pid}{seq};
--- util.c
+++ util.c
@@ -1319,9 +1319,8 @@ arg_setup(struct tcb *tcp, arg_setup_sta
sof = (cfm >> 0) & 0x7f;
sol = (cfm >> 7) & 0x7f;
- bsp = (long) ia64_rse_skip_regs((unsigned long *) bsp, -sof + sol);
+ *state = ia64_rse_skip_regs((unsigned long *) bsp, -sof + sol);
- *state = (unsigned long *) bsp;
return 0;
}