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

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Oct 19 10:12:23 CEST 2004


Hi,

> > +#ifdef CRASH_DEBUG
> > +      {
> > +        int gdb_pid;
> > +        char spid[20];
> > +        snprintf(spid, 19, "%i", getpid());
> > +        spid[19] = 0;
> > +        mp_msg(MSGT_CPLAYER, MSGL_ERR, "Forking...\n");
> > +        gdb_pid = fork();
> > +        mp_msg(MSGT_CPLAYER, MSGL_ERR, "Forked...\n");
> > +        if (gdb_pid == 0) { // We are the child
> > +          if (execl("/usr/bin/gdb", "gdb", prog_path, spid, NULL)
== -1)
> > +            mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't start gdb\n");
> > +        } else if (gdb_pid < 0)
> > +          mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't fork\n");
>
> Is CRASH_DEBUG expected to be defined only in cases where the person
> reading the output will be using the English translation? If not, please
> either add these messages to the translations file or make them MSGL_V
> or higher.
>
> (Now I expect that someone else will say "don't" and explain why I'm an
> idiot for making the suggestion... but I learned something while reading
> the rest of the patch, so this wasn't a total waste anyway.)

That isn't a finished patch. That code will be for developers only! I'm
quite sure anybody who doesn't understand English will not want to have gdb
startup automatically ;-)

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list