This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/3 v4] Refactor and expose core-dumping functionality
- From: Gary Benson <gbenson at redhat dot com>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Andrew Burgess <aburgess at broadcom dot com>, Eli Zaretskii <eliz at gnu dot org>, Florian Weimer <fw at deneb dot enyo dot de>, Mark Kettenis <mark dot kettenis at xs4all dot nl>, Pedro Alves <palves at redhat dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Fri, 6 Jun 2014 10:08:54 +0100
- Subject: Re: [PATCH 2/3 v4] Refactor and expose core-dumping functionality
- Authentication-results: sourceware.org; auth=none
- References: <20140605130140 dot GA20572 at blade dot nx> <20140605130322 dot GC20572 at blade dot nx> <CAP9bCMQCPOKntVd2W8YwQS=TXjT-pu7QmYgiwQiUcSCezjGSxA at mail dot gmail dot com>
Doug Evans wrote:
> On Thu, Jun 5, 2014 at 6:03 AM, Gary Benson <gbenson@redhat.com> wrote:
> > This patch exposes the functions that dump core outside utils.c.
> > The function can_dump_core has been split into two new functions,
> > check_can_dump_core and warn_cant_dump_core so that the check and
> > the printed warning can be separated. A new function
> > check_can_dump_core_warn replaces the original can_dump_core.
>
> check_can_dump_core feels a bit clumsy over the original
> can_dump_core. can_dump_core (or can_dump_core_p) reads better to
> me. [And now it does what it says it does, without the side-effect
> of the printf.]
>
> Not sure if I'd rename check_can_dump_core_warn (or delete it).
Ok, I renamed check_can_dump_core back to the original can_dump_core,
and I renamed check_can_dump_core_warn as can_dump_core_warn (it's
called twice, so there would be duplication if I removed it).
I won't post another patch series for such a small change but the
updated patches are in my github (http://tinyurl.com/dmcc-v4-2 and
http://tinyurl.com/dmcc-v4-3) if you would like to take a look.
Patch 2 is the important one, patch 3 only has a couple of lines
changed.
Thanks,
Gary
--
http://gbenson.net/