dbx bug?

Ron Stanonik stanonik at nprdc.arpa
Wed Nov 9 15:44:17 AEST 1988


We've run into a problem with dbx version 3.21 (and 3.4).
The "call" command doesn't seem to allow side effects.
For example, here's a program
	main()
	{
		char s[100];

		strcpy(s, "hello");
		puts(s);
	}
dbx this and run until the strcpy line (just to get the
variable s allocated).  Now type "call strcpy(s, "goodbye")".
We expected "print s" would return "goodbye", but instead
s is unchanged; ie, "".

Oddly, the following does what we expect, "call strcpy(&s[0], "goodbye")".
So, why doesn't it work for just s?

Is this a bug in dbx, or have we overlooked something in TFM.

By the way, we're running 4.3bsd on a vax 780.

Thanks,

Ron Stanonik
stanonik at nprdc.arpa



More information about the Comp.unix.wizards mailing list