This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/20039] New: Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: "simon.marchi at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 03 May 2016 13:57:43 +0000
- Subject: [Bug gdb/20039] New: Using MI/all-stop, can't interrupt multi-threaded program after continue
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20039
Bug ID: 20039
Summary: Using MI/all-stop, can't interrupt multi-threaded
program after continue
Product: gdb
Version: 7.11
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: simon.marchi at ericsson dot com
Target Milestone: ---
Created attachment 9233
--> https://sourceware.org/bugzilla/attachment.cgi?id=9233&action=edit
Source to reproduce
This bug affects gdb 7.11, but not the current master.
In these conditions:
- all-stop
- multi-threaded inferior
- using MI
It is not possible to interrupt a program after doing a continue. I attached a
small source file, here are the steps to reproduce:
$ gcc test.c -pthread -o test
$ ./gdb -nx -i mi test
Then, type:
- run
- ctrl-C
- continue
- ctrl-C
The last ctrl-C fails to interrupt the program.
I was a bit surprised, but bisecting found that the problem started with this
commit:
7e0aa6aa9983c745aedc203db0cc360a0ad47cac
List inferiors/threads/pspaces in ascending order
Since this patch does not look directly related to the problem, I suppose the
bug was already there and it only uncovered it.
The bug was later fixed in master by:
5fe966540d6b748f825774868463003700f0c878
Use target_terminal_ours_for_output in MI
This last patch was pushed as part of big series, but I think it's valid on its
own. I tried cherry-picking it to the gdb-7.11-branch, and it fixes the
problem there.
--
You are receiving this mail because:
You are on the CC list for the bug.
- Follow-Ups:
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: palves at redhat dot com
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: simon.marchi at ericsson dot com
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: simon.marchi at ericsson dot com
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: marc.dumais at ericsson dot com
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: palves at redhat dot com
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: palves at redhat dot com
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: simon.marchi at ericsson dot com
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: simon.marchi at ericsson dot com
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: cvs-commit at gcc dot gnu.org
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: cvs-commit at gcc dot gnu.org
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: cvs-commit at gcc dot gnu.org
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: cvs-commit at gcc dot gnu.org
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: cvs-commit at gcc dot gnu.org
- [Bug gdb/20039] Using MI/all-stop, can't interrupt multi-threaded program after continue
- From: simon.marchi at ericsson dot com