How to debug light-weight-process applications?

Bruce Cohen brucec at phoebus.phoebus.labs.tek.com
Sat Jun 16 03:09:35 AEST 1990


I've just started working with lwp (on a Sun 4 with OS 4.0.3) and I can't
seem to figure out how to debug in a multi-thread sort of way.  That is to
say gdb (my favorite debugger) and dbx both seem brain-damaged when I
break inside a running thread.  For one thing, they can't recognize the
beginning of the thread's stack, so they just report the top (or one frame
past the top) endlessly.

More importantly, there's no obvious way to find the thread's context area
and look at it, nor to find out what the status of other threads is (from
within the debugger that is).

Has anyone out there developed techniques for debugging multi-thread
applications other than adding printf's all over?  Please email replies to
me, as I don't get to scan the news very often.

Bruce Cohen, Computer Research Lab        email: brucec at tekcrl.labs.tek.com
Tektronix Laboratories, Tektronix, Inc.                phone: (503)627-5241
M/S 50-662, P.O. Box 500, Beaverton, OR  97077



More information about the Comp.sys.sun mailing list