public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/12736] New: In non-stop, "-exec-continue --thread-group" will resume all inferiors if the specified inferior is not executing yet
@ 2011-05-05 18:55 marc.khouzam at ericsson dot com
  2011-05-05 18:56 ` [Bug mi/12736] " marc.khouzam at ericsson dot com
  2011-11-07 21:16 ` tromey at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: marc.khouzam at ericsson dot com @ 2011-05-05 18:55 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug mi/12736] In non-stop, "-exec-continue --thread-group" will resume all inferiors if the specified inferior is not executing yet
  2011-05-05 18:55 [Bug mi/12736] New: In non-stop, "-exec-continue --thread-group" will resume all inferiors if the specified inferior is not executing yet marc.khouzam at ericsson dot com
@ 2011-05-05 18:56 ` marc.khouzam at ericsson dot com
  2011-11-07 21:16 ` tromey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: marc.khouzam at ericsson dot com @ 2011-05-05 18:56 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12736

Marc Khouzam <marc.khouzam at ericsson dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5709|0                           |1
           is patch|                            |

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug mi/12736] In non-stop, "-exec-continue --thread-group" will resume all inferiors if the specified inferior is not executing yet
  2011-05-05 18:55 [Bug mi/12736] New: In non-stop, "-exec-continue --thread-group" will resume all inferiors if the specified inferior is not executing yet marc.khouzam at ericsson dot com
  2011-05-05 18:56 ` [Bug mi/12736] " marc.khouzam at ericsson dot com
@ 2011-11-07 21:16 ` tromey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at redhat dot com @ 2011-11-07 21:16 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12736

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com

--- Comment #1 from Tom Tromey <tromey at redhat dot com> 2011-11-07 21:16:20 UTC ---
If this is still an issue, please submit your patch to gdb-patches.

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-07 21:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-05 18:55 [Bug mi/12736] New: In non-stop, "-exec-continue --thread-group" will resume all inferiors if the specified inferior is not executing yet marc.khouzam at ericsson dot com
2011-05-05 18:56 ` [Bug mi/12736] " marc.khouzam at ericsson dot com
2011-11-07 21:16 ` tromey at redhat dot com

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).