adb under networking 2.9 kernels

Robert Thau rst at tardis.UUCP
Sat Feb 9 03:23:20 AEST 1985


Adb, as distributed by SRI, does not work with networking kernels.  It
is incapable of reading or writing registers, and horrible things happen
when you try to use core files.  Two fixes are needed to get something
that will work out of the compiler.  The first, in pcs.c, is to replace the
line

	POS		corhdr[512];

with

	POS		corhdr[ctob(UPAGES)/sizeof(POS)];

Secondly, in defs.h, replace

	#define UAR0	(&corhdr[509])	/* default address of r0 (u.u_ar0) */

with the following:

	#ifdef	UCB_NET
	#define UAR0	(&corhdr[01775])/* default address of r0 (u.u_ar0) */
	#else
	#define UAR0	(&corhdr[509])	/* default address of r0 (u.u_ar0) */
	#endif
	
Finally, before recompiling, make sure that /usr/include/sys/param.h is
up-to-date (i.e. it defines UCB_NET), since otherwise the above
changes make no difference at all.  (Unfortunately, there's no trivial
six-line change which will give an adb binary that works with both kinds
of kernel).

Robert Thau
rst at tardis.ARPA



More information about the Comp.bugs.2bsd mailing list