[binutils-gdb] Change tui_check_register_values to be a method

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[binutils-gdb] Change tui_check_register_values to be a method

gdb-buildbot
*** TEST RESULTS FOR COMMIT 63356bfda1603f67db865dceff5a3a4d028c9d5a ***

commit 63356bfda1603f67db865dceff5a3a4d028c9d5a
Author:     Tom Tromey <[hidden email]>
AuthorDate: Sat Jul 13 16:15:30 2019 -0600
Commit:     Tom Tromey <[hidden email]>
CommitDate: Tue Aug 20 16:45:50 2019 -0600

    Change tui_check_register_values to be a method
   
    This changes tui_check_register_values to be a method on
    tui_data_window.  An additional check in tui_register_changed is
    needed, because TUI_DATA_WIN could be NULL at this point.
   
    2019-08-20  Tom Tromey  <[hidden email]>
   
            * tui/tui-regs.h (struct tui_data_window) <check_register_values>:
            Declare.
            (tui_check_register_values): Don't declare.
            * tui/tui-regs.c (tui_data_window::check_register_values): Rename
            from tui_check_register_values.
            * tui/tui-hooks.c (tui_register_changed): Update.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 27fcb35a55..1e93dd0868 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2019-08-20  Tom Tromey  <[hidden email]>
+
+ * tui/tui-regs.h (struct tui_data_window) <check_register_values>:
+ Declare.
+ (tui_check_register_values): Don't declare.
+ * tui/tui-regs.c (tui_data_window::check_register_values): Rename
+ from tui_check_register_values.
+ * tui/tui-hooks.c (tui_register_changed): Update.
+
 2019-08-20  Tom Tromey  <[hidden email]>
 
  * tui/tui-regs.c (tui_reg_layout): Move later.
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index 5cc90dd3b6..2555da7f1a 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -71,6 +71,9 @@ tui_register_changed (struct frame_info *frame, int regno)
 {
   struct frame_info *fi;
 
+  if (!tui_is_window_visible (DATA_WIN))
+    return;
+
   /* The frame of the register that was changed may differ from the selected
      frame, but we only want to show the register values of the selected frame.
      And even if the frames differ a register change made in one can still show
@@ -80,7 +83,7 @@ tui_register_changed (struct frame_info *frame, int regno)
   if (tui_refreshing_registers == 0)
     {
       tui_refreshing_registers = 1;
-      tui_check_register_values (fi);
+      TUI_DATA_WIN->check_register_values (fi);
       tui_refreshing_registers = 0;
     }
 }
@@ -152,7 +155,7 @@ tui_refresh_frame_and_register_information (int registers_too_p)
       && (frame_info_changed_p || registers_too_p))
     {
       tui_refreshing_registers = 1;
-      tui_check_register_values (fi);
+      TUI_DATA_WIN->check_register_values (fi);
       tui_refreshing_registers = 0;
     }
 }
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 147f57a13a..cd343edc31 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -555,29 +555,24 @@ tui_data_window::refresh_window ()
    given a particular frame.  If the values have changed, they are
    updated with the new value and highlighted.  */
 void
-tui_check_register_values (struct frame_info *frame)
+tui_data_window::check_register_values (struct frame_info *frame)
 {
-  if (TUI_DATA_WIN != NULL
-      && TUI_DATA_WIN->is_visible ())
+  if (regs_content.empty () && display_regs)
+    tui_show_registers (current_group);
+  else
     {
-      if (TUI_DATA_WIN->regs_content.empty ()
-  && TUI_DATA_WIN->display_regs)
- tui_show_registers (TUI_DATA_WIN->current_group);
-      else
+      for (auto &&data_item_win_ptr : regs_content)
  {
-  for (auto &&data_item_win_ptr : TUI_DATA_WIN->regs_content)
-    {
-      int was_hilighted;
+  int was_hilighted;
 
-      was_hilighted = data_item_win_ptr->highlight;
+  was_hilighted = data_item_win_ptr->highlight;
 
-              tui_get_register (frame, data_item_win_ptr.get (),
-                                data_item_win_ptr->item_no,
- &data_item_win_ptr->highlight);
+  tui_get_register (frame, data_item_win_ptr.get (),
+    data_item_win_ptr->item_no,
+    &data_item_win_ptr->highlight);
 
-      if (data_item_win_ptr->highlight || was_hilighted)
- tui_display_register (data_item_win_ptr.get ());
-    }
+  if (data_item_win_ptr->highlight || was_hilighted)
+    tui_display_register (data_item_win_ptr.get ());
  }
     }
 }
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index b70d8df362..01c2ea6dad 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -100,6 +100,8 @@ struct tui_data_window : public tui_win_info
      started from.  If nothing is displayed (-1) is returned.  */
   int display_registers_from_line (int line_no);
 
+  void check_register_values (struct frame_info *frame);
+
 protected:
 
   void do_scroll_vertical (int num_to_scroll) override;
@@ -120,7 +122,6 @@ protected:
   void rerender () override;
 };
 
-extern void tui_check_register_values (struct frame_info *);
 extern void tui_show_registers (struct reggroup *group);
 
 #endif /* TUI_TUI_REGS_H */
Reply | Threaded
Open this post in threaded view
|

Failures on Ubuntu-Aarch64-native-gdbserver-m64, branch master

gdb-buildbot
Buildername:
        Ubuntu-Aarch64-native-gdbserver-m64

Worker:
        ubuntu-aarch64

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/19/builds/558

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        63356bfda1603f67db865dceff5a3a4d028c9d5a

Subject of commit:
        Change tui_check_register_values to be a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-gdbserver-m64/63/63356bfda1603f67db865dceff5a3a4d028c9d5a/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-gdbserver-m64/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-gdbserver-m64/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-i686, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-i686

Worker:
        fedora-x86-64-1

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/18/builds/627

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        63356bfda1603f67db865dceff5a3a4d028c9d5a

Subject of commit:
        Change tui_check_register_values to be a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-i686/63/63356bfda1603f67db865dceff5a3a4d028c9d5a/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.mi/user-selected-context-sync.exp: mode=non-stop: test_setup: inferior 2: set breakpoint in main
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-m32

Worker:
        fedora-x86-64-2

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/17/builds/625

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        63356bfda1603f67db865dceff5a3a4d028c9d5a

Subject of commit:
        Change tui_check_register_values to be a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/63/63356bfda1603f67db865dceff5a3a4d028c9d5a/

*** Diff to previous build ***
==============================================
new FAIL: gdb.base/corefile.exp: core-file warning-free
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m32

Worker:
        fedora-x86-64-1

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/4/builds/624

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        63356bfda1603f67db865dceff5a3a4d028c9d5a

Subject of commit:
        Change tui_check_register_values to be a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/63/63356bfda1603f67db865dceff5a3a4d028c9d5a/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m64

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/2/builds/625

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        63356bfda1603f67db865dceff5a3a4d028c9d5a

Subject of commit:
        Change tui_check_register_values to be a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/63/63356bfda1603f67db865dceff5a3a4d028c9d5a/

*** Diff to previous build ***
==============================================
PASS -> UNRESOLVED: gdb.threads/attach-into-signal.exp: threaded: attach
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-gdbserver-m32

Worker:
        fedora-x86-64-2

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/24/builds/624

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        63356bfda1603f67db865dceff5a3a4d028c9d5a

Subject of commit:
        Change tui_check_register_values to be a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/63/63356bfda1603f67db865dceff5a3a4d028c9d5a/

*** Diff to previous build ***
==============================================
new FAIL: gdb.base/corefile.exp: core-file warning-free
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m64, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-gdbserver-m64

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/22/builds/624

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        63356bfda1603f67db865dceff5a3a4d028c9d5a

Subject of commit:
        Change tui_check_register_values to be a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/63/63356bfda1603f67db865dceff5a3a4d028c9d5a/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/63/63356bfda1603f67db865dceff5a3a4d028c9d5a//xfail.table.gz>