Decode the arguments to ptrace().

This does not decode structures returned by ptrace().
This commit is contained in:
John Baldwin 2017-06-10 00:45:07 +00:00
parent ad419d3377
commit 5ac1c7ac34
2 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Ioctl,
Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel,
Sockoptname, Msgflags, CapRights, PUInt, PQuadHex, Acltype,
Extattrnamespace, Minherit, Mlockall, Mountflags, Msync, Priowhich,
Ptraceop,
CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags,
CloudABIFDStat, CloudABIFileStat, CloudABIFileType,

View File

@ -361,6 +361,8 @@ static struct syscall decoded_syscalls[] = {
{ QuadHex, 3 } } },
{ .name = "procctl", .ret_type = 1, .nargs = 4,
.args = { { Idtype, 0 }, { Quad, 1 }, { Procctl, 2 }, { Ptr, 3 } } },
{ .name = "ptrace", .ret_type = 1, .nargs = 4,
.args = { { Ptraceop, 0 }, { Int, 1 }, { Ptr, 2 }, { Int, 3 } } },
{ .name = "pwrite", .ret_type = 1, .nargs = 4,
.args = { { Int, 0 }, { BinString | IN, 1 }, { Sizet, 2 },
{ QuadHex, 3 } } },
@ -2130,6 +2132,10 @@ print_arg(struct syscall_args *sc, unsigned long *args, long *retval,
case Priowhich:
print_integer_arg(sysdecode_prio_which, fp, args[sc->offset]);
break;
case Ptraceop:
print_integer_arg(sysdecode_ptrace_request, fp,
args[sc->offset]);
break;
case CloudABIAdvice:
fputs(xlookup(cloudabi_advice, args[sc->offset]), fp);