From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26735 invoked by alias); 7 Jun 2006 14:17:11 -0000 Received: (qmail 26710 invoked by uid 22791); 7 Jun 2006 14:17:08 -0000 X-Spam-Check-By: sourceware.org Received: from bottom.rox.net (HELO bottom.rox.net) (213.214.0.43) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 07 Jun 2006 14:17:06 +0000 Received: from localhost ([127.0.0.1]) by bottom.rox.net with esmtp (Exim 4.62) (envelope-from ) id 1FnyqH-0002H0-Dx; Wed, 07 Jun 2006 16:17:05 +0200 Received: from gw-navigon.rox.net ([212.63.94.234] helo=mailwbg-srv.navigon.local) by bottom.rox.net with esmtp (Exim 4.62) (envelope-from ) id 1FnyqG-0002Gc-A5; Wed, 07 Jun 2006 16:17:04 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: gdb and remote debugging with threads Date: Wed, 07 Jun 2006 19:01:00 -0000 Message-ID: <1182D99174295C4ABFC3098B2F755C34377960@mailwbg-srv.navigon.local> From: "Srikanth Krishnamohan" To: Cc: Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00042.txt.bz2 Message-ID: <20060607190100.yBnLCYLQPxx35XvQgHILiz1Fuj8EpuSbEVpMEydxxc4@z> Hello All, Does gdb 6.4 support remote debugging of a muti-threaded program. The host is i686-linux and target is arm-xscale-linux. The program exits when a break point is set and some cases gdb does not stop at the breakpoints. The problem also exists with remote debugging, when both the host and target are i686-linux.=20 There seems to be lot of mails on this topic but no clear answer to the current status.=20 An update would be greatly welcome. Regards, Srikanth -----------------------Source code and gdb session output------------------------- //source code - multi-threaded program #include #include #include void *thread_func(void *arg) { int iThid =3D *(int *)arg; printf("thread_func ID %d\n",iThid); } int main(int argc, char **argv) { if (argc < 1) { printf("Usage: %s numthreads\n",argv[0]); exit(1); } int retVal =3D 0,index=3D0; int numThreads =3D atoi(argv[1]); pthread_t thid[numThreads]; //create all the threads for(index =3D 0;index