This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 3/4] Deprecate frame_stop_reason_string.
- From: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>, gdb-patches at sourceware dot org
- Date: Wed, 28 May 2014 18:26:43 +0100
- Subject: Re: [PATCH v3 3/4] Deprecate frame_stop_reason_string.
- Authentication-results: sourceware.org; auth=none
- References: <533EC5B7 dot 6080600 at broadcom dot com> <1398855344-25278-1-git-send-email-aburgess at broadcom dot com> <1398855344-25278-4-git-send-email-aburgess at broadcom dot com>
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