stab(5) man page lies

mp at mit-eddie.UUCP mp at mit-eddie.UUCP
Wed Aug 10 06:32:07 AEST 1983


The 4.{1,2}bsd stab(5) man page claims that the n_desc field (a short) can
be considered a
	struct desc {
		short q6:2,q5:2,q4:2,q3:2,q2:2,q1:2,basic:4
	};

However, this structure is backwards; the bit fields are assigned
right-to-left on a VAX, yet the format of n_desc (as set up by pcc) is such
that the "basic" field is in the low 4 bits, q1 is just to the left of that,
and so on.

It's interesting to note that neither pcc nor sdb uses the desc structure;
they prefer to do the left and right shifts "manually".

	Mark



More information about the Comp.bugs.4bsd.ucb-fixes mailing list