From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5389 invoked by alias); 28 May 2014 17:26:49 -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 5372 invoked by uid 89); 28 May 2014 17:26:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 May 2014 17:26:47 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4SHQjC0008157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 May 2014 13:26:45 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s4SHQhef014748; Wed, 28 May 2014 13:26:44 -0400 Message-ID: <53861C53.5060402@redhat.com> Date: Wed, 28 May 2014 17:26:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Andrew Burgess , gdb-patches@sourceware.org Subject: Re: [PATCH v3 3/4] Deprecate frame_stop_reason_string. References: <533EC5B7.6080600@broadcom.com> <1398855344-25278-1-git-send-email-aburgess@broadcom.com> <1398855344-25278-4-git-send-email-aburgess@broadcom.com> In-Reply-To: <1398855344-25278-4-git-send-email-aburgess@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-05/txt/msg00693.txt.bz2 On 04/30/2014 11:55 AM, Andrew Burgess wrote: > Patch #4 adds frame specific stop reason strings. It is better to use that > string rather than the existing generic stop reason string. This patch > renames frame_stop_reason_string to deprecated_frame_stop_reason_string and > updates all the call sites to use the deprecated name. > > Patch #4 adds the new frame specific stop reason, and some uses of the > deprecated funciton will be moved to this new API, however, in the python > and guile scripting API we expose a function that converts the stop reason > code into a string, without a frame, this will be harder to convert to the WDYM, harder? It seems downright impossible to me. :-) The function still serves it's purpose of mapping the enum values to string equivalents. I don't really see a need to mark it deprecated. IMO, the real problem with its signature is the "frame_" in its name. The function converts an 'enum unwind_stop_reason' value to a string, so like other similar cases in the tree, how about renaming the function to match? E.g.: -const char *frame_stop_reason_string (enum unwind_stop_reason); +const char *unwind_stop_reason_to_string (enum unwind_stop_reason); -- Pedro Alves