bug in (what else?) sdb (4.1bsd)

mullen%nrl-css at sri-unix.UUCP mullen%nrl-css at sri-unix.UUCP
Tue Jul 19 07:24:35 AEST 1983


From:  Preston Mullen <mullen at nrl-css>

Sdb (4.1bsd) doesn't handle static arrays of structures properly.
If you have declared
	static struct { int a,b; } x[50];
then sdb inquiries for the values of x[1].a, x[2].a, x[3].a, etc.,
and x[1].b, x[2].b, x[3].b, etc., always return the values stored in
x[0].a and x[0].b, respectively.

This only happens if x is static; it works fine otherwise.
Also, indexing works OK with static arrays whose elements
are not structures.

I'll report this to 4bsd-bugs, but they don't seem to talk back
(except when your report is in the wrong format).  So, does anyone
out there know whether there is a simple fix?  Are there other
sdb problems one should know about?  (Nothing can drive you crazy
faster than debugging with a defective debugger.)

I understand the USENET people keep a bug list, but how does one
get to it from the ARPANET?



More information about the Comp.unix.wizards mailing list