public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Pedro Alves <palves@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Improve "set scheduler-locking" documentation Date: Tue, 12 Jul 2022 17:12:01 +0000 (GMT) [thread overview] Message-ID: <20220712171201.7F9E7385608D@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d21d919bc1d75f89140218f0d5702d0afff41209 commit d21d919bc1d75f89140218f0d5702d0afff41209 Author: Pedro Alves <pedro@palves.net> Date: Tue Nov 30 19:52:11 2021 +0000 Improve "set scheduler-locking" documentation This improves the "set scheduler-locking" documentation in the GDB manual: - Use a table to describe the four available modes. - Describe "step" in terms of "on" and "off". - Tweak the "replay" mode's description to describe replay first instead of recording, and also mention how the mode behaves during normal execution. - Say what is the default mode. Change-Id: Ie12140138b37534b7fc1d904da34f0f174aa11ce Diff: --- gdb/doc/gdb.texinfo | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 562e4c1f628..9a8b010476a 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -6939,19 +6939,33 @@ locking the OS scheduler to allow only a single thread to run. @cindex scheduler locking mode @cindex lock scheduler Set the scheduler locking mode. It applies to normal execution, -record mode, and replay mode. If it is @code{off}, then there is no -locking and any thread may run at any time. If @code{on}, then only -the current thread may run when the inferior is resumed. The -@code{step} mode optimizes for single-stepping; it prevents other -threads from preempting the current thread while you are stepping, so -that the focus of debugging does not change unexpectedly. Other -threads never get a chance to run when you step, and they are -completely free to run when you use commands like @samp{continue}, -@samp{until}, or @samp{finish}. However, unless another thread hits a -breakpoint during its timeslice, @value{GDBN} does not change the -current thread away from the thread that you are debugging. The -@code{replay} mode behaves like @code{off} in record mode and like -@code{on} in replay mode. +record mode, and replay mode. @var{mode} can be one of +the following: + +@table @code +@item off +There is no locking and any thread may run at any time. + +@item on +Only the current thread may run when the inferior is resumed. + +@item step +Behaves like @code{on} when stepping, and @code{off} otherwise. +Threads other than the current never get a chance to run when you +step, and they are completely free to run when you use commands like +@samp{continue}, @samp{until}, or @samp{finish}. + +This mode optimizes for single-stepping; it prevents other threads +from preempting the current thread while you are stepping, so that the +focus of debugging does not change unexpectedly. However, unless +another thread hits a breakpoint during its timeslice, @value{GDBN} +does not change the current thread away from the thread that you are +debugging. + +@item replay +Behaves like @code{on} in replay mode, and @code{off} in either record +mode or during normal execution. This is the default mode. +@end table @item show scheduler-locking Display the current scheduler locking mode.
reply other threads:[~2022-07-12 17:12 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220712171201.7F9E7385608D@sourceware.org \ --to=palves@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).