PD_SHIFT -> PDRSHIFT
PGOFSET -> PAGE_MASK
This commit is contained in:
parent
7c53a1f932
commit
189514aa41
@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: freebsd-nat.c,v 1.7 1995/05/30 04:57:05 rgrimes Exp $
|
||||
$Id: freebsd-nat.c,v 1.8 1996/05/02 09:42:45 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -526,7 +526,7 @@ CORE_ADDR addr;
|
||||
/*
|
||||
* Read the first-level page table (ptd).
|
||||
*/
|
||||
v = current_ptd + ((unsigned)addr >> PD_SHIFT) * sizeof pte;
|
||||
v = current_ptd + ((unsigned)addr >> PDRSHIFT) * sizeof pte;
|
||||
if (physrd(fd, v, (char *)&pte, sizeof pte) < 0 || (pte&PG_V) == 0)
|
||||
return (~0);
|
||||
|
||||
@ -537,7 +537,7 @@ CORE_ADDR addr;
|
||||
if (physrd(fd, v, (char *) &pte, sizeof(pte)) < 0 || (pte&PG_V) == 0)
|
||||
return (~0);
|
||||
|
||||
addr = (pte & PG_FRAME) + (addr & PGOFSET);
|
||||
addr = (pte & PG_FRAME) + (addr & PAGE_MASK);
|
||||
#if 0
|
||||
printf("vtophys(%x) -> %x\n", oldaddr, addr);
|
||||
#endif
|
||||
@ -605,7 +605,7 @@ kernel_core_file_hook(fd, addr, buf, len)
|
||||
break;
|
||||
}
|
||||
/* we can't read across a page boundary */
|
||||
i = min(len, PAGE_SIZE - (addr & PGOFSET));
|
||||
i = min(len, PAGE_SIZE - (addr & PAGE_MASK));
|
||||
if ((cc = physrd(fd, paddr, cp, i)) <= 0) {
|
||||
bzero(cp, len);
|
||||
return (cp - buf);
|
||||
|
@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: freebsd-nat.c,v 1.7 1995/05/30 04:57:05 rgrimes Exp $
|
||||
$Id: freebsd-nat.c,v 1.8 1996/05/02 09:42:45 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -526,7 +526,7 @@ CORE_ADDR addr;
|
||||
/*
|
||||
* Read the first-level page table (ptd).
|
||||
*/
|
||||
v = current_ptd + ((unsigned)addr >> PD_SHIFT) * sizeof pte;
|
||||
v = current_ptd + ((unsigned)addr >> PDRSHIFT) * sizeof pte;
|
||||
if (physrd(fd, v, (char *)&pte, sizeof pte) < 0 || (pte&PG_V) == 0)
|
||||
return (~0);
|
||||
|
||||
@ -537,7 +537,7 @@ CORE_ADDR addr;
|
||||
if (physrd(fd, v, (char *) &pte, sizeof(pte)) < 0 || (pte&PG_V) == 0)
|
||||
return (~0);
|
||||
|
||||
addr = (pte & PG_FRAME) + (addr & PGOFSET);
|
||||
addr = (pte & PG_FRAME) + (addr & PAGE_MASK);
|
||||
#if 0
|
||||
printf("vtophys(%x) -> %x\n", oldaddr, addr);
|
||||
#endif
|
||||
@ -605,7 +605,7 @@ kernel_core_file_hook(fd, addr, buf, len)
|
||||
break;
|
||||
}
|
||||
/* we can't read across a page boundary */
|
||||
i = min(len, PAGE_SIZE - (addr & PGOFSET));
|
||||
i = min(len, PAGE_SIZE - (addr & PAGE_MASK));
|
||||
if ((cc = physrd(fd, paddr, cp, i)) <= 0) {
|
||||
bzero(cp, len);
|
||||
return (cp - buf);
|
||||
|
Loading…
Reference in New Issue
Block a user