1*30296Ssam /* 2*30296Ssam * Copyright (c) 1986 Regents of the University of California. 3*30296Ssam * All rights reserved. The Berkeley software License Agreement 4*30296Ssam * specifies the terms and conditions for redistribution. 5*30296Ssam * 6*30296Ssam * @(#)kdb_access.c 7.3 (Berkeley) 12/15/86 7*30296Ssam */ 830106Ssam 930106Ssam /* 1030106Ssam * Access data in kernel address space. 1130106Ssam */ 1230106Ssam 1330106Ssam #include "../kdb/defs.h" 1430106Ssam 1530106Ssam /* 1630106Ssam * Primitives: put a value in a space, get a value from a space 1730106Ssam * and get a word or byte not returning if an error occurred. 1830106Ssam */ 19*30296Ssam /*ARGSUSED*/ 2030106Ssam put(addr, space, value) 21*30296Ssam off_t addr; long value; { (void) kdbpoke((caddr_t)addr, value); } 2230106Ssam 23*30296Ssam /*ARGSUSED*/ 2430106Ssam u_int 2530106Ssam get(addr, space) 26*30296Ssam off_t addr; { return (kdbpeek((caddr_t)addr)); }; 2730106Ssam 2830106Ssam u_int 2930106Ssam chkget(addr, space) 3030116Ssam off_t addr; { u_int w = get(addr, space); chkerr(); return (w); } 3130106Ssam 3230106Ssam u_int 3330106Ssam bchkget(addr, space) 3430106Ssam off_t addr; { return (byte(chkget(addr, space))); } 35