forked from pool/strace
106 lines
3.0 KiB
Diff
106 lines
3.0 KiB
Diff
|
--- process.c
|
||
|
+++ process.c
|
||
|
@@ -765,12 +765,12 @@ setarg(tcp, argnum)
|
||
|
{
|
||
|
#if defined (IA64)
|
||
|
{
|
||
|
- unsigned long *bsp, *ap;
|
||
|
+ unsigned long bsp, *ap;
|
||
|
|
||
|
if (upeek(tcp->pid, PT_AR_BSP, (long *) &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 +2289,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};
|
||
|
--- syscall.c
|
||
|
+++ syscall.c
|
||
|
@@ -1963,7 +1963,7 @@ struct tcb *tcp;
|
||
|
#elif defined (IA64)
|
||
|
{
|
||
|
if (!ia32) {
|
||
|
- unsigned long *out0, *rbs_end, cfm, sof, sol, i;
|
||
|
+ unsigned long *out0, rbs_end, cfm, sof, sol, i;
|
||
|
/* be backwards compatible with kernel < 2.4.4... */
|
||
|
# ifndef PT_RBS_END
|
||
|
# define PT_RBS_END PT_AR_BSP
|
||
|
@@ -1976,7 +1976,7 @@ struct tcb *tcp;
|
||
|
|
||
|
sof = (cfm >> 0) & 0x7f;
|
||
|
sol = (cfm >> 7) & 0x7f;
|
||
|
- out0 = ia64_rse_skip_regs(rbs_end, -sof + sol);
|
||
|
+ out0 = ia64_rse_skip_regs((unsigned long *)rbs_end, -sof + sol);
|
||
|
|
||
|
if (tcp->scno >= 0 && tcp->scno < nsyscalls
|
||
|
&& sysent[tcp->scno].nargs != -1)
|
||
|
--- util.c
|
||
|
+++ util.c
|
||
|
@@ -1300,7 +1300,7 @@ typedef unsigned long *arg_setup_state;
|
||
|
static int
|
||
|
arg_setup(struct tcb *tcp, arg_setup_state *state)
|
||
|
{
|
||
|
- unsigned long *bsp, cfm, sof, sol;
|
||
|
+ unsigned long bsp, cfm, sof, sol;
|
||
|
|
||
|
if (ia32)
|
||
|
return 0;
|
||
|
@@ -1312,9 +1312,8 @@ arg_setup(struct tcb *tcp, arg_setup_sta
|
||
|
|
||
|
sof = (cfm >> 0) & 0x7f;
|
||
|
sol = (cfm >> 7) & 0x7f;
|
||
|
- bsp = ia64_rse_skip_regs(bsp, -sof + sol);
|
||
|
+ *state = ia64_rse_skip_regs((unsigned long *) bsp, -sof + sol);
|
||
|
|
||
|
- *state = bsp;
|
||
|
return 0;
|
||
|
}
|
||
|
|