[MPlayer-dev-eng] [PATCH] automatic gdb attaching

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Oct 22 14:20:20 CEST 2004


Hi,

>> > the attached patch will try to attach gdb on receiving an "excpetional"
>> > signal. You can also trigger this by sending a SIGTRAP (might be useful
>> > for debugging hangs).
>> > The main purpose of this is helping in debugging rare bugs. So you can
>> > just go about playing your files, and if that bug occurs you can right
>> > start developing ;-).
>> > Of course, the code should not be enabled by default as it currently
is,
>> > and the gdb path should probably be detected by configure as well...
>> > Please commment...
>>
>> Revised version:
>> default: compiled in for everyone with a .developer file, activated only
>> when -crash-debug on command-line or crash-debug=yes in the config
>> file.
>>
>> Is this okay for everyone?
>
>Should have brought this up earlier, but could please add a check to
configure
>that disables it for mingw?

I could, but the question is: is this necessary? What happens on MinGW? I
had used similar code in another project also under MinGW, the only problem
(that I can remember) being that gdb can't do a backtrace from a signal
handler (ok, that actually makes it practically useless...).
There also might be other platforms where it won't work properly, so I'd
prefer a fix that works for all (e.g. by checking whatever doesn't work in
configure).

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list