public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Simplify command window creation
@ 2019-06-25 19:48 gdb-buildbot
  2019-06-25 19:59 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gdb-buildbot @ 2019-06-25 19:48 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 82432e10143669d4936848d77e2a7b78c62c26e0 ***

commit 82432e10143669d4936848d77e2a7b78c62c26e0
Author:     Tom Tromey <tom@tromey.com>
AuthorDate: Sun Jun 16 10:32:35 2019 -0600
Commit:     Tom Tromey <tom@tromey.com>
CommitDate: Tue Jun 25 07:48:25 2019 -0600

    Simplify command window creation
    
    make_command_window is never called when *win_info_ptr is non-NULL, so
    this patch simplifies the function by removing the parameter and
    having it return its result directly.  This in turn makes it more
    obvious that a NULL check in show_source_disasm_command can be
    removed.
    
    gdb/ChangeLog
    2019-06-25  Tom Tromey  <tom@tromey.com>
    
            * tui/tui-layout.c (make_command_window): Remove win_info_ptr
            parameter.  Return the new window.
            (show_source_disasm_command): Update and remove NULL check.
            (show_source_or_disasm_and_command): Update.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 45415df087..1df099ef51 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
 2019-06-25  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui-layout.c (make_command_window): Remove win_info_ptr
+	parameter.  Return the new window.
+	(show_source_disasm_command): Update and remove NULL check.
+	(show_source_or_disasm_and_command): Update.
+
+2019-06-25  Tom Tromey  <tom@tromey.com>
+
 	* tui/tui-layout.c (init_and_make_win): Remove NULL check.
 
 2019-06-25  Tom Tromey  <tom@tromey.com>
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 695c56012c..3eddc56578 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -52,7 +52,7 @@ static void show_source_or_disasm_and_command (enum tui_layout_type);
 static void make_source_or_disasm_window (struct tui_win_info **, 
 					  enum tui_win_type, 
 					  int, int);
-static void make_command_window (struct tui_win_info **, int, int);
+static struct tui_win_info *make_command_window (int, int);
 static void make_source_window (struct tui_win_info **, int, int);
 static void make_disasm_window (struct tui_win_info **, int, int);
 static void make_data_window (struct tui_win_info **, int, int);
@@ -540,20 +540,19 @@ prev_layout (void)
 
 
 
-static void
-make_command_window (struct tui_win_info **win_info_ptr, 
-		     int height, int origin_y)
+static struct tui_win_info *
+make_command_window (int height, int origin_y)
 {
-  *win_info_ptr
-    = (struct tui_win_info *) init_and_make_win (*win_info_ptr,
+  struct tui_win_info *result
+    = (struct tui_win_info *) init_and_make_win (NULL,
 						 CMD_WIN,
 						 height,
 						 tui_term_width (),
 						 0,
 						 origin_y,
 						 DONT_BOX_WINDOW);
-
-  (*win_info_ptr)->can_highlight = FALSE;
+  result->can_highlight = FALSE;
+  return result;
 }
 
 
@@ -650,76 +649,69 @@ show_source_disasm_command (void)
 	  tui_make_visible (TUI_SRC_WIN->detail.source_info.execution_info);
 	  TUI_SRC_WIN->detail.source_info.has_locator = FALSE;;
 	}
-      if (TUI_SRC_WIN != NULL)
-	{
-	  struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
 
-	  tui_show_source_content (TUI_SRC_WIN);
-	  if (TUI_DISASM_WIN == NULL)
-	    {
-	      make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1);
-	      locator
-		= ((struct tui_gen_win_info *)
-		   init_and_make_win (locator,
-				      LOCATOR_WIN,
-				      2 /* 1 */ ,
-				      tui_term_width (),
-				      0,
-				      (src_height + asm_height) - 1,
-				      DONT_BOX_WINDOW));
-	    }
-	  else
-	    {
-	      init_gen_win_info (locator,
-				 LOCATOR_WIN,
-				 2 /* 1 */ ,
-				 tui_term_width (),
-				 0,
-				 (src_height + asm_height) - 1);
-	      TUI_DISASM_WIN->detail.source_info.has_locator = TRUE;
-	      init_gen_win_info (&TUI_DISASM_WIN->generic,
-				 TUI_DISASM_WIN->generic.type,
-				 asm_height,
-				 TUI_DISASM_WIN->generic.width,
-				 TUI_DISASM_WIN->detail.source_info.execution_info->width,
-				 src_height - 1);
-	      init_gen_win_info (TUI_DISASM_WIN->detail.source_info.execution_info,
-				 EXEC_INFO_WIN,
-				 asm_height,
-				 3,
-				 0,
-				 src_height - 1);
-	      TUI_DISASM_WIN->can_highlight = TRUE;
-	      tui_make_visible (&TUI_DISASM_WIN->generic);
-	      tui_make_visible (TUI_DISASM_WIN->detail.source_info.execution_info);
-	    }
-	  if (TUI_DISASM_WIN != NULL)
-	    {
-	      TUI_SRC_WIN->detail.source_info.has_locator = FALSE;
-	      TUI_DISASM_WIN->detail.source_info.has_locator = TRUE;
-	      tui_make_visible (locator);
-	      tui_show_locator_content ();
-	      tui_show_source_content (TUI_DISASM_WIN);
-
-	      if (TUI_CMD_WIN == NULL)
-		make_command_window (&TUI_CMD_WIN,
-				     cmd_height,
-				     tui_term_height () - cmd_height);
-	      else
-		{
-		  init_gen_win_info (&TUI_CMD_WIN->generic,
-				     TUI_CMD_WIN->generic.type,
-				     TUI_CMD_WIN->generic.height,
-				     TUI_CMD_WIN->generic.width,
-				     0,
-				     TUI_CMD_WIN->generic.origin.y);
-		  TUI_CMD_WIN->can_highlight = FALSE;
-		  tui_make_visible (&TUI_CMD_WIN->generic);
-		}
-	      if (TUI_CMD_WIN != NULL)
-		tui_refresh_win (&TUI_CMD_WIN->generic);
-	    }
+      struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
+
+      tui_show_source_content (TUI_SRC_WIN);
+      if (TUI_DISASM_WIN == NULL)
+	{
+	  make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1);
+	  locator
+	    = ((struct tui_gen_win_info *)
+	       init_and_make_win (locator,
+				  LOCATOR_WIN,
+				  2 /* 1 */ ,
+				  tui_term_width (),
+				  0,
+				  (src_height + asm_height) - 1,
+				  DONT_BOX_WINDOW));
+	}
+      else
+	{
+	  init_gen_win_info (locator,
+			     LOCATOR_WIN,
+			     2 /* 1 */ ,
+			     tui_term_width (),
+			     0,
+			     (src_height + asm_height) - 1);
+	  TUI_DISASM_WIN->detail.source_info.has_locator = TRUE;
+	  init_gen_win_info (&TUI_DISASM_WIN->generic,
+			     TUI_DISASM_WIN->generic.type,
+			     asm_height,
+			     TUI_DISASM_WIN->generic.width,
+			     TUI_DISASM_WIN->detail.source_info.execution_info->width,
+			     src_height - 1);
+	  init_gen_win_info (TUI_DISASM_WIN->detail.source_info.execution_info,
+			     EXEC_INFO_WIN,
+			     asm_height,
+			     3,
+			     0,
+			     src_height - 1);
+	  TUI_DISASM_WIN->can_highlight = TRUE;
+	  tui_make_visible (&TUI_DISASM_WIN->generic);
+	  tui_make_visible (TUI_DISASM_WIN->detail.source_info.execution_info);
+	}
+      TUI_SRC_WIN->detail.source_info.has_locator = FALSE;
+      TUI_DISASM_WIN->detail.source_info.has_locator = TRUE;
+      tui_make_visible (locator);
+      tui_show_locator_content ();
+      tui_show_source_content (TUI_DISASM_WIN);
+
+      if (TUI_CMD_WIN == NULL)
+	TUI_CMD_WIN = make_command_window (cmd_height,
+					   tui_term_height () - cmd_height);
+      else
+	{
+	  init_gen_win_info (&TUI_CMD_WIN->generic,
+			     TUI_CMD_WIN->generic.type,
+			     TUI_CMD_WIN->generic.height,
+			     TUI_CMD_WIN->generic.width,
+			     0,
+			     TUI_CMD_WIN->generic.origin.y);
+	  TUI_CMD_WIN->can_highlight = FALSE;
+	  tui_make_visible (&TUI_CMD_WIN->generic);
 	}
+      tui_refresh_win (&TUI_CMD_WIN->generic);
       tui_set_current_layout_to (SRC_DISASSEM_COMMAND);
     }
 }
@@ -964,7 +956,7 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
 
 	  if (TUI_CMD_WIN == NULL)
 	    {
-	      make_command_window (&TUI_CMD_WIN, cmd_height, src_height);
+	      TUI_CMD_WIN = make_command_window (cmd_height, src_height);
 	      tui_refresh_win (&TUI_CMD_WIN->generic);
 	    }
 	  else


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Failures on Fedora-x86_64-cc-with-index, branch master
  2019-06-25 19:48 [binutils-gdb] Simplify command window creation gdb-buildbot
@ 2019-06-25 19:59 ` gdb-buildbot
  2019-06-25 20:04 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
  2019-06-25 20:04 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
  2 siblings, 0 replies; 4+ messages in thread
From: gdb-buildbot @ 2019-06-25 19:59 UTC (permalink / raw)
  To: gdb-testers

Buildername:
        Fedora-x86_64-cc-with-index

Worker:
        fedora-x86-64-4

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

Author:
        Tom Tromey <tom@tromey.com>

Commit tested:
        82432e10143669d4936848d77e2a7b78c62c26e0

Subject of commit:
        Simplify command window creation

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

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
==============================================

*** 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/82/82432e10143669d4936848d77e2a7b78c62c26e0/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/82/82432e10143669d4936848d77e2a7b78c62c26e0/xfail.table.gz>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Failures on Fedora-x86_64-m32, branch master
  2019-06-25 19:48 [binutils-gdb] Simplify command window creation gdb-buildbot
  2019-06-25 19:59 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot
@ 2019-06-25 20:04 ` gdb-buildbot
  2019-06-25 20:04 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
  2 siblings, 0 replies; 4+ messages in thread
From: gdb-buildbot @ 2019-06-25 20:04 UTC (permalink / raw)
  To: gdb-testers

Buildername:
        Fedora-x86_64-m32

Worker:
        fedora-x86-64-2

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

Author:
        Tom Tromey <tom@tromey.com>

Commit tested:
        82432e10143669d4936848d77e2a7b78c62c26e0

Subject of commit:
        Simplify command window creation

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/82/82432e10143669d4936848d77e2a7b78c62c26e0

*** Diff to previous build ***
==============================================
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-m32/82/82432e10143669d4936848d77e2a7b78c62c26e0/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/82/82432e10143669d4936848d77e2a7b78c62c26e0/xfail.table.gz>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Failures on Fedora-x86_64-m64, branch master
  2019-06-25 19:48 [binutils-gdb] Simplify command window creation gdb-buildbot
  2019-06-25 19:59 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot
  2019-06-25 20:04 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
@ 2019-06-25 20:04 ` gdb-buildbot
  2 siblings, 0 replies; 4+ messages in thread
From: gdb-buildbot @ 2019-06-25 20:04 UTC (permalink / raw)
  To: gdb-testers

Buildername:
        Fedora-x86_64-m64

Worker:
        fedora-x86-64-1

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

Author:
        Tom Tromey <tom@tromey.com>

Commit tested:
        82432e10143669d4936848d77e2a7b78c62c26e0

Subject of commit:
        Simplify command window creation

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

*** 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/82/82432e10143669d4936848d77e2a7b78c62c26e0/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/82/82432e10143669d4936848d77e2a7b78c62c26e0/xfail.table.gz>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-25 17:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 19:48 [binutils-gdb] Simplify command window creation gdb-buildbot
2019-06-25 19:59 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot
2019-06-25 20:04 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2019-06-25 20:04 ` Failures on Fedora-x86_64-m64, " gdb-buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).