From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D05D93858401; Sat, 18 Dec 2021 11:39:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D05D93858401 From: "aburgess at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug mi/28711] gdb closes when displaying structs with long field names in eclipse Date: Sat, 18 Dec 2021 11:39:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: mi X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aburgess at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Dec 2021 11:39:08 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28711 --- Comment #3 from Andrew Burgess --- I tried starting GDB without placing the MI interface onto a separate termi= nal, like this: ./gdb/gdb --data-directory ./gdb/data-directory/ --interpreter mi2 --nx -q -ex "set pagination off" -ex "show version" -ex "start" ./test.x Then pasted the same set of MI commands as before, and the test completes successfully. So it seems to be something about the way the separate MI interface is handled. I looked in top.c at `new_ui_command` function, and saw this comment: /* 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. */ So, on a whim I tried this patch: ### START ### diff --git a/gdb/top.c b/gdb/top.c index 1f9e649a85d..470881b5db6 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -366,10 +366,12 @@ new_ui_command (const char *args, int from_tty) /* 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 =3D open_terminal_stream (tty_name); + gdb_file_up stream1 =3D open_terminal_stream (tty_name); + gdb_file_up stream2 =3D open_terminal_stream (tty_name); + gdb_file_up stream3 =3D open_terminal_stream (tty_name); std::unique_ptr ui - (new struct ui (stream.get (), stream.get (), stream.get ())); + (new struct ui (stream1.get (), stream2.get (), stream3.get ())); ui->async =3D 1; @@ -380,7 +382,9 @@ new_ui_command (const char *args, int from_tty) interp_pre_command_loop (top_level_interpreter ()); /* Make sure the file is not closed. */ - stream.release (); + stream1.release (); + stream2.release (); + stream3.release (); ui.release (); } ### END ### And retested the original GDB command line (with separate MI interface), and now the problem is resolved. I don't know exactly means, but maybe someone else understands, I'll just k= eep digging... --=20 You are receiving this mail because: You are on the CC list for the bug.=