public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "simon.marchi at ericsson dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/17627] New: In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't Date: Wed, 19 Nov 2014 20:38:00 -0000 [thread overview] Message-ID: <bug-17627-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=17627 Bug ID: 17627 Summary: In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: simon.marchi at ericsson dot com Created attachment 7953 --> https://sourceware.org/bugzilla/attachment.cgi?id=7953&action=edit Test source file Steps to reproduce: 1. Build the test: gcc -g3 -O0 test.c -pthread 2. Load the binary in gdb/mi (with -nx to get default settings) gdb -i mi -nx a.out 3. Run run or -exec-run The program will spawn a thread which exits immediately. The main thread gets trapped in the infinite for loop. At this point, the program is still running, but we can now type commands. I would not expect to be able to type commands at this point, since we are in mi-async off and the program was never interrupted. Signs that things are in a bad state: - We get the prompt back (we can type stuff), but the (gdb) prompt does not appear. - At this point, when we type "info threads", there is no active selected thread. It says: "The current thread <Thread ID 2> has terminated.". For fun, you can try typing "interrupt" or "-exec-interrupt" after. It will put back gdb in a good state, with a valid selected thread and the prompt comes back. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2014-11-19 20:38 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-11-19 20:38 simon.marchi at ericsson dot com [this message] 2014-11-20 15:33 ` [Bug gdb/17627] " simon.marchi at ericsson dot com 2014-12-09 10:07 ` mihai.ciric at gmail dot com 2014-12-09 14:51 ` mihai.ciric at gmail dot com 2014-12-10 18:05 ` cvs-commit at gcc dot gnu.org 2014-12-10 18:07 ` simon.marchi at ericsson dot com 2014-12-17 14:41 ` marc.khouzam at ericsson dot com 2014-12-17 14:47 ` simon.marchi at ericsson dot com 2014-12-25 0:46 ` cvs-commit at gcc dot gnu.org
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-17627-4717@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).