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
This commit is contained in:
Mariusz Zaborski 2019-06-05 22:29:05 +00:00
parent 32d2014dde
commit 8da024d941

View File

@ -514,7 +514,11 @@ dtrace_getreg(struct trapframe *rp, uint_t reg)
reg = regmap[reg]; reg = regmap[reg];
} else { } else {
/* This is dependent on reg.d. */ /* This is dependent on reg.d. */
#ifdef illumos
reg -= SS + 1; reg -= SS + 1;
#else /* !illumos */
reg -= GS + 1;
#endif
} }
switch (reg) { switch (reg) {