From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2927 invoked by alias); 4 Nov 2005 09:23:36 -0000 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 Received: (qmail 2896 invoked by uid 22791); 4 Nov 2005 09:23:33 -0000 Received: from elbarto.betaversion.net (HELO elbarto.betaversion.net) (82.165.28.81) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 04 Nov 2005 09:23:33 +0000 Received: by elbarto.betaversion.net (Postfix, from userid 8) id C2870A36D4; Fri, 4 Nov 2005 10:23:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by elbarto.betaversion.net (Postfix) with ESMTP id 12331A3710; Fri, 4 Nov 2005 10:23:22 +0100 (CET) Received: from elbarto.betaversion.net ([127.0.0.1]) by localhost (elbarto.betaversion.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15886-05; Fri, 4 Nov 2005 10:23:21 +0100 (CET) Received: from elbarto.betaversion.net (localhost [127.0.0.1]) by elbarto.betaversion.net (Postfix) with ESMTP id 2CA20A36D4; Fri, 4 Nov 2005 10:23:21 +0100 (CET) Received: from p54A7DAAE.dip.t-dialin.net (p54A7DAAE.dip.t-dialin.net [84.167.218.174]) by admin.betaversion.net (Horde) with HTTP for ; Fri, 04 Nov 2005 10:23:21 +0100 Message-ID: <20051104102321.ob6kfhtmx1mscoc4@admin.betaversion.net> Date: Fri, 04 Nov 2005 09:23:00 -0000 From: Frank Meerkoetter To: Daniel Jacobowitz Cc: gdb@sourceware.org Subject: Re: multithreaded programs on arm-linux References: <20051102164925.GA31801@nevyn.them.org> <20051103093306.qyr5bz57icqo04ck@admin.betaversion.net> <20051103135617.GA29302@nevyn.them.org> <20051103160009.8sy1s7ydxhwok0ww@admin.betaversion.net> <20051103150707.GA31256@nevyn.them.org> <20051103165107.69fo0r6r2li8csws@admin.betaversion.net> <20051103155928.GA630@nevyn.them.org> <20051103172809.nzyshptn7w5cscs0@admin.betaversion.net> <20051103164212.GA2532@nevyn.them.org> <20051103185047.8o634uhdvtsg8kcc@admin.betaversion.net> <20051103211329.GB11262@nevyn.them.org> In-Reply-To: <20051103211329.GB11262@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0) X-Remote-Browser: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 Firefox/1.0.7 SUSE/1.0.7-0.1 X-SW-Source: 2005-11/txt/msg00091.txt.bz2 Quoting Daniel Jacobowitz : > On Thu, Nov 03, 2005 at 06:50:47PM +0100, Frank Meerkoetter wrote: >> objfile is NULL, why i couldn't figure out. > > That should be true the first time but not the second, if you've used > "file". Ok. The first time objfile is null. The second time target_has_execution is false. # ./gdb ./gdb GNU gdb 6.3 This GDB was configured as "arm-linux"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) l ../../gdb-6.3/gdb/thread-db.c:679 warning: Source file is more recent than executable. 674 } 675 } 676 677 /* Don't attempt to use thread_db on targets which can not run 678 (core files). */ 679 if (objfile == NULL || !target_has_execution) 680 { 681 /* All symbols have been discarded. If the thread_db target is 682 active, deactivate it now. */ 683 if (using_thread_db) (gdb) 684 { 685 gdb_assert (proc_handle.pid == 0); 686 unpush_target (&thread_db_ops); 687 using_thread_db = 0; 688 } 689 690 goto quit; 691 } 692 693 if (using_thread_db) (gdb) b ../../gdb-6.3/gdb/thread-db.c:679 Breakpoint 1 at 0x5c62c: file ../../gdb-6.3/gdb/thread-db.c, line 679. (gdb) r Starting program: /progfs/opt/Qtopia/bin/gdb GNU gdb 6.3 This GDB was configured as "arm-linux". (gdb) file apdf Reading symbols from /progfs/opt/Qtopia/bin/apdf...done. Using host libthread_db library "/lib/libthread_db.so.1". // first round Breakpoint 1, thread_db_new_objfile (objfile=0x0) at ../../gdb-6.3/gdb/thread-db.c:679 679 if (objfile == NULL || !target_has_execution) (gdb) p objfile $1 = (struct objfile *) 0x0 (gdb) n 683 if (using_thread_db) (gdb) p using_thread_db $2 = 0 (gdb) n 729 if (target_new_objfile_chain) (gdb) p target_new_objfile_chain $3 = (void (*)()) 0 (gdb) n 731 } (gdb) c Continuing. // second round Breakpoint 1, thread_db_new_objfile (objfile=0x2ceb08) at ../../gdb-6.3/gdb/thread-db.c:679 679 if (objfile == NULL || !target_has_execution) (gdb) p objfile $4 = (struct objfile *) 0x2ceb08 // current_target.to_has_execution = 0 (gdb) n 683 if (using_thread_db) (gdb) n 729 if (target_new_objfile_chain) (gdb) n 731 } Regards, Frank