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

Sascha Sommer saschasommer at freenet.de
Fri Oct 22 18:14:44 CEST 2004


On Friday 22 October 2004 12:20, Reimar Döffinger wrote:
> 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...).

I didn't try to compile it on mingw, but possible problems might be
SIGTRAP - some signal defines seem to be missing on mingw, even if it is there 
does it get handled?
getpid(),waitpid(),execlp() - do they exist on mingw?
fork() doesn't exist for sure.

Sascha





More information about the MPlayer-dev-eng mailing list