From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5717 invoked by alias); 29 Apr 2014 19:56:34 -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 5702 invoked by uid 89); 29 Apr 2014 19:56:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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; Tue, 29 Apr 2014 19:56:32 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3TJuU7x029027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Apr 2014 15:56:31 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s3TJK5M1021880; Tue, 29 Apr 2014 15:20:06 -0400 Message-ID: <535FFB65.50101@redhat.com> Date: Tue, 29 Apr 2014 19:56:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Andrew Burgess CC: gdb-patches@sourceware.org Subject: Re: [PATCH v2 3/4] Deprecate frame_stop_reason_string. References: <533EC5B7.6080600@broadcom.com> <1397729716-8985-4-git-send-email-aburgess@broadcom.com> In-Reply-To: <1397729716-8985-4-git-send-email-aburgess@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-04/txt/msg00629.txt.bz2 I find such a patch with no description/rationale at all very hard to reason about. The description isn't included in the cover letter of this series either. Please don't make us jump through hoops to figure things out. :-( E.g., why is this deprecated? Why can't all callers be adjusted to the new function you're adding? These are the sorts of explanations that should be included in the commit log. -- Pedro Alves On 04/17/2014 11:15 AM, Andrew Burgess wrote: > gdb/ChangeLog: > > * frame.c (frame_stop_reason_string): Rename to ... > (deprecated_frame_stop_reason_string): this. > * frame.h (frame_stop_reason_string): Rename to ... > (deprecated_frame_stop_reason_string): this. > * stack.c (frame_info): Update call to frame_stop_reason_string. > (backtrace_command_1): Update call to frame_stop_reason_string. > * guile/scm-frame.c (gdbscm_unwind_stop_reason_string): Update > call to frame_stop_reason_string. > * python/py-frame.c (gdbpy_frame_stop_reason_string): Update call > to frame_stop_reason_string. > ~ChangeLog~ > --- > gdb/frame.c | 2 +- > gdb/frame.h | 5 +++-- > gdb/guile/scm-frame.c | 2 +- > gdb/python/py-frame.c | 2 +- > gdb/stack.c | 4 ++-- > 5 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/gdb/frame.c b/gdb/frame.c > index 5f05968..5a6e0c7 100644 > --- a/gdb/frame.c > +++ b/gdb/frame.c > @@ -2556,7 +2556,7 @@ get_frame_unwind_stop_reason (struct frame_info *frame) > /* Return a string explaining REASON. */ > > const char * > -frame_stop_reason_string (enum unwind_stop_reason reason) > +deprecated_frame_stop_reason_string (enum unwind_stop_reason reason) > { > switch (reason) > { > diff --git a/gdb/frame.h b/gdb/frame.h > index e451a93..7db5382 100644 > --- a/gdb/frame.h > +++ b/gdb/frame.h > @@ -495,9 +495,10 @@ enum unwind_stop_reason > > enum unwind_stop_reason get_frame_unwind_stop_reason (struct frame_info *); > > -/* Translate a reason code to an informative string. */ > +/* Translate a reason code to an informative string. This is DEPRECATED, > + use frame_stop_reason_string instead. */ > > -const char *frame_stop_reason_string (enum unwind_stop_reason); > +const char *deprecated_frame_stop_reason_string (enum unwind_stop_reason); > > /* Unwind the stack frame so that the value of REGNUM, in the previous > (up, older) frame is returned. If VALUEP is NULL, don't > diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c > index 6031a7f..ddd062c 100644 > --- a/gdb/guile/scm-frame.c > +++ b/gdb/guile/scm-frame.c > @@ -944,7 +944,7 @@ gdbscm_unwind_stop_reason_string (SCM reason_scm) > if (reason < UNWIND_FIRST || reason > UNWIND_LAST) > scm_out_of_range (FUNC_NAME, reason_scm); > > - str = frame_stop_reason_string (reason); > + str = deprecated_frame_stop_reason_string (reason); > return gdbscm_scm_from_c_string (str); > } > > diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c > index 8c80d39..e7fcfe3 100644 > --- a/gdb/python/py-frame.c > +++ b/gdb/python/py-frame.c > @@ -588,7 +588,7 @@ gdbpy_frame_stop_reason_string (PyObject *self, PyObject *args) > return NULL; > } > > - str = frame_stop_reason_string (reason); > + str = deprecated_frame_stop_reason_string (reason); > return PyUnicode_Decode (str, strlen (str), host_charset (), NULL); > } > > diff --git a/gdb/stack.c b/gdb/stack.c > index da7d977..4fa9dd6 100644 > --- a/gdb/stack.c > +++ b/gdb/stack.c > @@ -1528,7 +1528,7 @@ frame_info (char *addr_exp, int from_tty) > reason = get_frame_unwind_stop_reason (fi); > if (reason != UNWIND_NO_REASON) > printf_filtered (_(" Outermost frame: %s\n"), > - frame_stop_reason_string (reason)); > + deprecated_frame_stop_reason_string (reason)); > } > else if (get_frame_type (fi) == TAILCALL_FRAME) > puts_filtered (" tail call frame"); > @@ -1847,7 +1847,7 @@ backtrace_command_1 (char *count_exp, int show_locals, int no_filters, > reason = get_frame_unwind_stop_reason (trailing); > if (reason >= UNWIND_FIRST_ERROR) > printf_filtered (_("Backtrace stopped: %s\n"), > - frame_stop_reason_string (reason)); > + deprecated_frame_stop_reason_string (reason)); > } > } > } >