RE: How GDB handle this case while program works well in GDB but crash in mormal mode

Dave Korn
2005-06-07T16:10:18Z

----Original Message----
>From: Renzhong Xiao
>Sent: 05 June 2005 15:57

> Hi,
> I have some trouble in using GDB 6.3.50_2004-12-28-cvs in Cygwin
> to debug the mencoder (which is a program in MPlayer).When I run
> mencoder in normal mode,it will pop up an error message saying
> mencoder.exe has error and will be closed. But I run mencoder in
> gdb,it works well.
> I don't know how to find this bug in GDB,Does GDB has the some
> feature to handle this case?
>
> Any information will be very appreciate!
>
> Renzhong Xiao

Perhaps you can use the cygwin just-in-time debugging ability to solve the
problem; that way the program will run as usual, without the debugger
attached, up to the point when the error occurs; then cygwin will attach the
debugger once the error has happened. Hopefully that means the initial
stages of running the program will be undisturbed and the error will not be
masked.

To make this work, add 'error_start=C:\cygwin\bin\gdb.exe' (or whatever
else is the win32 path to gdb.exe, according to where you installed cygwin)
to your $CYGWIN environment variable before you start a cygwin shell, then
run mencoder. Hopefully as soon as it crashes cygwin will attach teh
debugger for you.

cheers,
DaveK
--
Can't think of a witty .sigline today....