Date: Mon, 17 Feb 2014 12:27:03 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262035 - stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace Message-ID: <201402171227.s1HCR3fP034304@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Feb 17 12:27:02 2014 New Revision: 262035 URL: http://svnweb.freebsd.org/changeset/base/262035 Log: MFC r257143: Fix a couple of bugs in the fasttrap emulation of a "push %rbp" instruction Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Feb 17 12:24:05 2014 (r262034) +++ stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Feb 17 12:27:02 2014 (r262035) @@ -104,6 +104,7 @@ uwrite(proc_t *p, void *kaddr, size_t le #define r_rip r_eip #define r_rflags r_eflags #define r_rsp r_esp +#define r_rbp r_ebp #endif /* @@ -1381,29 +1382,27 @@ fasttrap_pid_probe(struct reg *rp) case FASTTRAP_T_PUSHL_EBP: { int ret = 0; - uintptr_t addr = 0; #ifdef __amd64 if (p->p_model == DATAMODEL_NATIVE) { - addr = rp->r_rsp - sizeof (uintptr_t); - ret = fasttrap_sulword((void *)addr, &rp->r_rsp); + rp->r_rsp -= sizeof (uintptr_t); + ret = fasttrap_sulword(&rp->r_rbp, (void *)rp->r_rsp); } else { #endif #ifdef __i386__ - addr = rp->r_rsp - sizeof (uint32_t); - ret = fasttrap_suword32((void *)addr, &rp->r_rsp); + rp->r_rsp -= sizeof (uint32_t); + ret = fasttrap_suword32(&rp->r_rbp, (void *)rp->r_rsp); #endif #ifdef __amd64 } #endif if (ret == -1) { - fasttrap_sigsegv(p, curthread, addr); + fasttrap_sigsegv(p, curthread, rp->r_rsp); new_pc = pc; break; } - rp->r_rsp = addr; new_pc = pc + tp->ftt_size; break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402171227.s1HCR3fP034304>