This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: DOS/Windows-specific code: maint.c
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: DOS/Windows-specific code: maint.c
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Wed, 9 May 2001 13:24:04 +0300 (IDT)
- cc: gdb at sources dot redhat dot com
On Tue, 8 May 2001, Kevin Buettner wrote:
> I don't know. SIGABRT seems like a better (more portable) choice.
>
> With that in mind, why not do the following:
>
> /* ARGSUSED */
> static void
> maintenance_dump_me (char *args, int from_tty)
> {
> if (query ("Should GDB dump core? "))
> {
> #ifdef SIGABRT
> signal (SIGABRT, SIG_DFL);
> kill (getpid (), SIGABRT);
> #else
> error ("Not supported on this platform.");
> #endif
> }
> }
>
> Note that the _WIN32 ifdef has been removed so that
> maintenance_dump_me() will always be defined.
Yes, that looks good to me.