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

Jan Kratochvil
2010-01-15T00:28:45Z

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.

You are probably suggesting that GDB could fork, attaching to its copy (in
a new inferior) and invoke gcore on the copy. This would be a functionality
enabled only for native targets (*-nat.c) so that it could dump core even on
operating systems not supporting such operation.

It would be a feature currently unsupported by GDB and out of the scope of
this patch. Still the system core dumping would be preferred over this
GDB-native dump as it is more safe for half-crashed GDB. Therefore such
functionality would have limited audience.

Regards,
Jan