Trim duplicate code for copying in iovecs for PT_[GS]ETREGSET.
Reviewed by: andrew, emaste Differential Revision: https://reviews.freebsd.org/D34177
This commit is contained in:
parent
c9e023541a
commit
949e395966
@ -1026,15 +1026,8 @@ freebsd32_ptrace(struct thread *td, struct freebsd32_ptrace_args *uap)
|
||||
case PT_SETDBREGS:
|
||||
error = copyin(uap->addr, &r.dbreg, sizeof(r.dbreg));
|
||||
break;
|
||||
case PT_SETREGSET:
|
||||
error = copyin(uap->addr, &r32.vec, sizeof(r32.vec));
|
||||
if (error != 0)
|
||||
break;
|
||||
|
||||
r.vec.iov_len = r32.vec.iov_len;
|
||||
r.vec.iov_base = PTRIN(r32.vec.iov_base);
|
||||
break;
|
||||
case PT_GETREGSET:
|
||||
case PT_SETREGSET:
|
||||
error = copyin(uap->addr, &r32.vec, sizeof(r32.vec));
|
||||
if (error != 0)
|
||||
break;
|
||||
|
@ -627,10 +627,8 @@ sys_ptrace(struct thread *td, struct ptrace_args *uap)
|
||||
case PT_GETDBREGS:
|
||||
bzero(&r.dbreg, sizeof(r.dbreg));
|
||||
break;
|
||||
case PT_SETREGSET:
|
||||
error = copyin(uap->addr, &r.vec, sizeof(r.vec));
|
||||
break;
|
||||
case PT_GETREGSET:
|
||||
case PT_SETREGSET:
|
||||
error = copyin(uap->addr, &r.vec, sizeof(r.vec));
|
||||
break;
|
||||
case PT_SETREGS:
|
||||
|
Loading…
Reference in New Issue
Block a user