Refactor and expose core-dumping functionality
This commit exposes the functions that dump core outside utils.c.
can_dump_core gains a new parameter, "limit_kind", to allow either
the soft or hard limit to be checked, and its printing has separated
into the new function warn_cant_dump_core. The new function
can_dump_core_warn does what can_dump_core previously did (print and
warn).
gdb/
2014-06-19 Gary Benson <gbenson@redhat.com>
* utils.h (resource_limit_kind): New enum.
(can_dump_core): New declaration.
(warn_cant_dump_core): Likewise.
(dump_core): Likewise.
* utils.c (dump_core): Made nonstatic. Added new
parameter "limit_kind".
(can_dump_core): Made nonstatic. Moved printing code to...
(warn_cant_dump_core): New function.
(can_dump_core_warn): Likewise.
(internal_vproblem): Replace calls to can_dump_core with
calls to can_dump_core_warn. Supply new argument to each.