[PATCH 0/3 v5] Demangler crash handler

Gary Benson
2014-06-09T15:22:44Z

Hi all,

This series is an updated version of the demangler crash handler
I posted last week. The main changes are:

1) check_can_dump_core has been renamed back to the can_dump_core,
and I renamed check_can_dump_core_warn as can_dump_core_warn as
per https://sourceware.org/ml/gdb-patches/2014-06/msg00307.html.

2) can_dump_core and can_dump_core_warn have a new parameter,
limit_kind, to specify which limit to check. The original
calls in internal_vproblem use the hard limit, and the
calls from the crash catcher that this series adds use the
soft limit.

3) The crash catcher prints "Attempting to dump core" to alert
the user that a core file might have been created.

The patches are split as before:

1/3 - adds a new category of internal problem for demangler
warnings. This patch is unchanged from the previous
two versions (PATCH 1/2 v3 and v4).
https://sourceware.org/ml/gdb-patches/2014-06/msg00142.html
https://sourceware.org/ml/gdb-patches/2014-06/msg00252.html

2/3 - refactors and exposes the core-dumping functions in utils.c.
This patch differs from the previous version as described in
points 1 and 2 in the above list.

3/3 - the crash catcher itself. This patch differs from the
previous version as described in points 2 and 3 in the
above list.

I would push all three patches as one commit. The news file entries
for the commit would be:

* New options

maint set catch-demangler-crashes (on|off)
maint show catch-demangler-crashes
Control whether GDB should attempt to catch crashes in the
symbol name demangler.

maint set demangler-warning quit (yes|no|ask)
maint show demangler-warning quit
Control whether GDB should exit if it catches a crash in the
symbol name demangler.

* New commands

maint demangler-warning
Cause GDB to call the internal function demangler_warning and
hence behave as though an internal error in the demangler has
been detected.

Is this ok to commit?

Thanks,
Gary

--