Date: Fri, 4 Oct 2019 16:17:00 +0000 (UTC) From: Mariusz Zaborski <oshogbo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353107 - head/sys/cddl/dev/dtrace/amd64 Message-ID: <201910041617.x94GH0Fi066673@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: oshogbo Date: Fri Oct 4 16:17:00 2019 New Revision: 353107 URL: https://svnweb.freebsd.org/changeset/base/353107 Log: dtrace: 64-bits registers support The registers in ilumos and FreeBSD have a different number. In the illumos, last 32-bits register defined is SS an in FreeBSD is GS. While translating register we should comper it to the highest one. PR: 240358 Reported by: lwhsu@ MFC after: 2 weeks Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Fri Oct 4 15:27:10 2019 (r353106) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Fri Oct 4 16:17:00 2019 (r353107) @@ -505,7 +505,11 @@ dtrace_getreg(struct trapframe *rp, uint_t reg) REG_SS /* 18 SS */ }; +#ifdef illumos if (reg <= SS) { +#else /* !illumos */ + if (reg <= GS) { +#endif if (reg >= sizeof (regmap) / sizeof (int)) { DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP); return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910041617.x94GH0Fi066673>