[v2,3/4] Deprecate frame_stop_reason_string.
Commit Message
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(-)
Comments
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.
On 29/04/2014 8:20 PM, Pedro Alves wrote:
> 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. :-(
Pedro,
You're right. Sorry. I messed up.
I'll post a V3 in which I'm going to try event harder.
Once again, sorry for wasting your time.
Andrew
@@ -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)
{
@@ -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
@@ -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);
}
@@ -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);
}
@@ -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));
}
}
}