track gratuitous change to sys/i386/include/reg.h
This commit is contained in:
parent
8e9dc28535
commit
5100bb69ac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105604
@ -39,7 +39,7 @@ i386_clr_watch(int watchnum, struct dbreg * d)
|
||||
if (watchnum < 0 || watchnum >= 4)
|
||||
return -1;
|
||||
|
||||
d->dr7 = d->dr7 & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
|
||||
DBREG_DRX(d,7) = DBREG_DRX(d,7) & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
|
||||
DBREG_DRX(d,watchnum) = 0;
|
||||
|
||||
return 0;
|
||||
|
@ -41,7 +41,7 @@ i386_set_watch(int watchnum, unsigned int watchaddr, int size,
|
||||
|
||||
if (watchnum == -1) {
|
||||
for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2)
|
||||
if ((d->dr7 & mask) == 0)
|
||||
if ((DBREG_DRX(d,7) & mask) == 0)
|
||||
break;
|
||||
if (i < 4)
|
||||
watchnum = i;
|
||||
@ -72,13 +72,13 @@ i386_set_watch(int watchnum, unsigned int watchaddr, int size,
|
||||
mask |= access;
|
||||
|
||||
/* clear the bits we are about to affect */
|
||||
d->dr7 &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
|
||||
DBREG_DRX(d,7) &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
|
||||
|
||||
/* set drN register to the address, N=watchnum */
|
||||
DBREG_DRX(d,watchnum) = watchaddr;
|
||||
|
||||
/* enable the watchpoint */
|
||||
d->dr7 |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16));
|
||||
DBREG_DRX(d,7) |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16));
|
||||
|
||||
return watchnum;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user