This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[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
- From: "simon.marchi at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 19 Nov 2014 20:37:59 +0000
- 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
- Auto-submitted: auto-generated
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.
- Follow-Ups:
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: simon.marchi at ericsson dot com
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: mihai.ciric at gmail dot com
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: mihai.ciric at gmail dot com
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: simon.marchi at ericsson dot com
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: mihai.ciric at gmail dot com
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: cvs-commit at gcc dot gnu.org
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: simon.marchi at ericsson dot com
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: marc.khouzam at ericsson dot com
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: simon.marchi at ericsson dot com
- [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't
- From: cvs-commit at gcc dot gnu.org