Debugging programs with fork

Dave Hiebeler hiebeler at rpics
Mon Oct 3 22:58:38 AEST 1988


In article <13819 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>In article <12523 at oberon.USC.EDU> pgarg at 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 at cs.rpi.edu  (preferred address)
R.D. Box 225A                userfrzk%mts at itsgw.rpi.edu
Chatham, NY 12037    Bitnet: userfrzk at rpitsmts.bitnet
  "xue zai xao"



More information about the Comp.unix.questions mailing list