This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug mi/12736] New: In non-stop, "-exec-continue --thread-group"will resume all inferiors if the specified inferior is not executing yet
- From: "marc.khouzam at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 5 May 2011 18:55:30 +0000
- Subject: [Bug mi/12736] New: In non-stop, "-exec-continue --thread-group"will resume all inferiors if the specified inferior is not executing yet
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12736
Summary: In non-stop, "-exec-continue --thread-group" will
resume all inferiors if the specified inferior is not
executing yet
Product: gdb
Version: 7.2
Status: NEW
Severity: minor
Priority: P2
Component: mi
AssignedTo: unassigned@sourceware.org
ReportedBy: marc.khouzam@ericsson.com
Created attachment 5709
--> http://sourceware.org/bugzilla/attachment.cgi?id=5709
Proposed fix
If I have an inferior started, and I create a second inferior, MI accepts an
-exec-continue command for the second inferior, even though it wasn't started
yet. This happens in non-stop mode only. What GDB/MI does instead is use the
pid 0, which causes all threads to resume, even for other inferiors. I saw
this in 7.2, 7.3 and HEAD. Below is a small session showing the problem.
Attached is a proposed fix which adds a check before trying to 'continue' an
inferior that was not started.
> gdb.7.2.1 ~/testing/loopfirst
GNU gdb (GDB) 7.2.0.20110403-cvs
(gdb) set target-async on
(gdb) set non-stop on
(gdb) start
Temporary breakpoint 1 at 0x804850d: file loopfirst.cc, line 5.
Starting program: /home/lmckhou/testing/loopfirst
Temporary breakpoint 1, main () at loopfirst.cc:5
5 int max = 900;
(gdb) add-inferior -exec /home/lmckhou/testing/loopfirst
Added inferior 2
Reading symbols from /home/lmckhou/testing/loopfirst...done.
(gdb) inf inf
Num Description Executable
2 <null> /home/lmckhou/testing/loopfirst
* 1 process 9593 /home/lmckhou/testing/loopfirst
(gdb) inf thr
* 1 process 9593 main () at loopfirst.cc:5
(gdb) interpreter-exec mi "-exec-continue --thread-group i2"
^done
(gdb) inf thr
1 process 9593 (running)
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.