[binutils-gdb] Add two methods to tui_data_window

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

[binutils-gdb] Add two methods to tui_data_window

gdb-buildbot
*** TEST RESULTS FOR COMMIT ca02d7c8003ad020bb39f0b26dc93b661be67132 ***

commit ca02d7c8003ad020bb39f0b26dc93b661be67132
Author:     Tom Tromey <[hidden email]>
AuthorDate: Sat Jul 13 16:19:11 2019 -0600
Commit:     Tom Tromey <[hidden email]>
CommitDate: Tue Aug 20 16:45:50 2019 -0600

    Add two methods to tui_data_window
   
    This changes tui_show_registers and tui_show_register_group to be
    methods on tui_data_window.
   
    2019-08-20  Tom Tromey  <[hidden email]>
   
            * tui/tui-regs.h (struct tui_data_window) <show_registers,
            show_register_group>: Declare.
            (tui_show_register_group): Don't declare.
            * tui/tui-regs.c (tui_data_window::show_registers): Rename from
            tui_show_registers.
            (tui_data_window::show_register_group): Rename from
            tui_show_register_group.
            (tui_data_window::check_register_values, tui_reg_command):
            Update.
            * tui/tui-layout.c (tui_set_layout): Update.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1e93dd0868..e50995d858 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+2019-08-20  Tom Tromey  <[hidden email]>
+
+ * tui/tui-regs.h (struct tui_data_window) <show_registers,
+ show_register_group>: Declare.
+ (tui_show_register_group): Don't declare.
+ * tui/tui-regs.c (tui_data_window::show_registers): Rename from
+ tui_show_registers.
+ (tui_data_window::show_register_group): Rename from
+ tui_show_register_group.
+ (tui_data_window::check_register_values, tui_reg_command):
+ Update.
+ * tui/tui-layout.c (tui_set_layout): Update.
+
 2019-08-20  Tom Tromey  <[hidden email]>
 
  * tui/tui-regs.h (struct tui_data_window) <check_register_values>:
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index b7c5ed63c6..08b18e5efa 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -189,7 +189,7 @@ tui_set_layout (enum tui_layout_type layout_type)
       tui_update_source_windows_with_addr (gdbarch, addr);
       if (new_layout == SRC_DATA_COMMAND
   || new_layout == DISASSEM_DATA_COMMAND)
- tui_show_registers (TUI_DATA_WIN->current_group);
+ TUI_DATA_WIN->show_registers (TUI_DATA_WIN->current_group);
     }
 }
 
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index cd343edc31..8adfb1520a 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -44,11 +44,6 @@
 
 static void tui_display_register (struct tui_data_item_window *data);
 
-static void tui_show_register_group (tui_data_window *win_info,
-     struct reggroup *group,
-     struct frame_info *frame,
-     int refresh_values_only);
-
 /* Get the register from the frame and return a printable
    representation of it.  */
 
@@ -152,33 +147,33 @@ tui_data_window::first_reg_element_no_inline (int line_no) const
 /* Show the registers of the given group in the data window
    and refresh the window.  */
 void
-tui_show_registers (struct reggroup *group)
+tui_data_window::show_registers (struct reggroup *group)
 {
   if (group == 0)
     group = general_reggroup;
 
   /* Say that registers should be displayed, even if there is a
      problem.  */
-  TUI_DATA_WIN->display_regs = true;
+  display_regs = true;
 
   if (target_has_registers && target_has_stack && target_has_memory)
     {
-      tui_show_register_group (TUI_DATA_WIN, group, get_selected_frame (NULL),
-       group == TUI_DATA_WIN->current_group);
+      show_register_group (group, get_selected_frame (NULL),
+   group == current_group);
 
       /* Clear all notation of changed values.  */
-      for (auto &&data_item_win : TUI_DATA_WIN->regs_content)
+      for (auto &&data_item_win : regs_content)
  {
   if (data_item_win != nullptr)
     data_item_win->highlight = false;
  }
-      TUI_DATA_WIN->current_group = group;
-      TUI_DATA_WIN->display_all_data ();
+      current_group = group;
+      display_all_data ();
     }
   else
     {
-      TUI_DATA_WIN->current_group = 0;
-      TUI_DATA_WIN->erase_data_content (_("[ Register Values Unavailable ]"));
+      current_group = 0;
+      erase_data_content (_("[ Register Values Unavailable ]"));
     }
 }
 
@@ -187,22 +182,18 @@ tui_show_registers (struct reggroup *group)
    using the given frame.  Values are refreshed only when
    refresh_values_only is TRUE.  */
 
-static void
-tui_show_register_group (tui_data_window *win_info,
- struct reggroup *group,
-                         struct frame_info *frame,
- int refresh_values_only)
+void
+tui_data_window::show_register_group (struct reggroup *group,
+      struct frame_info *frame,
+      int refresh_values_only)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   int nr_regs;
   int regnum, pos;
-  char title[80];
 
   /* Make a new title showing which group we display.  */
-  snprintf (title, sizeof (title) - 1, "Register group: %s",
-            reggroup_name (group));
-  xfree (win_info->title);
-  win_info->title = xstrdup (title);
+  xfree (title);
+  title = xstrprintf ("Register group: %s", reggroup_name (group));
 
   /* See how many registers must be displayed.  */
   nr_regs = 0;
@@ -224,14 +215,14 @@ tui_show_register_group (tui_data_window *win_info,
     }
 
   if (!refresh_values_only)
-    win_info->regs_content.clear ();
+    regs_content.clear ();
 
-  if (nr_regs < win_info->regs_content.size ())
-    win_info->regs_content.resize (nr_regs);
+  if (nr_regs < regs_content.size ())
+    regs_content.resize (nr_regs);
   else
     {
-      for (int i = win_info->regs_content.size (); i < nr_regs; ++i)
- win_info->regs_content.emplace_back (new tui_data_item_window ());
+      for (int i = regs_content.size (); i < nr_regs; ++i)
+ regs_content.emplace_back (new tui_data_item_window ());
     }
 
   /* Now set the register names and values.  */
@@ -251,7 +242,7 @@ tui_show_register_group (tui_data_window *win_info,
       if (name == 0 || *name == '\0')
  continue;
 
-      data_item_win = win_info->regs_content[pos].get ();
+      data_item_win = regs_content[pos].get ();
       if (data_item_win)
  {
   if (!refresh_values_only)
@@ -558,7 +549,7 @@ void
 tui_data_window::check_register_values (struct frame_info *frame)
 {
   if (regs_content.empty () && display_regs)
-    tui_show_registers (current_group);
+    show_registers (current_group);
   else
     {
       for (auto &&data_item_win_ptr : regs_content)
@@ -710,7 +701,7 @@ tui_reg_command (const char *args, int from_tty)
       if (match == NULL)
  error (_("unknown register group '%s'"), args);
 
-      tui_show_registers (match);
+      TUI_DATA_WIN->show_registers (match);
     }
   else
     {
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index 01c2ea6dad..e07abeda64 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -102,6 +102,8 @@ struct tui_data_window : public tui_win_info
 
   void check_register_values (struct frame_info *frame);
 
+  void show_registers (struct reggroup *group);
+
 protected:
 
   void do_scroll_vertical (int num_to_scroll) override;
@@ -120,8 +122,10 @@ protected:
   void display_reg_element_at_line (int start_element_no, int start_line_no);
 
   void rerender () override;
-};
 
-extern void tui_show_registers (struct reggroup *group);
+  void show_register_group (struct reggroup *group,
+    struct frame_info *frame,
+    int refresh_values_only);
+};
 
 #endif /* TUI_TUI_REGS_H */
Reply | Threaded
Open this post in threaded view
|

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

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

Worker:
        ubuntu-aarch64

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/5/builds/559

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        ca02d7c8003ad020bb39f0b26dc93b661be67132

Subject of commit:
        Add two methods to tui_data_window

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

*** Diff to previous build ***
==============================================
new FAIL: gdb.threads/step-bg-decr-pc-switch-thread.exp: switch to main thread
==============================================

*** 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-extended-gdbserver-m64/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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-extended-gdbserver-m64/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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-3

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        ca02d7c8003ad020bb39f0b26dc93b661be67132

Subject of commit:
        Add two methods to tui_data_window

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

*** Diff to previous build ***
==============================================
new FAIL: gdb.base/catch-syscall.exp: multiple targets: insert catch syscall on syscall 1 -- write on i386:x86-64
new FAIL: gdb.python/py-finish-breakpoint2.exp: check FinishBreakpoint in catch
new FAIL: gdb.python/py-finish-breakpoint2.exp: check finish BP removal
new FAIL: gdb.python/py-finish-breakpoint2.exp: continue to second exception
new FAIL: gdb.python/py-finish-breakpoint2.exp: set FinishBP after the exception
new FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: a_base_ref with option deref_refs: deref_refs=true
new FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: a_base_ref with option deref_refs=True, static_members=False
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
new KFAIL: gdb.xml/tdesc-arch.exp: set tdesc filename tdesc-arch.xml
==============================================

*** 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/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-cc-with-index, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-cc-with-index

Worker:
        fedora-x86-64-2

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/20/builds/628

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        ca02d7c8003ad020bb39f0b26dc93b661be67132

Subject of commit:
        Add two methods to tui_data_window

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132/

*** Diff to previous build ***
==============================================
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-cc-with-index/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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-cc-with-index/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m64, branch master

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

Worker:
        fedora-x86-64-1

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/3/builds/650

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        ca02d7c8003ad020bb39f0b26dc93b661be67132

Subject of commit:
        Add two methods to tui_data_window

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
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-m64/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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-m64/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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-3

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        ca02d7c8003ad020bb39f0b26dc93b661be67132

Subject of commit:
        Add two methods to tui_data_window

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

*** Diff to previous build ***
==============================================
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
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-extended-gdbserver-m32/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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-4

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        ca02d7c8003ad020bb39f0b26dc93b661be67132

Subject of commit:
        Add two methods to tui_data_window

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

*** Diff to previous build ***
==============================================
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=on: 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-gdbserver-m32/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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-2

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        ca02d7c8003ad020bb39f0b26dc93b661be67132

Subject of commit:
        Add two methods to tui_data_window

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

*** Diff to previous build ***
==============================================
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
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-extended-gdbserver-m64/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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-1

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        ca02d7c8003ad020bb39f0b26dc93b661be67132

Subject of commit:
        Add two methods to tui_data_window

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

*** 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-gdbserver-m64/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//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/ca/ca02d7c8003ad020bb39f0b26dc93b661be67132//xfail.table.gz>