From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2962 invoked by alias); 8 Jun 2006 09:06:39 -0000 Received: (qmail 2945 invoked by uid 22791); 8 Jun 2006 09:06:38 -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; Thu, 08 Jun 2006 09:06:34 +0000 Received: from localhost ([127.0.0.1]) by bottom.rox.net with esmtp (Exim 4.62) (envelope-from ) id 1FoGTI-00073h-VM; Thu, 08 Jun 2006 11:06:33 +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 1FoGTC-0006me-29; Thu, 08 Jun 2006 11:06:26 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: gdb and remote debugging with threads Date: Thu, 08 Jun 2006 10:12:00 -0000 Message-ID: <1182D99174295C4ABFC3098B2F755C34377A4A@mailwbg-srv.navigon.local> From: "Srikanth Krishnamohan" To: "Daniel Jacobowitz" 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/msg00054.txt.bz2 Hello Daniel, I appreciate your reply.=20 I have tried your suggestion before. It did not make any difference.=20 I have problems similar to the one discussed in this thread (http://sources.redhat.com/ml/gdb/2005-04/msg00056.html). To summarize the problems I have with remote debugging are, 1. In a multi-threaded program linked with shared libraries the breakpoint in never reached other than the main thread. 2. In the sample program below the breakpoint is reached only once and it either crashes after that (target=3Darm) or continues until the program exits (host=3Dtarget=3Di686).=20 I'm attaching a more detailed output if it helps (apologize if its too much information). NOTE that even when host=3Dtarget=3Di686 the debugger does stop in the break point after the first time. Thanks, Srikanth ----------------------------------Source and debugging sessions--------------------- #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 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. Yes. It has been supported for years, and I've been giving out the same advice about it for most of that time. I apologize for the fact that I haven't stuck this advice in the manual; obviously I need to do that. > Program received signal SIG32, Real-time event 32. > 0x400a75f4 in ?? () > (gdb) c > Continuing. If you receive this message, it usually means you did not tell GDB where to find target libraries, which prevents thread debugging from initializing. Search for "set solib-absolute-prefix". --=20 Daniel Jacobowitz CodeSourcery