This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Allowing all threads of all|current process(es) to be resumed [new command + docs]


> From: Pedro Alves <pedro@codesourcery.com>
> Date: Mon, 8 Jun 2009 12:59:53 +0100
> 
> On Saturday 30 May 2009 18:12:09, Eli Zaretskii wrote:
> 
> > Thanks, the new patch for the manual and the NEWS entry are fine with
> > me, but please consider the two remaining issues mentioned above.
> 
> Certainly!  I'd really like you to be happy with this and here's my
> next attempt at that.  I've given a short example of why you'd want
> either behaviour; used "resuming the execution", and switched to
> mentioning the scheduler-locking precedence instead.

Thanks.

> +@cindex resume threads of multiple processes simultaneously
> +By default, @value{GDBN} allows only threads of the current inferior
> +to run in response to execution commands such as @code{continue},
> +@code{next} or @code{step}.  E.g., if @value{GDBN} is attached to two
> +inferiors, each with two threads, the @code{continue} command resumes
> +only the two threads of the current inferior.  This is useful for
> +example when debugging a program that forks, and you want to hold the
> +fork parent stopped (so that for instance it doesn't run to exit),
> +while debugging the child.  In other ocasions, you are not interested
> +in inspecting the current state of none of the processes @value{GDBN}
> +is attached to, and you want to resume them all until any reports a
> +breakpoint hit.  You can modify @value{GDBN}'s default behavior by
> +instead allowing all threads of all inferiors to run with the
> +@w{@code{set schedule-multiple}} command.

This is indeed what I had in mind, but the wording needs some
improvement.  I suggest this variant:

  By default, when you issue one of the execution commands such as
  @code{continue}, @code{next} or @code{step}, @value{GDBN} allows
  only threads of the current inferior to run.  For example, if
  @value{GDBN} is attached to two inferiors, each with two threads,
  the @code{continue} command resumes only the two threads of the
  current inferior.  This is useful, for example, when you debug a
  program that forks and you want to hold the parent stopped (so that,
  for instance, it doesn't run to exit), while you debug the child.
  In other situations, you may not be interested in inspecting the
  current state of any of the processes @value{GDBN} is attached to,
  and you may want to resume them all until some breakpoint is hit.
  In the latter case, you can instruct @value{GDBN} to allow all
  threads of all the inferiors to run with the @w{@code{set
  schedule-multiple}} command.

OK?

The rest of documentation-related hunks are fine with me.

Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]