Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Does multi-exec make sense without target-async?
@ 2011-04-20 18:35 Marc Khouzam
  2011-04-20 19:34 ` Pedro Alves
  2011-04-20 20:13 ` Tom Tromey
  0 siblings, 2 replies; 5+ messages in thread
From: Marc Khouzam @ 2011-04-20 18:35 UTC (permalink / raw)
  To: 'gdb@sourceware.org'

Hi,

I just want to make sure I understand this right.

There is no point in running multi-exec without
target-async on, right?

I mean, if I have two inferiors and I run one,
there is no way for me to tell GDB to also
run the second one?  To do that, I have to 
interrupt the first to get the prompt.
I originally thought of using 'continue -a'
to resume all inferiors, but the -a flag
is only for non-stop it seems.

Thanks

Marc

FYI, I'm asking because for all-stop in
Eclipse, we don't use target-async.  I know
we probably should, but there was not big
reason to make that change... until now
maybe.


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

* Re: Does multi-exec make sense without target-async?
  2011-04-20 18:35 Does multi-exec make sense without target-async? Marc Khouzam
@ 2011-04-20 19:34 ` Pedro Alves
  2011-04-20 19:37   ` Marc Khouzam
  2011-04-20 20:13 ` Tom Tromey
  1 sibling, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2011-04-20 19:34 UTC (permalink / raw)
  To: gdb; +Cc: Marc Khouzam

On Wednesday 20 April 2011 19:35:26, Marc Khouzam wrote:

> There is no point in running multi-exec without
> target-async on, right?
> 
> I mean, if I have two inferiors and I run one,
> there is no way for me to tell GDB to also
> run the second one?  To do that, I have to 
> interrupt the first to get the prompt.
> I originally thought of using 'continue -a'
> to resume all inferiors, but the -a flag
> is only for non-stop it seems.

Yeah, GDB's internal all-stop model is not a good
fit for multi-process.  You either resume just
all threads of a process, or all threads of all
processes.  It's controlled by this setting in all-stop mode:

(gdb) help set schedule-multiple 
Set mode for resuming threads of all processes.
When on, execution commands (such as 'continue' or 'next') resume all
threads of all processes.  When off (which is the default), execution
commands only resume the threads of the current process.  The set of
threads that are resumed is further refined by the scheduler-locking
mode (see help set scheduler-locking).

Note, the setting applies to _all_ execution commands, like
scheduler-locking.

-- 
Pedro Alves


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

* RE: Does multi-exec make sense without target-async?
  2011-04-20 19:34 ` Pedro Alves
@ 2011-04-20 19:37   ` Marc Khouzam
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Khouzam @ 2011-04-20 19:37 UTC (permalink / raw)
  To: 'Pedro Alves', 'gdb@sourceware.org'

> -----Original Message-----
> From: Pedro Alves [mailto:pedro@codesourcery.com] 
> Sent: Wednesday, April 20, 2011 3:34 PM
> To: gdb@sourceware.org
> Cc: Marc Khouzam
> Subject: Re: Does multi-exec make sense without target-async?
> 
> On Wednesday 20 April 2011 19:35:26, Marc Khouzam wrote:
> 
> > There is no point in running multi-exec without
> > target-async on, right?
> > 
> > I mean, if I have two inferiors and I run one,
> > there is no way for me to tell GDB to also
> > run the second one?  To do that, I have to 
> > interrupt the first to get the prompt.
> > I originally thought of using 'continue -a'
> > to resume all inferiors, but the -a flag
> > is only for non-stop it seems.
> 
> Yeah, GDB's internal all-stop model is not a good
> fit for multi-process.  You either resume just
> all threads of a process, or all threads of all
> processes.  It's controlled by this setting in all-stop mode:
> 
> (gdb) help set schedule-multiple 
> Set mode for resuming threads of all processes.
> When on, execution commands (such as 'continue' or 'next') resume all
> threads of all processes.  When off (which is the default), execution
> commands only resume the threads of the current process.  The set of
> threads that are resumed is further refined by the scheduler-locking
> mode (see help set scheduler-locking).
> 
> Note, the setting applies to _all_ execution commands, like
> scheduler-locking.

Thanks!
Looks like I want that option 'on', to give some kind of value
to all-stop mode.  I'll give it a go.


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

* Re: Does multi-exec make sense without target-async?
  2011-04-20 18:35 Does multi-exec make sense without target-async? Marc Khouzam
  2011-04-20 19:34 ` Pedro Alves
@ 2011-04-20 20:13 ` Tom Tromey
  2011-04-20 21:12   ` Pedro Alves
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2011-04-20 20:13 UTC (permalink / raw)
  To: Marc Khouzam; +Cc: 'gdb@sourceware.org'

>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:

Marc> I originally thought of using 'continue -a'
Marc> to resume all inferiors, but the -a flag
Marc> is only for non-stop it seems.

IIRC, when I was recently playing with multi-inferior, I could not get
"continue -a" to resume all inferiors.  Is this supposed to work?
(It might have been the case that this was prevented from working by
some other bug...)

Tom


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

* Re: Does multi-exec make sense without target-async?
  2011-04-20 20:13 ` Tom Tromey
@ 2011-04-20 21:12   ` Pedro Alves
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Alves @ 2011-04-20 21:12 UTC (permalink / raw)
  To: gdb; +Cc: Tom Tromey, Marc Khouzam

On Wednesday 20 April 2011 21:13:05, Tom Tromey wrote:
> >>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
> 
> Marc> I originally thought of using 'continue -a'
> Marc> to resume all inferiors, but the -a flag
> Marc> is only for non-stop it seems.
> 
> IIRC, when I was recently playing with multi-inferior, I could not get
> "continue -a" to resume all inferiors.  Is this supposed to work?

In non-stop, yes.  (In all-stop, the flag is rejected.)

> (It might have been the case that this was prevented from working by
> some other bug...)

could be...

-- 
Pedro Alves


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

end of thread, other threads:[~2011-04-20 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-20 18:35 Does multi-exec make sense without target-async? Marc Khouzam
2011-04-20 19:34 ` Pedro Alves
2011-04-20 19:37   ` Marc Khouzam
2011-04-20 20:13 ` Tom Tromey
2011-04-20 21:12   ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox