[net.bugs.4bsd] 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!

davy@ecn-ee.UUCP (02/29/84)

#R:flairvax:-33700:ecn-ee:16700005:000:353
ecn-ee!davy    Feb 28 08:49:00 1984


I'm really stumped as to why people bitch about programs they've obviously
never used.  Maybe I'm just doing something wrong, but I've always found the
command "print variablename" works just fine in dbx for printing global
variables.

True, sdb had a lot of problems.  But, with one exception, I've had no
trouble with dbx.

--Dave Curry
pur-ee!davy