[net.unix] DBX & SDB: global variables

ellis@flairvax.UUCP (Michael Ellis) (02/22/84)

Has anyone ever figured out how to make ANY UN*X source-level debugger
print global variables? No syntax I've tried will convince either
4.1 sdb or 4.2 dbx that my globals really exist.

All I can get either of the debuggers to print are local variables in the
currently active procedure(s). 

Help!

-michael

*UNIX is the Official Operating System of the 1984 Olympics

kvm@basser.SUN (Karlos Mauvtaque) (02/26/84)

I'm really stumped how people can write such bad debuggers.  Even adb
can get at global variables!  We use bedbug(1).  It knows C well.
Mail the author ...!decvax!mulga!brucee:basser for details.

Try evaluating ((short *)&x)[i] with your debugger!

guido@mcvax.UUCP (Guido van Rossum) (02/28/84)

I read:
	From kvm@basser.SUN (Karlos Mauvtaque) Sat Mar  3 03:43:58 1984
	I'm really stumped how people can write such bad debuggers.  Even adb
	can get at global variables!  We use bedbug(1).  It knows C well.
	Mail the author ...!decvax!mulga!brucee:basser for details.

I'm really stumped how people can give their opinion about subjects on which
they apparently don't know a thing.  Dbx and sdb are perfectly capable of
accessing global variables (for dbx 'print variable' will do it).
Have you considered that the person who asked the question just hadn't read
the manual nor asked a friend before posting?