Re: [Anjuta-list] debugging problem



On HPUX I usually do this, I don;t know if that works with LInux as it
may be implementation specific (gdb info says)

`set follow-fork-mode MODE'
      Set the debugger response to a program call of `fork' or `vfork'.
      A call to `fork' or `vfork' creates a new process.  The MODE can
      be:
 
     `parent'
           The original process is debugged after a fork.  The child
           process runs unimpeded.  This is the default.
 
     `child'
           The new process is debugged after a fork.  The parent process
           runs unimpeded.
 
     `ask'
           The debugger will ask for one of the above choices.
 
 `show follow-fork-mode'
      Display the current debugger response to a `fork' or `vfork' call

The only othere way is to attach to it by putting a sleep in there to
give you enough time. I expect (I guess) you are getting the error
message bacause the child had already terminated before you managed to
attach to it.

On Wed, 2002-10-23 at 11:25, Mohammed Khalid Ansari wrote:
> 
> Hi,
> 
> I want to trace the behaviour of a program which forks a child and
> terminates. I want to trace the child now but when I attached the child
> process to the debugger it gives me the error
> 
> Error: ptrace: No such process
> 
> what could be problem OR How exactly to do that.
> 
> -- 
> 
> **************************************************************************
> 
> Mohammed Khalid Ansari                    Tel (res) : 0091-022-3051360
> Assistant Manager II                          (off) : 0091-022-2024641
> National Centre for Software Technology   Fax       : 0091-022-2049573 
> 8th flr,Air India Build. Nariman Point,   E-Mail    : khalid ncst ernet in 	
> Mumbai 400021.
> 
> Homepage : http://soochak.ncst.ernet.in/~khalid			  	  
> 
> **************************************************************************
> 
> 
> 
> -------------------------------------------------------
> This sf.net emial is sponsored by: Influence the future 
> of Java(TM) technology. Join the Java Community 
> Process(SM) (JCP(SM)) program now. 
> http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en
> _______________________________________________
> Anjuta-list mailing list
> Anjuta-list lists sourceforge net
> https://lists.sourceforge.net/lists/listinfo/anjuta-list






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]