[MPlayer-dev-eng] [PATCH] automatic gdb attaching
The Wanderer
inverseparadox at comcast.net
Tue Oct 19 04:38:24 CEST 2004
Reimar Döffinger wrote:
> +#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.)
--
The Wanderer
Warning: Simply because I argue an issue does not mean I agree with any
side of it.
A government exists to serve its citizens, not to control them.
More information about the MPlayer-dev-eng
mailing list