From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12517 invoked by alias); 15 Feb 2010 21:37:36 -0000 Received: (qmail 12507 invoked by uid 22791); 15 Feb 2010 21:37:36 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-iw0-f180.google.com (HELO mail-iw0-f180.google.com) (209.85.223.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Feb 2010 21:37:32 +0000 Received: by iwn10 with SMTP id 10so307038iwn.13 for ; Mon, 15 Feb 2010 13:37:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.146.66 with SMTP id g2mr6531450ibv.88.1266269850057; Mon, 15 Feb 2010 13:37:30 -0800 (PST) In-Reply-To: References: <19c1b8a91002121416n35eff662m92f20b2755d1e738@mail.gmail.com> Date: Mon, 15 Feb 2010 21:37:00 -0000 Message-ID: <19c1b8a91002151337u582fbc2eo2d6fd37c174676af@mail.gmail.com> Subject: Re: "Disabling thread support in gdbserver" problem From: Khem Raj To: Daniele Palmas Cc: "Yann E. MORIN" , crossgcc@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00045.txt.bz2 On Mon, Feb 15, 2010 at 12:49 AM, Daniele Palmas wrote: > -----Original Message----- > From: Khem Raj [mailto:raj.khem@gmail.com] > Sent: venerd=EC 12 febbraio 2010 23.17 > To: Daniele Palmas > Cc: Yann E. MORIN; crossgcc@sourceware.org > Subject: Re: "Disabling thread support in gdbserver" problem > >>> Another piece of information that can be useful: configuring the gdbser= ver I've found the line >>> >>> [ALL =A0] =A0 =A0checking for libthread_db... no >>> >>> I suspect this is the problem, however I have not understood why the bu= ild system doesn't find it since it exists. Should I force this check modif= ying the configure.ac? >> >> >> Send the config.log for gdb/gdbserver most probably the test for >> libthread_db is failing because its using the wrong libthread_db (from >> host instead of target) > > Hello Khem, > > in attachment you can find the config.log. For your convenience I've quot= ed the lines that seem important to me: > > [SNIP] > configure:4062: checking for libthread_db > configure:4093: arm-unknown-linux-gnu-gcc -o conftest -g -O2 =A0-static c= onftest.c =A0-lthread_db >&5 > /home/danielepa/x-tools/arm-unknown-linux-gnu/lib/gcc/arm-unknown-linux-g= nu/4.3.2/../../../../arm-unknown-linux-gnu/bin/ld: cannot find -lthread_db > collect2: ld returned 1 exit status > configure:4099: $? =3D 1 > configure: failed program was: > [SNIP] > configure:4151: arm-unknown-linux-gnu-gcc -o conftest -g -O2 =A0-static c= onftest.c =A0/lib/libthread_db.so.1 >&5 > /home/danielepa/x-tools/arm-unknown-linux-gnu/lib/gcc/arm-unknown-linux-g= nu/4.3.2/../../../../arm-unknown-linux-gnu/bin/ld: attempted static link of= dynamic object `/lib/libthread_db.so.1' > collect2: ld returned 1 exit status > configure:4157: $? =3D 1 > configure: failed program was: > [SNIP] > > I can understand the second problem, but not the first one: should the li= nker not have a default path for the libraries like libthread_db? It seems to me that you are trying to build static gdbserver with multi-threading support. you need to have static version of libthread_db installed for that in your /usr/lib and this should be same as the one the programs that you intend to debug will be linked against otherwise the multi-threaded debugging may not work well. If there are no restrictions to use shared libs then I would suggest that you compile gdbsever with shared library support. If not then you have to compile the static version of libthread_db (libthread_db.a) during libc build step. -Khem -- For unsubscribe information see http://sourceware.org/lists.html#faq