From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11182 invoked by alias); 26 Sep 2006 14:24:04 -0000 Received: (qmail 11171 invoked by uid 22791); 26 Sep 2006 14:24:04 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.188) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 26 Sep 2006 14:23:59 +0000 Received: by nf-out-0910.google.com with SMTP id k26so240242nfc for ; Tue, 26 Sep 2006 07:23:56 -0700 (PDT) Received: by 10.48.210.20 with SMTP id i20mr1076894nfg; Tue, 26 Sep 2006 07:23:56 -0700 (PDT) Received: from ?87.6.111.217? ( [87.6.111.217]) by mx.gmail.com with ESMTP id c10sm1424898nfb.2006.09.26.07.23.55; Tue, 26 Sep 2006 07:23:56 -0700 (PDT) Message-ID: <45193870.2030609@gmail.com> Date: Tue, 26 Sep 2006 14:24:00 -0000 From: Carmelo Amoroso Reply-To: carmelo73@gmail.com User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: Carmelo Amoroso , gdb@sourceware.org Subject: Re: howto debug libthread_db References: <45193401.7000502@gmail.com> <20060926140724.GA13188@nevyn.them.org> In-Reply-To: <20060926140724.GA13188@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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-09/txt/msg00152.txt.bz2 Daniel Jacobowitz wrote: > On Tue, Sep 26, 2006 at 04:06:57PM +0200, Carmelo Amoroso wrote: >> Hi All, >> I'm trying to debug a simple multithread application on a remote target, >> and I like to debug the libthread_db itself... is it possible to do it? >> is it possible to set some breakpoints and stepping through? >> Is there anyone already played with it? >> >> I tried to use symbol-file to gdb client, and I successfully added a >> breakpoint, but I cannot reach it after I connected to the target and >> issued 'continue'. >> >> Any help will be appreciated > > Sorry, but you need to be more precise. What exactly did you do - the > entire GDB session? What didn't work? Do you really mean > libthread_db, or do you mean libpthread? > Yes, libthread_db exactly... I got a SIGSEV due to a unaligned access just after exiting from td_ta_map_lwp2thr function, and I never return to the caller (iterate_thread_list). I added a lot of printf into my own libthread_db and I can track all the flow until the end td_ta_map_lwp2thr... and then nothing The thread_db library belongs to the uClibc-nptl port on SH. gdbserver has been linked against uClibc-nptl port and works fine for non multithread example Carmelo