X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: "Hans Horn" Subject: Re: gdb attach to process to produce stacktrace Date: Wed, 20 Sep 2006 09:19:29 -0700 Lines: 34 Message-ID: References: <027801c6dccb$91bb4980$a501a8c0 AT CAM DOT ARTIMI DOT COM> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com That's all I needed to know. So in order for the process I'm attaching gdb to to terminate on its own I must not use anything that ends up in a windows dll. In the mingw/msys sources (msys\rt\src\newlib\libc\sys\go32\sleep.c) I found a sleep impl (DJ Delorie, 1991) that emulates the sleep functionality using repeated time() calls. no windows dll there - just what the doctor ordered. thanks for all your help. H. "Dave Korn" wrote in message news:027801c6dccb$91bb4980$a501a8c0 AT CAM DOT ARTIMI DOT COM... > On 20 September 2006 16:06, Hans Horn wrote: > >> The real question is as to why the parent process needs to go into a >> while(1) loop in order to produce the desired trace. > > Because then you're running in the program code, whereas in the sleep > function you've ended up in a windows dll function and ... > >>> Note that if the process is stopped in a Windows DLL the stack trace >>> will probably not be very informative. > > > cheers, > DaveK > -- > Can't think of a witty .sigline today.... > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/