Date: Wed, 5 Jun 2019 22:29:05 +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: r348705 - head/sys/cddl/dev/dtrace/amd64 Message-ID: <201906052229.x55MT554007708@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: oshogbo Date: Wed Jun 5 22:29:05 2019 New Revision: 348705 URL: https://svnweb.freebsd.org/changeset/base/348705 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. This off-by-one caused the uregs array to returns the wrong 64-bits register on amd64. Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20363 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 Wed Jun 5 21:46:56 2019 (r348704) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Wed Jun 5 22:29:05 2019 (r348705) @@ -514,7 +514,11 @@ dtrace_getreg(struct trapframe *rp, uint_t reg) reg = regmap[reg]; } else { /* This is dependent on reg.d. */ +#ifdef illumos reg -= SS + 1; +#else /* !illumos */ + reg -= GS + 1; +#endif } switch (reg) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906052229.x55MT554007708>