Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] [gdb/doc] There's always a thread
Date: Thu, 10 Dec 2015 14:15:00 -0000	[thread overview]
Message-ID: <1449756899-18063-1-git-send-email-palves@redhat.com> (raw)

This warning is a few years out of date -- there's always a thread
nowadays.

gdb/doc/ChangeLog:

	* gdb.texinfo (Threads): Replace warning with explanation/example
	about single-threaded programs.
---
 gdb/doc/gdb.texinfo | 25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index e8b419c..df3a313 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2844,24 +2844,6 @@ the user specify which @code{libthread_db} to use if the default choice
 isn't compatible with the program.
 @end itemize
 
-@quotation
-@emph{Warning:} These facilities are not yet available on every
-@value{GDBN} configuration where the operating system supports threads.
-If your @value{GDBN} does not support threads, these commands have no
-effect.  For example, a system without thread support shows no output
-from @samp{info threads}, and always rejects the @code{thread} command,
-like this:
-
-@smallexample
-(@value{GDBP}) info threads
-(@value{GDBP}) thread 1
-Thread ID 1 not known.  Use the "info threads" command to
-see the IDs of currently known threads.
-@end smallexample
-@c FIXME to implementors: how hard would it be to say "sorry, this GDB
-@c                        doesn't support threads"?
-@end quotation
-
 @cindex focus of debugging
 @cindex current thread
 The @value{GDBN} thread debugging facility allows you to observe all
@@ -2903,6 +2885,13 @@ further qualifier.
 For debugging purposes, @value{GDBN} associates its own thread
 number---always a single integer---with each thread in your program.
 
+From @value{GDBN}'s perspective, a process always has at least one
+thread.  In other words, on systems that require linking programs with
+a threading library to access threading features
+(e.g,. @code{libpthread}), even if the program does not link with said
+library, @value{GDBN} assigns a thread number to the program's main
+thread.
+
 @table @code
 @kindex info threads
 @item info threads @r{[}@var{id}@dots{}@r{]}
-- 
1.9.3


             reply	other threads:[~2015-12-10 14:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 14:15 Pedro Alves [this message]
2015-12-10 16:37 ` Eli Zaretskii
2015-12-10 17:10   ` Pedro Alves
2015-12-10 17:38     ` Eli Zaretskii
2015-12-10 17: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=1449756899-18063-1-git-send-email-palves@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@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: 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