From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7912 invoked by alias); 27 Feb 2004 20:15:21 -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 7905 invoked from network); 27 Feb 2004 20:15:20 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 27 Feb 2004 20:15:20 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AwoOF-0003Jo-W1; Fri, 27 Feb 2004 15:15:19 -0500 Date: Fri, 27 Feb 2004 20:15:00 -0000 From: Daniel Jacobowitz To: Albert Ho Cc: gdb@sources.redhat.com Subject: Re: gdb-6.0/gdb/gdbserver/target.c::set_desired_inferior() Message-ID: <20040227201519.GA12740@nevyn.them.org> Mail-Followup-To: Albert Ho , gdb@sources.redhat.com References: <403EB813.90408@intellambda.com> <20040227032447.GA24747@nevyn.them.org> <403FA285.8070808@intellambda.com> <20040227200435.GA12145@nevyn.them.org> <403FA498.3020907@intellambda.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <403FA498.3020907@intellambda.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-02/txt/msg00421.txt.bz2 On Fri, Feb 27, 2004 at 12:12:08PM -0800, Albert Ho wrote: > I am trying to decide whether the problem is in the thread library or gdb. > 4 facts: > 1) The program runs fine on its own. > 2) gdbserver can debug the program if let the process starts first > (hence loading all the library), then use --attach. > 3) Run gdb gdbserver, then start the program in gdbserver also works. > 4) Run gdbserver alone with the program cause the program's new thread > died, I suspect it affects gdbserver to segfault too. > > I'll get the pthread symbol to look further. > > One last question. Does the host suppose to load exactly the same > library as the target? I see the host loads libthread.so.1, but the > target's core has libthread_db.so.1. The host should load a copy of libpthread.so.1 which matches the copy loaded by the target application (NOT gdbserver, gdbserver will load libthread_db.so.1). -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer