]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Rename TUI locator window -> status
authorTom Tromey <tom@tromey.com>
Fri, 8 Dec 2023 17:32:07 +0000 (10:32 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 21 Dec 2023 23:43:02 +0000 (16:43 -0700)
The TUI status window is called the "locator" in the source, but
"status" in the documentation.  Whenever I've needed to find the code,
I've had to search to "locate" it (ha, ha).  This patch renames the
window to match the public name of the window.

gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-layout.c
gdb/tui/tui-location.c
gdb/tui/tui-location.h
gdb/tui/tui-status.c
gdb/tui/tui-status.h
gdb/tui/tui.c

index bdc1eff473b6610a84950f97a5b4492d72e75a72..ee7d158b27c014c02bfe9502c460e20cbcf76b92 100644 (file)
@@ -70,7 +70,7 @@ tui_set_win_focus_to (struct tui_win_info *win_info)
       tui_unhighlight_win (win_with_focus);
       win_with_focus = win_info;
       tui_highlight_win (win_info);
-      tui_show_locator_content ();
+      tui_show_status_content ();
     }
 }
 
index 76d0de3a3f0cf0ce15bae8ff85d0a2eb7e5f18b6..847ad6da714d098563a1b56192cfcf39e541ea67 100644 (file)
@@ -298,7 +298,7 @@ extern struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS];
 #define TUI_CMD_WIN \
   (gdb::checked_static_cast<tui_cmd_window *> (tui_win_list[CMD_WIN]))
 #define TUI_STATUS_WIN \
-  (gdb::checked_static_cast<tui_locator_window *> (tui_win_list[STATUS_WIN]))
+  (gdb::checked_static_cast<tui_status_window *> (tui_win_list[STATUS_WIN]))
 
 /* All the windows that are currently instantiated, in layout
    order.  */
index 71e0961ca18cc2f61b5d16561d566c7b67a02605..f194fa958641dcb6cc7d9b3330b17be493f04739 100644 (file)
@@ -306,7 +306,7 @@ tui_win_info::resize (int height_, int width_,
 
 \f
 
-/* Helper function to create one of the built-in (non-locator)
+/* Helper function to create one of the built-in (non-status)
    windows.  */
 
 template<enum tui_win_type V, class T>
@@ -369,7 +369,7 @@ initialize_known_windows ()
                                                    tui_disasm_window>);
   known_window_types.emplace (STATUS_NAME,
                               make_standard_window<STATUS_WIN,
-                                                   tui_locator_window>);
+                                                   tui_status_window>);
 }
 
 /* See tui-layout.h.  */
index da41d63631ef405414f81f138ba1606bc82af71d..759719816c3bbf2038d92b9f3e3c1bb2ef03a3b0 100644 (file)
@@ -48,7 +48,7 @@ tui_location_tracker::set_location (struct gdbarch *gdbarch,
   m_gdbarch = gdbarch;
 
   if (location_changed_p)
-    tui_show_locator_content ();
+    tui_show_status_content ();
 
   return location_changed_p;
 }
@@ -61,7 +61,7 @@ tui_location_tracker::set_location (struct symtab *symtab)
   bool location_changed_p = set_fullname (symtab);
 
   if (location_changed_p)
-    tui_show_locator_content ();
+    tui_show_status_content ();
 
   return location_changed_p;
 }
index 514d2da5b8f0357e99e235444216414ddb4cdf1d..ebe493ecc9f24936f261988d80a686316c0f00f8 100644 (file)
@@ -32,9 +32,9 @@
 
 struct tui_location_tracker
 {
-  /* Update the current location with the provided arguments.  Returns true
-     if any of the locator's fields were actually changed, and false
-     otherwise.  */
+  /* Update the current location with the provided arguments.  Returns
+     true if any of the status window's fields were actually changed,
+     and false otherwise.  */
   bool set_location (struct gdbarch *gdbarch,
                     const struct symtab_and_line &sal,
                     const char *procname);
index 3e11ff97089aaac8af60ab4cc46a2058395dd137..dab22f292452254d499bf52b6cac27f00bf5cf13 100644 (file)
@@ -1,4 +1,4 @@
-/* TUI display locator.
+/* TUI status line.
 
    Copyright (C) 1998-2023 Free Software Foundation, Inc.
 
@@ -58,7 +58,7 @@ static const std::string SINGLE_KEY = "(SingleKey)";
 \f
 
 std::string
-tui_locator_window::make_status_line () const
+tui_status_window::make_status_line () const
 {
   char line_buf[50];
   int status_size;
@@ -152,7 +152,7 @@ tui_locator_window::make_status_line () const
        }
     }
 
-  /* Now create the locator line from the string version of the
+  /* Now create the status line from the string version of the
      elements.  */
   string_file string;
 
@@ -242,7 +242,7 @@ tui_get_function_from_frame (frame_info_ptr fi)
 }
 
 void
-tui_locator_window::rerender ()
+tui_status_window::rerender ()
 {
   gdb_assert (handle != NULL);
 
@@ -271,7 +271,7 @@ tui_locator_window::rerender ()
 bool
 tui_show_frame_info (frame_info_ptr fi)
 {
-  bool locator_changed_p;
+  bool status_changed_p;
 
   if (fi != nullptr)
     {
@@ -285,13 +285,13 @@ tui_show_frame_info (frame_info_ptr fi)
       else
        func_name = _("<unavailable>");
 
-      locator_changed_p
+      status_changed_p
        = tui_location.set_location (get_frame_arch (fi), sal, func_name);
 
-      /* If the locator information has not changed, then frame information has
+      /* If the status information has not changed, then frame information has
         not changed.  If frame information has not changed, then the windows'
         contents will not change.  So don't bother refreshing the windows.  */
-      if (!locator_changed_p)
+      if (!status_changed_p)
        return false;
 
       for (struct tui_source_window_base *win_info : tui_source_windows ())
@@ -304,9 +304,9 @@ tui_show_frame_info (frame_info_ptr fi)
     {
       symtab_and_line sal {};
 
-      locator_changed_p = tui_location.set_location (NULL, sal, "");
+      status_changed_p = tui_location.set_location (NULL, sal, "");
 
-      if (!locator_changed_p)
+      if (!status_changed_p)
        return false;
 
       for (struct tui_source_window_base *win_info : tui_source_windows ())
@@ -317,7 +317,7 @@ tui_show_frame_info (frame_info_ptr fi)
 }
 
 void
-tui_show_locator_content ()
+tui_show_status_content ()
 {
   if (tui_is_window_visible (STATUS_WIN))
     TUI_STATUS_WIN->rerender ();
@@ -338,7 +338,7 @@ void
 _initialize_tui_stack ()
 {
   add_com ("update", class_tui, tui_update_command,
-          _("Update the source window and locator to "
-            "display the current execution point.\n\
+          _("\
+Update the source window to display the current execution point.\n\
 Usage: update"));
 }
index ca95b2bf78a95524a5c09a08339f4dd5da9fac0e..31e9643ae35ed50257a67e6153b420e499ed69bc 100644 (file)
@@ -1,4 +1,4 @@
-/* TUI display locator.
+/* TUI status line.
 
    Copyright (C) 1998-2023 Free Software Foundation, Inc.
 
@@ -19,8 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef TUI_TUI_STACK_H
-#define TUI_TUI_STACK_H
+#ifndef TUI_TUI_STATUS_H
+#define TUI_TUI_STATUS_H
 
 #include "tui/tui-data.h"
 
@@ -28,11 +28,11 @@ class frame_info_ptr;
 
 /* Locator window class.  */
 
-struct tui_locator_window
+struct tui_status_window
   : public tui_nofocus_window, tui_noscroll_window, tui_oneline_window,
     tui_nobox_window
 {
-  tui_locator_window () = default;
+  tui_status_window () = default;
 
   const char *name () const override
   {
@@ -50,7 +50,7 @@ private:
   std::string make_status_line () const;
 };
 
-extern void tui_show_locator_content (void);
+extern void tui_show_status_content (void);
 extern bool tui_show_frame_info (frame_info_ptr);
 
-#endif /* TUI_TUI_STACK_H */
+#endif /* TUI_TUI_STATUS_H */
index 647fa07dce35075ad1ce1e390ab113517db627ee..4c180f7343653bba12a4583245b948954668ea32 100644 (file)
@@ -291,7 +291,7 @@ tui_set_key_mode (enum tui_key_mode mode)
   tui_current_key_mode = mode;
   rl_set_keymap (mode == TUI_SINGLE_KEY_MODE
                 ? tui_keymap : tui_readline_standard_keymap);
-  tui_show_locator_content ();
+  tui_show_status_content ();
 }
 
 /* Initialize readline and configure the keymap for the switching