From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org, marc.khouzam@ericsson.com
Subject: Re: [RFC] Allowing all threads of all|current process(es) to be resumed [new command + docs]
Date: Sat, 30 May 2009 13:10:00 -0000 [thread overview]
Message-ID: <83fxem4tz4.fsf@gnu.org> (raw)
In-Reply-To: <200905301151.52892.pedro@codesourcery.com>
> From: Pedro Alves <pedro@codesourcery.com>
> Date: Sat, 30 May 2009 11:51:52 +0100
> Cc: Marc Khouzam <marc.khouzam@ericsson.com>
>
> Currently, with the generic framework, if GDB is attached to
> multiple processes, issuing a "continue", "next", etc., makes GDB
> resume all threads of all processes. But, with the multi-forks
> framework, GDB only debugs one of the forks at a given time, while
> leaving the others stopped. E.g.,
>
> (gdb) set detach-on-fork off
> (gdb) catch fork
> Catchpoint 1 (fork)
> (gdb) r
> Starting program: /home/pedro/gdb/sspaces/build/gdb/testsuite/gdb.base/foll-fork
>
> Catchpoint 1 (forked process 23902), 0x00007ffff789ac4b in fork () from /lib/libc.so.6
> (gdb)
>
> A 'continue' command here, will only resume the parent process, and leave
> the child process stopped.
> This means that moving multi-forks into multi-inferior framework changes
> its behaviour. If we make execution commands resume only
> threads of the current inferior, then we're changing the current
> default for targets making use of the current
> multi-inferior framework... So, we've got a conflict, and something's got
> to give. :-/ Both variants are reasonable and which one is right depends on
> what you're debugging.
Can you give at least 2 different use-cases, each one favoring one of
the possible behaviors? I'm not sure I understand the nature of the
conflict.
A few comments about the patch for the manual:
> +@cindex resume multiple processes
This index entry is too general. I suggest something more specific to
the aspects you are describing.
> +By default, @value{GDBN} allows only threads of the current inferior
> +to run in response to execution commands such as @code{continue}.
We don't introduce the notion of "execution commands" until the node
that's after this one. So if you want to use it here, I would suggest
to add the definition of this term in the parent node ("Thread
Stops"), and while at that, give a more-or-less comprehensive list of
the commands that are considered to be "execution commands".
> +@cindex resume multiple processes
This second instance of the same index item is redundant.
> +Sets the mode for scheduling multiple processes. When set, all
^^^^
We use "Set", not "Sets", throughout the manual.
Also, I suggest to mention threads:
Set the mode for scheduling threads of multiple processes.
On second thought, "scheduling" is not the best word here, as GDB is
not a scheduler. How about "continuing the execution"?
> +threads of all processes are allowed to run. When not set (which is
> +the default), only the threads of the current process are schedulable.
I think we say "when OFF" and "when ON", rather than "when set" and
"when not set".
> +@item show schedule-multiple
> +Display the current mode for scheduling multiple processes.
Same comment about "threads" and "scheduling".
> +The final set of threads that are allowed to run by execution commands
> +is defined by the union of the restrictions implied by both the
> +@code{schedule-multiple} and @code{scheduler-locking} modes. E.g., if
> +the @code{schedule-multiple} mode is set to @code{on}, but the
> +scheduler locking mode is also set to @code{on}, then only the current
> +thread is made schedulable.
It might be easier and simpler to tell that scheduler-locking takes
precedence.
> +When set, all threads of all processes are affected by execution\n\
> +commands (such as e.g., 'continue'). When not set (which is the\n\
You do not need both "such as" and "e.g.", one or the other is enough.
Also, the same comments as above about "ON/OFF" vs "set/not set" apply
here.
We will also need an entry in NEWS for this new option.
Thanks.
next prev parent reply other threads:[~2009-05-30 13:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-30 10:51 Pedro Alves
2009-05-30 13:10 ` Eli Zaretskii [this message]
2009-05-30 16:01 ` Pedro Alves
2009-05-30 17:12 ` Eli Zaretskii
2009-06-08 11:59 ` Pedro Alves
2009-06-09 4:01 ` Eli Zaretskii
2009-06-11 11:59 ` Pedro Alves
2009-05-31 16:34 ` Doug Evans
2009-05-31 16:40 ` Doug Evans
2009-05-31 18:31 ` Tom Tromey
2009-05-31 18:38 ` Doug Evans
2009-05-31 22:06 ` Pedro Alves
2009-06-01 15:55 ` Doug Evans
2009-06-03 14:06 ` Pedro Alves
2009-06-01 14:29 ` Marc Khouzam
2009-06-03 13:49 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83fxem4tz4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=marc.khouzam@ericsson.com \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox