This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 3/4] Deprecate frame_stop_reason_string.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]