From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31950 invoked by alias); 5 Jun 2014 16:28:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 31919 invoked by uid 89); 5 Jun 2014 16:28:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yh0-f41.google.com Received: from mail-yh0-f41.google.com (HELO mail-yh0-f41.google.com) (209.85.213.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 05 Jun 2014 16:28:08 +0000 Received: by mail-yh0-f41.google.com with SMTP id f73so1055729yha.14 for ; Thu, 05 Jun 2014 09:28:06 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.236.113.69 with SMTP id z45mr86891013yhg.0.1401985686160; Thu, 05 Jun 2014 09:28:06 -0700 (PDT) Received: by 10.170.150.70 with HTTP; Thu, 5 Jun 2014 09:28:06 -0700 (PDT) In-Reply-To: <20140605130322.GC20572@blade.nx> References: <20140605130140.GA20572@blade.nx> <20140605130322.GC20572@blade.nx> Date: Thu, 05 Jun 2014 16:28:00 -0000 Message-ID: Subject: Re: [PATCH 2/3 v4] Refactor and expose core-dumping functionality From: Doug Evans To: Gary Benson Cc: "gdb-patches@sourceware.org" , Andrew Burgess , Eli Zaretskii , Florian Weimer , Mark Kettenis , Pedro Alves , Tom Tromey Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00275.txt.bz2 On Thu, Jun 5, 2014 at 6:03 AM, Gary Benson 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. > > > gdb/ > 2014-06-05 Gary Benson > > * utils.h (check_can_dump_core): New declaration. > (warn_cant_dump_core): Likewise. > (dump_core): Likewise. > * utils.c (dump_core): Made nonstatic. > (can_dump_core): Removed function. > (check_can_dump_core): New function. > (warn_cant_dump_core): Likewise. > (check_can_dump_core_warn): Likewise. > (internal_vproblem): Replace calls to can_dump_core with > calls to check_can_dump_core_warn. 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).