[binutils-gdb] Fix for using named pipes on Windows

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

[binutils-gdb] Fix for using named pipes on Windows

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

commit afe09f0b6311a4dd1a7e2dc6491550bb228734f8
Author:     Guillaume LABARTHE <[hidden email]>
AuthorDate: Thu Jul 18 17:20:04 2019 +0100
Commit:     Pedro Alves <[hidden email]>
CommitDate: Thu Jul 18 17:20:04 2019 +0100

    Fix for using named pipes on Windows
   
    On Windows, passing a named pipe as terminal argument to the new-ui
    command does not work.
   
    The problem is that the new_ui_command function in top.c opens the
    same tty three times, for stdin, stdout and stderr.  With Windows
    named pipes, the second and third calls to open fail.
   
    Opening the file only once and passing the same stream for stdin,
    stdout and stderr makes it work.
   
    Pedro says:
   
     I tried it on GNU/Linux and things still work.
     I ran all the MI tests with forced new-ui, with:
   
     $ make check TESTS="gdb.mi/*.exp" RUNTESTFLAGS="FORCE_MI_SEPARATE_UI=1"
   
     and saw no regressions.
   
    gdb/ChangeLog:
    2019-07-18  Guillaume LABARTHE  <[hidden email]>
   
            * top.c (new_ui_command): Open specified terminal just once.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fa669daa4b..d6fe9895a7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2019-07-18  Guillaume LABARTHE  <[hidden email]>
+
+ * top.c (new_ui_command): Open specified terminal just once.
+
 2019-07-18  Tom Tromey  <[hidden email]>
 
  * symtab.c (main_name): Constify return type.
diff --git a/gdb/top.c b/gdb/top.c
index 83a3604688..60f81b3bf8 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -337,8 +337,6 @@ open_terminal_stream (const char *name)
 static void
 new_ui_command (const char *args, int from_tty)
 {
-  gdb_file_up stream[3];
-  int i;
   int argc;
   const char *interpreter_name;
   const char *tty_name;
@@ -357,13 +355,13 @@ new_ui_command (const char *args, int from_tty)
   {
     scoped_restore save_ui = make_scoped_restore (&current_ui);
 
-    /* Open specified terminal, once for each of
-       stdin/stdout/stderr.  */
-    for (i = 0; i < 3; i++)
-      stream[i] = open_terminal_stream (tty_name);
+    /* Open specified terminal.  Note: we used to open it three times,
+       once for each of stdin/stdout/stderr, but that does not work
+       with Windows named pipes.  */
+    gdb_file_up stream = open_terminal_stream (tty_name);
 
     std::unique_ptr<ui> ui
-      (new struct ui (stream[0].get (), stream[1].get (), stream[2].get ()));
+      (new struct ui (stream.get (), stream.get (), stream.get ()));
 
     ui->async = 1;
 
@@ -373,10 +371,8 @@ new_ui_command (const char *args, int from_tty)
 
     interp_pre_command_loop (top_level_interpreter ());
 
-    /* Make sure the files are not closed.  */
-    stream[0].release ();
-    stream[1].release ();
-    stream[2].release ();
+    /* Make sure the file is not closed.  */
+    stream.release ();
 
     ui.release ();
   }
Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m32, branch master

gdb-buildbot
Buildername:
        Fedora-x86_64-m32

Worker:
        fedora-x86-64-1

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

Author:
        Guillaume LABARTHE <[hidden email]>

Commit tested:
        afe09f0b6311a4dd1a7e2dc6491550bb228734f8

Subject of commit:
        Fix for using named pipes on Windows

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

*** 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
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-m32/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//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/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//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/334

Author:
        Guillaume LABARTHE <[hidden email]>

Commit tested:
        afe09f0b6311a4dd1a7e2dc6491550bb228734f8

Subject of commit:
        Fix for using named pipes on Windows

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

*** 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
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-extended-gdbserver-m32/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//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/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//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/336

Author:
        Guillaume LABARTHE <[hidden email]>

Commit tested:
        afe09f0b6311a4dd1a7e2dc6491550bb228734f8

Subject of commit:
        Fix for using named pipes on Windows

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

*** 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
==============================================

*** 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/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//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/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//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/334

Author:
        Guillaume LABARTHE <[hidden email]>

Commit tested:
        afe09f0b6311a4dd1a7e2dc6491550bb228734f8

Subject of commit:
        Fix for using named pipes on Windows

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

*** 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-native-gdbserver-m32/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//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/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//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-2

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

Author:
        Guillaume LABARTHE <[hidden email]>

Commit tested:
        afe09f0b6311a4dd1a7e2dc6491550bb228734f8

Subject of commit:
        Fix for using named pipes on Windows

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

*** 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-native-gdbserver-m64/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//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/af/afe09f0b6311a4dd1a7e2dc6491550bb228734f8//xfail.table.gz>