Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: <Paul_Koning@Dell.com>
To: <eliz@gnu.org>
Cc: <palves@redhat.com>, <gnu@toad.com>, <mark.kettenis@xs4all.nl>,
	<brobecker@adacore.com>, <gdb@sourceware.org>
Subject: Re: Time to expand "Program received signal" ?
Date: Thu, 15 Nov 2012 18:27:00 -0000	[thread overview]
Message-ID: <C75A84166056C94F84D238A44AF9F6AD2A1D68@AUSX10MPC103.AMER.DELL.COM> (raw)
In-Reply-To: <83boeyu3xz.fsf@gnu.org>


On Nov 15, 2012, at 1:16 PM, Eli Zaretskii wrote:

>> Date: Thu, 15 Nov 2012 17:21:23 +0000
>> From: Pedro Alves <palves@redhat.com>
>> CC: gnu@toad.com, mark.kettenis@xs4all.nl, brobecker@adacore.com,
>>        gdb@sourceware.org
>> 
>> On 15-11-2012 16:59, Eli Zaretskii wrote:
>>>> Date: Thu, 15 Nov 2012 10:36:26 +0000
>>>> From: Pedro Alves <palves@redhat.com>
>>>> CC: Mark Kettenis <mark.kettenis@xs4all.nl>, brobecker@adacore.com,        gdb@sourceware.org
>>>> 
>>>>> GDB shouldn't mention
>>>>> threads at all, unless the program being debugged has more than a
>>>>> single thread.
>>>> 
>>>> See?  If it has a single thread, GDB calls that thread "thread 1".
>>> 
>>> To propose a compromise: can we call the only thread "main thread"
>>> instead of "thread 1"?
>> 
>> Not really.  You can end up with one thread in the list, even after
>> the "main thread" having exited.
> 
> Doesn't GDB already know whether some threading library is linked into
> the program?  If it does, then it knows whether another thread is
> possible or not.

That doesn't tell you.  While threaded programs will often be linked with a threading library, they don't need to be.  Given an OS where threading is a basic service (as in NetBSD and I believe Linux) an application can create threads simply by calling the appropriate system service.

For that matter, even if it uses pthreads that doesn't mean it is linked against a dynamic library with a recognizable name.  The pthreads code might be statically linked, so it isn't readily visible when you look at the program executable file.

	paul


  reply	other threads:[~2012-11-15 18:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 18:27 Pedro Alves
2012-11-13 16:25 ` Joel Brobecker
2012-11-13 16:40   ` Mark Kettenis
2012-11-13 17:22     ` Pedro Alves
2012-11-13 22:40       ` John Gilmore
2012-11-14 10:26         ` Pedro Alves
2012-11-14 19:54           ` John Gilmore
2012-11-15 10:36             ` Pedro Alves
2012-11-15 16:58               ` Eli Zaretskii
2012-11-15 17:21                 ` Pedro Alves
2012-11-15 17:51                   ` Joel Brobecker
2012-11-15 18:16                   ` Eli Zaretskii
2012-11-15 18:27                     ` Paul_Koning [this message]
2012-11-15 18:27                     ` Pedro Alves
2012-11-15 19:07                       ` Eli Zaretskii
2012-11-15 20:33                         ` Pedro Alves
2012-11-15 20:58                           ` Eli Zaretskii
2012-11-15 19:27         ` Tom Tromey
2012-11-15 22:21           ` John Gilmore
2012-11-15 22:27             ` Paul_Koning
2012-11-16  0:22               ` John Gilmore
2012-11-16  8:25               ` Eli Zaretskii
2012-11-13 17:23     ` Joel Brobecker

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=C75A84166056C94F84D238A44AF9F6AD2A1D68@AUSX10MPC103.AMER.DELL.COM \
    --to=paul_koning@dell.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=gnu@toad.com \
    --cc=mark.kettenis@xs4all.nl \
    --cc=palves@redhat.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