Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!leah!itsgw!imagine!rpics!hiebeler From: hiebeler@rpics (Dave Hiebeler) Newsgroups: comp.unix.questions Subject: Re: Debugging programs with fork Message-ID: <1303@imagine.PAWL.RPI.EDU> Date: 3 Oct 88 12:58:38 GMT References: <12523@oberon.USC.EDU> <13819@mimsy.UUCP> Sender: news@imagine.PAWL.RPI.EDU Reply-To: hiebeler@turing.cs.rpi.edu (Dave Hiebeler) Organization: RPI CS Dept. Lines: 29 In article <13819@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >In article <12523@oberon.USC.EDU> pgarg@pollux.usc.edu (Pankaj K. Garg) writes: >> I am having trouble debugging programs which fork other >>processes. Dbx doesn't seem to handle them easily. >> I am using sun workstations... > > >You are quite right; the existing Unix debuggers cannot handle programs >that fork. SunOS 4.0 provides new facilities that make it possible, >but if you are dealing with older Unixes, you must either delete the >fork, or fall back on more `traditional' debugging schemes. >-- I am curious, what facilities are in 4.0 that help you debug (dbx) forking processes? I haven't seen anything about that, and am quite interested; just a pointer to where I can find info would be nice. Occasionally, when I just HAD to dbx something that was forking, I would move it over to our Sequent Balance, which has a parallel version of dbx. I'd change the fork() to m_fork(), so the forked child would run on a different processor, and then the "pdbx" as it's called allows you to go to different processors and debug what's running on any given one. Sometimes that's infeasible, however, and of course not everyone has a Balance either. ---- Dave Hiebeler Internet: hiebeler@cs.rpi.edu (preferred address) R.D. Box 225A userfrzk%mts@itsgw.rpi.edu Chatham, NY 12037 Bitnet: userfrzk@rpitsmts.bitnet "xue zai xao"