From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2753 invoked by alias); 1 Jun 2005 13:04:26 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 2667 invoked by uid 22791); 1 Jun 2005 13:04:10 -0000 Received: from [220.225.32.98] (HELO calvin.codito.co.in) (220.225.32.98) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 01 Jun 2005 13:04:10 +0000 Received: from [192.168.100.52] (arnor.codito.co.in [192.168.100.52]) by calvin.codito.co.in (8.12.10/8.12.10) with ESMTP id j51D3h5c004457; Wed, 1 Jun 2005 18:33:43 +0530 Message-ID: <429DB228.9020207@codito.com> Date: Wed, 01 Jun 2005 13:04:00 -0000 From: Ramana Radhakrishnan User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) MIME-Version: 1.0 To: bryanwilkerson@yahoo.com CC: Daniel Jacobowitz , gdb@sources.redhat.com Subject: Re: Fwd: gdb & pthreads - the Ike and Tina of Linux dev References: <20050601124254.9829.qmail@web53403.mail.yahoo.com> In-Reply-To: <20050601124254.9829.qmail@web53403.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-06/txt/msg00001.txt.bz2 Hi Bryan , Took your testcase. Can't repeat this on Debian unstable running 2.6.11-686-smp / gcc 3.3.5 / binutils 2.15 / glibc 2.3.2 . Whats the compiler / binutils / glibc version you are using ? There still is not enough information for anyone else to replicate this. Also I tried it on a stock Suse 9.2 and it worked just fine. cheers Ramana ramana@arnor:~/gdbthread$ gdb gdbthread GNU gdb 6.3-debian Copyright 2004 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 "i386-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) b gdbthread.cpp:31 Breakpoint 1 at 0x804877e: file gdbthread.cpp, line 31. (gdb) run Starting program: /home/ramana/gdbthread/gdbthread [Thread debugging using libthread_db enabled] [New Thread -1210399648 (LWP 25876)] [New Thread -1210401872 (LWP 25879)] [Switching to Thread -1210401872 (LWP 25879)] Breakpoint 1, threadFn (arg=0x0) at gdbthread.cpp:33 33 sleep(1); (gdb) bt #0 threadFn (arg=0x0) at gdbthread.cpp:33 #1 0xb7fccb63 in start_thread () from /lib/tls/libpthread.so.0 #2 0xb7e8518a in clone () from /lib/tls/libc.so.6 (gdb) up #1 0xb7fccb63 in start_thread () from /lib/tls/libpthread.so.0 (gdb) down #0 threadFn (arg=0x0) at gdbthread.cpp:33 33 sleep(1); (gdb) bt #0 threadFn (arg=0x0) at gdbthread.cpp:33 #1 0xb7fccb63 in start_thread () from /lib/tls/libpthread.so.0 #2 0xb7e8518a in clone () from /lib/tls/libc.so.6 (gdb) l 33 sleep(1); 34 if( i % 2 == 0 ) 35 puts("Tick"); 36 else 37 puts("Tock"); 38 i++; 39 } 40 } 41 42 (gdb) l 31 26 using namespace bwutils; 27 28 void *threadFn(void *arg) 29 { 30 int i = 0; 31 while( 1 ) 32 { 33 sleep(1); 34 if( i % 2 == 0 ) 35 puts("Tick"); (gdb) bt #0 threadFn (arg=0x0) at gdbthread.cpp:33 #1 0xb7fccb63 in start_thread () from /lib/tls/libpthread.so.0 #2 0xb7e8518a in clone () from /lib/tls/libc.so.6 (gdb) -- Ramana Radhakrishnan GNU Tools codito ergo sum (www.codito.com)