Change tui_show_frame_info to return bool
authorTom Tromey <tom@tromey.com>
Wed, 13 Nov 2019 23:33:21 +0000 (16:33 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 20 Dec 2019 16:15:58 +0000 (09:15 -0700)
This changes tui_show_frame_info to return bool.

gdb/ChangeLog
2019-12-20  Tom Tromey  <tom@tromey.com>

* tui/tui-stack.h (tui_show_frame_info): Return bool.
* tui/tui-stack.c (tui_show_frame_info): Return bool.
* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
Update.

Change-Id: Id1374f04f919c30a9f50c1beeb70cbc10b9a8f3b

gdb/ChangeLog
gdb/tui/tui-hooks.c
gdb/tui/tui-stack.c
gdb/tui/tui-stack.h

index c34d1126ecead54126cce123cf3111091780dbde..fa1795811836c94074a02d529eb24cf85a412146 100644 (file)
@@ -1,3 +1,10 @@
+2019-12-20  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-stack.h (tui_show_frame_info): Return bool.
+       * tui/tui-stack.c (tui_show_frame_info): Return bool.
+       * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
+       Update.
+
 2019-12-20  Tom Tromey  <tom@tromey.com>
 
        PR tui/18932:
index deb10b0d37b4aea943b90d818a0364bcc299d64e..8576bb8fccde5f309588ce24d6e5df16f9c02587 100644 (file)
@@ -133,7 +133,7 @@ tui_refresh_frame_and_register_information ()
 
       /* Display the frame position (even if there is no symbols or
         the PC is not known).  */
-      int frame_info_changed_p = tui_show_frame_info (fi);
+      bool frame_info_changed_p = tui_show_frame_info (fi);
 
       /* Refresh the register window if it's visible.  */
       if (tui_is_window_visible (DATA_WIN)
index d2443438596a8f46f0e7d48e2dbf10c930bdb079..3f606cbeb47bff973bc125df853fe9fd7f9d1124 100644 (file)
@@ -301,10 +301,10 @@ tui_update_locator_fullname (struct symtab *symtab)
 /* Function to print the frame information for the TUI.  The windows are
    refreshed only if frame information has changed since the last refresh.
 
-   Return 1 if frame information has changed (and windows subsequently
-   refreshed), 0 otherwise.  */
+   Return true if frame information has changed (and windows
+   subsequently refreshed), false otherwise.  */
 
-int
+bool
 tui_show_frame_info (struct frame_info *fi)
 {
   bool locator_changed_p;
@@ -329,15 +329,13 @@ tui_show_frame_info (struct frame_info *fi)
         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)
-       return 0;
+       return false;
 
       for (struct tui_source_window_base *win_info : tui_source_windows ())
        {
          win_info->maybe_update (fi, sal);
          win_info->update_exec_info ();
        }
-
-      return 1;
     }
   else
     {
@@ -346,13 +344,13 @@ tui_show_frame_info (struct frame_info *fi)
       locator_changed_p = locator->set_locator_info (NULL, sal, "");
 
       if (!locator_changed_p)
-       return 0;
+       return false;
 
       for (struct tui_source_window_base *win_info : tui_source_windows ())
        win_info->erase_source_content ();
-
-      return 1;
     }
+
+  return true;
 }
 
 void
index 3bfe529244c6b2324b4f592c84418c4856d31e13..0a928f328b4955c15d6b17b13c387927d272b5eb 100644 (file)
@@ -78,6 +78,6 @@ private:
 
 extern void tui_update_locator_fullname (struct symtab *symtab);
 extern void tui_show_locator_content (void);
-extern int tui_show_frame_info (struct frame_info *);
+extern bool tui_show_frame_info (struct frame_info *);
 
 #endif /* TUI_TUI_STACK_H */
This page took 0.032775 seconds and 4 git commands to generate.