Re: [patch] Do not disappoint on "Create a core file of GDB?"

Eli Zaretskii
2010-01-15T08:24:58Z

> Date: Fri, 15 Jan 2010 01:28:05 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Tristan Gingold <gingold@adacore.com>, gdb-patches@sourceware.org
>
> On Tue, 12 Jan 2010 20:37:50 +0100, Eli Zaretskii wrote:
> > In case I wasn't clear, I was actually wondering how come we compile a
> > source file that's needed for reading and writing core files on a
> > system where core files aren't supported. We shouldn't compile it,
> > and this problem should not exist.
>
> This code is about invoking system default SIGABRT action which is usually to
> dump a core. Calling abort() is simple enough it IMO does not make sense to
> move it to some host/target-dependent file.

I don't want to start a dispute, just to make sure my intent is clear.

We are calling `abort' here with a very specific purpose: producing a
core file. On systems that don't support core files, calling `abort'
in this context does not make sense, even though `bort' is an ANSI
function and should be supported by any system where GDB can be built.
So the code which does that should not be compiled on such systems,
IMO. Ifdef'ing it away conditioned by such systems is much easier
than introducing configury, whose results we know in advance.