Refactor and expose core-dumping functionality
authorGary Benson <gbenson@redhat.com>
Thu, 19 Jun 2014 08:12:26 +0000 (09:12 +0100)
committerGary Benson <gbenson@redhat.com>
Thu, 19 Jun 2014 08:12:26 +0000 (09:12 +0100)
commiteae7090bea9d7f129be7dddf89f8e177cdb2003d
tree28804d4f3455eb633c4829f0c9c872314fdd8788
parent57fcfb1b202c09bf83e0e98dfb1d518e7be71d2c
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.
gdb/ChangeLog
gdb/utils.c
gdb/utils.h