Rename frame_stop_reason_string to unwind_stop_reason_to_string.
authorAndrew Burgess <aburgess@broadcom.com>
Wed, 28 May 2014 21:46:33 +0000 (22:46 +0100)
committerAndrew Burgess <aburgess@broadcom.com>
Fri, 30 May 2014 21:40:29 +0000 (22:40 +0100)
  https://sourceware.org/ml/gdb-patches/2014-05/msg00721.html

This function is confusingly named, the "frame_" in the name implies it
somehow is frame dependent, when in reality the function just converts an
'enum unwind_stop_reason' value to a string.

gdb/ChangeLog:

* frame.c (frame_stop_reason_string): Rename to ...
(unwind_stop_reason_to_string): this.
* frame.h (frame_stop_reason_string): Rename to ...
(unwind_stop_reason_to_string): this.
* stack.c (frame_info): Update call to frame_stop_reason_string.
(backtrace_command_1): Likewise.
* guile/scm-frame.c (gdbscm_unwind_stop_reason_string): Likewise.
* python/py-frame.c (gdbpy_frame_stop_reason_string): Likewise.

gdb/ChangeLog
gdb/frame.c
gdb/frame.h
gdb/guile/scm-frame.c
gdb/python/py-frame.c
gdb/stack.c

index 6986a49fc7a7a4722f3f1e07b341299f24632517..11c13643e3a906060fb9e8f1f35af6bafc4d8511 100644 (file)
@@ -1,3 +1,14 @@
+2014-05-30  Andrew Burgess  <aburgess@broadcom.com>
+
+       * frame.c (frame_stop_reason_string): Rename to ...
+       (unwind_stop_reason_to_string): this.
+       * frame.h (frame_stop_reason_string): Rename to ...
+       (unwind_stop_reason_to_string): this.
+       * stack.c (frame_info): Update call to frame_stop_reason_string.
+       (backtrace_command_1): Likewise.
+       * guile/scm-frame.c (gdbscm_unwind_stop_reason_string): Likewise.
+       * python/py-frame.c (gdbpy_frame_stop_reason_string): Likewise.
+
 2014-05-30  Andrew Burgess  <aburgess@broadcom.com>
 
        * frame.c (remove_prev_frame): New function.
index cbff25fcb45f195d2f9ba9758abf080046054a38..f44cf5086445f434f53d24f4d6a5891caf2d0ce5 100644 (file)
@@ -2561,7 +2561,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)
+unwind_stop_reason_to_string (enum unwind_stop_reason reason)
 {
   switch (reason)
     {
index ad03a0b06475cb1dabf76bd134c20be0f3d9d9c5..79881521d7a9472d59e3cd4c1ef4228ae5421fc4 100644 (file)
@@ -503,7 +503,7 @@ enum unwind_stop_reason get_frame_unwind_stop_reason (struct frame_info *);
 
 /* Translate a reason code to an informative string.  */
 
-const char *frame_stop_reason_string (enum unwind_stop_reason);
+const char *unwind_stop_reason_to_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
index 88009230370a14093fa1cd7c2a15ad5d26c57b27..9c0b00d9f465a89025192c931578aef116e54aa6 100644 (file)
@@ -933,7 +933,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 = unwind_stop_reason_to_string (reason);
   return gdbscm_scm_from_c_string (str);
 }
 \f
index 8c80d39d0f3b48bf5bae30174cbc76d80d67a6e6..77077d3f00c30c46645edd8149f90c0844157171 100644 (file)
@@ -588,7 +588,7 @@ gdbpy_frame_stop_reason_string (PyObject *self, PyObject *args)
       return NULL;
     }
 
-  str = frame_stop_reason_string (reason);
+  str = unwind_stop_reason_to_string (reason);
   return PyUnicode_Decode (str, strlen (str), host_charset (), NULL);
 }
 
index 297ba320a9003b490cbd52ee698ffe83bc3f1ff9..630a3637fd4e64cd5c480dd8f52ed399fe005779 100644 (file)
@@ -1529,7 +1529,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));
+                        unwind_stop_reason_to_string (reason));
     }
   else if (get_frame_type (fi) == TAILCALL_FRAME)
     puts_filtered (" tail call frame");
@@ -1848,7 +1848,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));
+                            unwind_stop_reason_to_string (reason));
        }
     }
 }