[binutils-gdb] Minor rearrangement in tui-regs.c

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

[binutils-gdb] Minor rearrangement in tui-regs.c

gdb-buildbot
*** TEST RESULTS FOR COMMIT 1a4f81dd7e06f54f4b84f276447eb167f7529b09 ***

commit 1a4f81dd7e06f54f4b84f276447eb167f7529b09
Author:     Tom Tromey <[hidden email]>
AuthorDate: Sat Jul 13 15:55:02 2019 -0600
Commit:     Tom Tromey <[hidden email]>
CommitDate: Tue Aug 20 16:22:05 2019 -0600

    Minor rearrangement in tui-regs.c
   
    This moves a couple of functions earlier in tui-regs.c.  Previously
    they were in the "command" section of the file, but really they belong
    in the "window implementation" section.
   
    gdb/ChangeLog
    2019-08-20  Tom Tromey  <[hidden email]>
   
            * tui/tui-regs.c (tui_register_format, tui_get_register): Move
            earlier.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ce64e7accc..346cc35d0b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-20  Tom Tromey  <[hidden email]>
+
+ * tui/tui-regs.c (tui_register_format, tui_get_register): Move
+ earlier.
+
 2019-08-20  Tom Tromey  <[hidden email]>
 
  * tui/tui-regs.c (tui_reg_command): Remove NULL check.
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index b3c7ce627b..9ea6e72364 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -49,10 +49,55 @@ static void tui_show_register_group (tui_data_window *win_info,
      struct frame_info *frame,
      int refresh_values_only);
 
-static void tui_get_register (struct frame_info *frame,
-      struct tui_data_item_window *data,
-      int regnum, bool *changedp);
+/* Get the register from the frame and return a printable
+   representation of it.  */
+
+static char *
+tui_register_format (struct frame_info *frame, int regnum)
+{
+  struct gdbarch *gdbarch = get_frame_arch (frame);
 
+  string_file stream;
+
+  scoped_restore save_pagination
+    = make_scoped_restore (&pagination_enabled, 0);
+  scoped_restore save_stdout
+    = make_scoped_restore (&gdb_stdout, &stream);
+
+  gdbarch_print_registers_info (gdbarch, &stream, frame, regnum, 1);
+
+  /* Remove the possible \n.  */
+  std::string &str = stream.string ();
+  if (!str.empty () && str.back () == '\n')
+    str.resize (str.size () - 1);
+
+  /* Expand tabs into spaces, since ncurses on MS-Windows doesn't.  */
+  return tui_expand_tabs (str.c_str (), 0);
+}
+
+/* Get the register value from the given frame and format it for the
+   display.  When changep is set, check if the new register value has
+   changed with respect to the previous call.  */
+static void
+tui_get_register (struct frame_info *frame,
+                  struct tui_data_item_window *data,
+  int regnum, bool *changedp)
+{
+  if (changedp)
+    *changedp = false;
+  if (target_has_registers)
+    {
+      char *prev_content = data->content;
+
+      data->content = tui_register_format (frame, regnum);
+
+      if (changedp != NULL
+  && strcmp (prev_content, data->content) != 0)
+ *changedp = true;
+
+      xfree (prev_content);
+    }
+}
 
 /* See tui-regs.h.  */
 
@@ -739,56 +784,6 @@ tui_reggroup_completer (struct cmd_list_element *ignore,
     }
 }
 
-/* Get the register from the frame and return a printable
-   representation of it.  */
-
-static char *
-tui_register_format (struct frame_info *frame, int regnum)
-{
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-
-  string_file stream;
-
-  scoped_restore save_pagination
-    = make_scoped_restore (&pagination_enabled, 0);
-  scoped_restore save_stdout
-    = make_scoped_restore (&gdb_stdout, &stream);
-
-  gdbarch_print_registers_info (gdbarch, &stream, frame, regnum, 1);
-
-  /* Remove the possible \n.  */
-  std::string &str = stream.string ();
-  if (!str.empty () && str.back () == '\n')
-    str.resize (str.size () - 1);
-
-  /* Expand tabs into spaces, since ncurses on MS-Windows doesn't.  */
-  return tui_expand_tabs (str.c_str (), 0);
-}
-
-/* Get the register value from the given frame and format it for the
-   display.  When changep is set, check if the new register value has
-   changed with respect to the previous call.  */
-static void
-tui_get_register (struct frame_info *frame,
-                  struct tui_data_item_window *data,
-  int regnum, bool *changedp)
-{
-  if (changedp)
-    *changedp = false;
-  if (target_has_registers)
-    {
-      char *prev_content = data->content;
-
-      data->content = tui_register_format (frame, regnum);
-
-      if (changedp != NULL
-  && strcmp (prev_content, data->content) != 0)
- *changedp = true;
-
-      xfree (prev_content);
-    }
-}
-
 void
 _initialize_tui_regs (void)
 {
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/554

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        1a4f81dd7e06f54f4b84f276447eb167f7529b09

Subject of commit:
        Minor rearrangement in tui-regs.c

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

*** 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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/623

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        1a4f81dd7e06f54f4b84f276447eb167f7529b09

Subject of commit:
        Minor rearrangement in tui-regs.c

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

*** 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
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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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-4

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        1a4f81dd7e06f54f4b84f276447eb167f7529b09

Subject of commit:
        Minor rearrangement in tui-regs.c

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

*** 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=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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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-1

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        1a4f81dd7e06f54f4b84f276447eb167f7529b09

Subject of commit:
        Minor rearrangement in tui-regs.c

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09/

*** 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-m32/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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-2

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        1a4f81dd7e06f54f4b84f276447eb167f7529b09

Subject of commit:
        Minor rearrangement in tui-regs.c

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

*** Diff to previous build ***
==============================================
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-m64/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/620

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        1a4f81dd7e06f54f4b84f276447eb167f7529b09

Subject of commit:
        Minor rearrangement in tui-regs.c

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

*** 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=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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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-4

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        1a4f81dd7e06f54f4b84f276447eb167f7529b09

Subject of commit:
        Minor rearrangement in tui-regs.c

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

*** 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=off: cond_bp_target=1: 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-extended-gdbserver-m64/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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-1

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

Author:
        Tom Tromey <[hidden email]>

Commit tested:
        1a4f81dd7e06f54f4b84f276447eb167f7529b09

Subject of commit:
        Minor rearrangement in tui-regs.c

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

*** 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=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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//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/1a/1a4f81dd7e06f54f4b84f276447eb167f7529b09//xfail.table.gz>