From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9143 invoked by alias); 24 Jul 2007 09:11:39 -0000 Received: (qmail 9130 invoked by uid 22791); 24 Jul 2007 09:11:38 -0000 X-Spam-Check-By: sourceware.org Received: from web56602.mail.re3.yahoo.com (HELO web56602.mail.re3.yahoo.com) (66.196.97.46) by sourceware.org (qpsmtpd/0.31) with SMTP; Tue, 24 Jul 2007 09:11:31 +0000 Received: (qmail 38231 invoked by uid 60001); 24 Jul 2007 09:11:27 -0000 X-YMail-OSG: S.H08BsVM1kr4UaRxw821Cu7abhKvOsN8uhWNNap38MXU9CqSCkr3O9iggwHQBxMrtSaXlMBTKXNzgrNHBkBGT24V8VT3oeJ60noEB8ODzW7bQBbEZX8kug_WELG Received: from [91.124.214.109] by web56602.mail.re3.yahoo.com via HTTP; Tue, 24 Jul 2007 02:11:24 PDT Date: Tue, 24 Jul 2007 15:50:00 -0000 From: "Oleg V. Zhylin" Subject: Re: gdb Stopped in pthread_create To: Jim Blandy Cc: gdb@sourceware.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-2051801239-1185268284=:81190" Content-Transfer-Encoding: 8bit Message-ID: <555931.81190.qm@web56602.mail.re3.yahoo.com> 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: 2007-07/txt/msg00167.txt.bz2 --0-2051801239-1185268284=:81190 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Id: Content-Disposition: inline Content-length: 2333 Hi Jim, pthread_test.cpp demonstrates the problematic behavior. It is built using g++ -g pthread_test.cpp -lpthread The version numbers are $ cat /proc/version Linux version 2.6.21-1.3228.fc7 (kojibuilder@xenbuilder2.fedora.redhat.com) (gcc version 4.1.2 20070502 (Red Hat 4.1.2-12)) #1 SMP Tue Jun 12 15:37:31 EDT 2007 and gdb snapshot for July 24th $ gdb --version GNU gdb 6.6.50.20070724 Below is the log of gdb session $ gdb a.out GNU gdb 6.6.50.20070724 Copyright (C) 2007 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /home/cartcs/Work/gdb/pthread_create/a.out [Thread debugging using libthread_db enabled] [New Thread 0xb7f336d0 (LWP 22251)] [3]+ Stopped gdb a.out --- Jim Blandy wrote: > > "Oleg V. Zhylin" writes: > > I've tried to debug my multithreaded application with gdb 6.6 > (GNU > > gdb Red Hat Linux (6.6-15.fc7rh) ), but inside pthread_create call > I > > get > > > > [1]+ Stopped gdb ./a.out > > > > If I use ddd on the same machine pthread_create works just fine. > > That's very surprising. Doesn't DDD just run GDB internally? > > > I get this error on all Linux boxes and GUI is not available on all > of > > them. Is there a way to configure gdb so that it could tolerate > > pthread_create? > > This is a bug; GDB should be able to step over calls to > pthread_create. > > If you haven't already, please try downloading the latest GDB sources > from CVS (see http://sourceware.org/gdb/current/) and see if the > problem still occurs. If it does, then if you can post instructions > here that allow us to reproduce the problem on our own machines, then > I will try to fix it. > WBR Oleg V. Zhylin ovz@yahoo.com ____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ --0-2051801239-1185268284=:81190 Content-Type: application/octet-stream; name="pthread_test.cpp" Content-Transfer-Encoding: base64 Content-Description: 120145053-pthread_test.cpp Content-Disposition: attachment; filename="pthread_test.cpp" Content-length: 981 I2luY2x1ZGUgPHB0aHJlYWQuaD4NCiNpbmNsdWRlIDxzeXMvdGltZS5oPgoN CnZvaWQgU2xlZXAodW5zaWduZWQgbG9uZyB1bE1pbGxpc2Vjb25kcykNCnsN CiAgICBzdHJ1Y3QgdGltZXZhbCB0aW1lb3V0Ow0KICAgIHRpbWVvdXQudHZf c2VjID0gMDsNCiAgICB0aW1lb3V0LnR2X3VzZWMgPSB1bE1pbGxpc2Vjb25k cyAqIDEwMDA7DQogICAgc2VsZWN0KDEsIE5VTEwsIE5VTEwsIE5VTEwsICZ0 aW1lb3V0KTsNCn0gDQoNCnN0YXRpYyB2b2lkKiB0aHJlYWRGdW5jKCB2b2lk KiBscFBhcmFtICkgDQp7DQogICBTbGVlcCgzMDAwKTsNCn0NCg0KaW50IG1h aW4oKQ0Kew0KICBwdGhyZWFkX2F0dHJfdCBhdHRyOw0KDQogIGludAkJbjsN CiAgYm9vbCByZXMgPSBmYWxzZTsNCg0KICBpZiAoIChuID0gOjpwdGhyZWFk X2F0dHJfaW5pdCgmYXR0cikpICE9IDApDQogIHsNCiAgICByZXR1cm4gLTE7 DQogIH0NCiAgcHRocmVhZF90IHRpZDsNCg0KICBpZiAoIChuID0gOjpwdGhy ZWFkX2NyZWF0ZSgmdGlkLCAmYXR0ciwgdGhyZWFkRnVuYywgMCkpID09IDAp DQogIHsNCg0KICAgIHJlcyA9IHRydWU7DQogIH0NCg0KICBpZiAoIChuID0g OjpwdGhyZWFkX2F0dHJfZGVzdHJveSgmYXR0cikpICE9IDApDQogIHsNCiAg ICByZXR1cm4gLTI7DQogIH0NCiAgaWYgKCFyZXMpDQogIHsNCiAgICByZXR1 cm4gLTM7DQogIH0NCiAgU2xlZXAoNTAwMCk7DQoNCiAgcmV0dXJuIDA7DQp9 Cg== --0-2051801239-1185268284=:81190--