130296Ssam /*
230296Ssam * Copyright (c) 1986 Regents of the University of California.
330296Ssam * All rights reserved. The Berkeley software License Agreement
430296Ssam * specifies the terms and conditions for redistribution.
530296Ssam *
6*41357Ssklower * @(#)kdb_access.c 7.4 (Berkeley) 05/03/90
730296Ssam */
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 */
1930296Ssam /*ARGSUSED*/
kdbput(addr,space,value)20*41357Ssklower kdbput(addr, space, value)
2130296Ssam off_t addr; long value; { (void) kdbpoke((caddr_t)addr, value); }
2230106Ssam
2330296Ssam /*ARGSUSED*/
2430106Ssam u_int
kdbget(addr,space)25*41357Ssklower kdbget(addr, space)
2630296Ssam off_t addr; { return (kdbpeek((caddr_t)addr)); };
2730106Ssam
2830106Ssam u_int
kdbchkget(addr,space)29*41357Ssklower kdbchkget(addr, space)
30*41357Ssklower off_t addr; { u_int w = kdbget(addr, space); kdbchkerr(); return (w); }
3130106Ssam
3230106Ssam u_int
kdbbchkget(addr,space)33*41357Ssklower kdbbchkget(addr, space)
34*41357Ssklower off_t addr; { return (byte(kdbchkget(addr, space))); }
35