This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [cgf: Re: rxvt SEGV (Win98, 1.1.5s/2000-10-08)]


On Tue, Oct 17, 2000 at 04:52:49PM -0400, Jonathan Kamens wrote:
>>  and set
>>  CYGWIN=error_start=x:/path/to/gdb.exe .  This will cause cygwin to pop
>>  up a gdb window when it encounters an error.  If you then issue the
>>  following commands:
>>  
>>      thread 1
>>      bt
>>  
>>  It should be a little clearer what is going on.
>>  
>>  Barring that, strace output would also probably help pinpoint the problem:
>>  
>>  strace -om:/tmp/strace.out make
>>  
>>  (this will probably be a big file) Please do this with the most recent
>>  snapshot.  That would be 2000-10-16.
>
>Unfortunately, this isn't so simple.
>
>* Sometimes when I use the error_start setting you indicated, and the
>error that Cygwin encounters is "c:\cygwin\bin=make.exe: *** couldn't
>send signal 20", Cygwin then hangs rather than popping up a gdb window
>as you described.  My only recourse at that point appears to be to
>kill all the running Make processes using the task manager.

If you configure in the winsup directory with '--enable-debugging' this
will cause gdb to pop up when this error occurs.

>* Other times, I get something that looks like this:
>
>      0 [sig] make 207 handle_exceptions: exception: STATUS_ACCESS_VIOLATION
>   9124 [sig] make 207 stackdump: Dumping stack trace to make.exe.stackdump
>
>What then pops up is a GUI debugger which I've never used before.  It
>wasn't obvious, but I eventually figured out that I'm supposed to
>select "View -> Console" and then type the commands you specified in
>the window that pops up.  Unfortunately, the output is useless:
>
>  (gdb) thread 1
>  [Switching to thread 1 (process 261)]
>  #0  0x0 in ?? ()
>
>  (gdb) bt
>  #0  0x0 in ?? ()
>
>  (gdb) 
>
>Do I need to compile a later version of gdb than 1.1.4 in order for
>this to be useful?  If so, where do I get the source code from, or is
>there a precompiled binary somewhere that I can use?  Do I need to
>compile cygwin1.dll in a manner different from how I actually compiled
>it?

The gdb that comes with cygwin should be adequate.  You can start it up
in just console mode by typing 'gdb -nw'.  You'll have to set up a
.bat file to do this:

gdb -nw %1 %2 %3 %4 %5

Then you don't have to use the unfamiliar console.

The other threads may have useful information:  'thread apply all bt'

If all else fails, you can decode the stackdump by typing
l *0x610xxxx (or whatever) in gdb on each address.

>  When I run the command under strace inside bash, it produces a 35Mb
>log file and doesn't fail.  When I run the command under strace at the
>CMD prompt, it produces about a 1Mb log file and then fails with an
>error message like "strace: Closing child handle 00000038".

This should be fixed in snapshot versions of strace (or if you build
from sources).  This error is a problem in strace that has no bearing
on the cygwin problem.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]