public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "aburgess at redhat dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug mi/28711] gdb closes when displaying structs with long field names in eclipse Date: Fri, 17 Dec 2021 16:53:17 +0000 [thread overview] Message-ID: <bug-28711-4717-KolKxfz8DG@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-28711-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=28711 Andrew Burgess <aburgess at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aburgess at redhat dot com Last reconfirmed| |2021-12-17 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Burgess <aburgess at redhat dot com> --- Was able to reproduce this without using Eclipse, with current HEAD. First, I had to patch GDB to slow it down a little. I observed, that when this bug triggers in Eclipse the complete command is now read in the fist "read" call. When GDB issues the second "read" call, it gets, not only the remainder of the first command, including the trailing \n, but it also gets the start of the next command sent from eclipse. When I tried to reproduce this in GDB without eclipse, I couldn't reproduce this read pattern, even bulk pasting in the commands, at least for me, GDB seemed to process things too quickly. So I added this patch to GDB: ### START #### diff --git a/gdb/event-top.c b/gdb/event-top.c index 530ea298247..e12a87a7910 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -854,6 +874,7 @@ gdb_readline_no_editing_callback (gdb_client_data client_data) buffer_grow_char (&line_buffer, '\0'); result = buffer_finish (&line_buffer); + sleep (1); ui->input_handler (gdb::unique_xmalloc_ptr<char> (result)); } ### END ### And now I am able to reproduce the failure. (1) Create a pseudo terminal to use as the MI terminal - in another shell I do `tty ; tail -f /dev/null`, and copy the path to the pseudo terminal that is printed, then (2) Compile the test.c program from the original bug report, (3) Start GDB: ./gdb/gdb --data-directory ./gdb/data-directory/ --interpreter mi2 --nx -q --interpreter console -ex "new-ui mi /dev/pts/13" -ex "set pagination off" -ex "show version" -ex "start" ./test.x Replace "/dev/pts/13" with the path copied in step #1. (4) Now switch back to the terminal used in step #1, this should have started up as an MI terminal. Paste in the following commands. These need to be pasted in a single paste action, NOT one at a time: ### START ### -var-create --thread 1 --frame 0 - * var -var-list-children var1 -var-info-path-expression var1.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ### END ### For me, GDB will then exit every time. What I observe is that the call to `fgetc` in gdb_readline_no_editing_callback returns EOF after it has read the 1024 long command - this is the first command where the \n appears in the next read block. I still don't understand why that call is returning EOF.... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-12-17 16:53 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-17 13:07 [Bug mi/28711] New: " cristian.lupascu at nxp dot com 2021-12-17 16:53 ` aburgess at redhat dot com [this message] 2021-12-17 16:55 ` [Bug mi/28711] " aburgess at redhat dot com 2021-12-18 11:39 ` aburgess at redhat dot com 2021-12-20 18:44 ` aburgess at redhat dot com 2021-12-24 17:03 ` fweimer at redhat dot com 2021-12-26 19:06 ` tromey at sourceware dot org 2021-12-27 10:15 ` Andrew Burgess 2021-12-27 10:15 ` aburgess at redhat dot com 2022-01-17 16:43 ` aburgess at redhat dot com 2022-02-07 10:25 ` cvs-commit at gcc dot gnu.org 2022-02-08 10:16 ` aburgess at redhat dot com 2022-02-09 19:48 ` cristian.lupascu at nxp dot com 2022-02-09 23:42 ` tromey at sourceware dot org 2022-10-31 16:48 ` jonah at kichwacoders dot com 2022-10-31 16:54 ` jonah at kichwacoders dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-28711-4717-KolKxfz8DG@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).