[comp.lang.c] SDB broken on SCO UNIX 3.2 ?

jpm@logixwi.uucp (Jan-Piet Mens) (05/07/91)

Hello World\n,
	I am developing on SCO UNIX 3.2.2, and sometimes need `sdb' to debug
	things ;-)

	If I compile my progs with the `-g' option, I can use sdb, but the
	latter does not find symbols with `name/' inside the program. Message is
		<blank> not an active procedure
	even when I am certain the `name' is in the function I am currently
	testing.

	It works when the program is compiled with the AT&T C-compiler
	called `rcc'. Can some kind soul explain what is happening ?

	The Codeview program on SCO UNIX (cv) shows similar defects. It won't
	work at all with `cc'; only with `rcc'. What goes ?
	So far I imagined that cc and cv are both from Microsoft. Surely they
	tested this no ?

	Thank you for your help.

Regards,
	-JP
-- 
Jan-Piet Mens, Logix GmbH				    jpm@logixwi.UUCP
Moritzstr. 50, D-6200 Wiesbaden            ...!uunet!mcsun!unido!logixwi!jpm

dsmythe@netcom.COM (Dave Smythe) (05/12/91)

Regarding bugs in CodeView and SDB, There is a bug in cvtomf (run automatically
by cc, not rcc) that corrupts symbol tables.  It's been reported.  You'll see:
"No symbolic information" when cv or sdb comes up.  To reproduce it, try:

main()
{
  int x = -1;

  { { int a; } }
  { { int b; } }
  { { int c; } }
}

If you switch multiscreens while CodeView is loading (actually, while it is 
running cvtcoff to convert your COFF file to OMF for cv) cvtcoff will die,
and you'll get no symbolic information.  Just be patient :-)

If you are trying to use Codeview (perhaps sdb too?) on executables that
exist on NFS mounted directories, then it will occasionally refuse to
allow you to set breakpoints (I/O error (6?)).  I've even seen it accept
a breakpoint and not stop there!  *Sometimes* you can set a breakpoint
after you have started execution (g main; set bp; g).

Hope I can save somebody some grief...

D