From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15555 invoked by alias); 15 Nov 2012 18:27:22 -0000 Received: (qmail 15516 invoked by uid 22791); 15 Nov 2012 18:27:20 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausc60pc101.us.dell.com (HELO ausc60pc101.us.dell.com) (143.166.85.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Nov 2012 18:27:15 +0000 X-Loopcount0: from 10.170.28.39 From: To: CC: , , , , Subject: Re: Time to expand "Program received signal" ? Date: Thu, 15 Nov 2012 18:27:00 -0000 Message-ID: References: <50A13A4E.3020000@redhat.com> <20121113162530.GX4847@adacore.com> <201211131640.qADGeKhs021376@glazunov.sibelius.xs4all.nl> <50A281BC.9030802@redhat.com> <201211132240.qADMeB2N032392@new.toad.com> <50A371C6.3080307@redhat.com> <201211141954.qAEJsQ2N026469@new.toad.com> <50A4C5AA.70304@redhat.com> <83mwyiu7j6.fsf@gnu.org> <50A52493.70807@redhat.com> <83boeyu3xz.fsf@gnu.org> In-Reply-To: <83boeyu3xz.fsf@gnu.org> Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00041.txt.bz2 On Nov 15, 2012, at 1:16 PM, Eli Zaretskii wrote: >> Date: Thu, 15 Nov 2012 17:21:23 +0000 >> From: Pedro Alves >> CC: gnu@toad.com, mark.kettenis@xs4all.nl, brobecker@adacore.com, >> gdb@sourceware.org >>=20 >> On 15-11-2012 16:59, Eli Zaretskii wrote: >>>> Date: Thu, 15 Nov 2012 10:36:26 +0000 >>>> From: Pedro Alves >>>> CC: Mark Kettenis , brobecker@adacore.com, = gdb@sourceware.org >>>>=20 >>>>> GDB shouldn't mention >>>>> threads at all, unless the program being debugged has more than a >>>>> single thread. >>>>=20 >>>> See? If it has a single thread, GDB calls that thread "thread 1". >>>=20 >>> To propose a compromise: can we call the only thread "main thread" >>> instead of "thread 1"? >>=20 >> Not really. You can end up with one thread in the list, even after >> the "main thread" having exited. >=20 > 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 creat= e threads simply by calling the appropriate system service. For that matter, even if it uses pthreads that doesn't mean it is linked ag= ainst 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 prog= ram executable file. paul