From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18184 invoked by alias); 23 Jan 2011 16:48:58 -0000 Received: (qmail 18172 invoked by uid 22791); 23 Jan 2011 16:48:57 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 23 Jan 2011 16:48:43 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0NGmfPs012309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 23 Jan 2011 11:48:42 -0500 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p0NGmdQ7025146 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 23 Jan 2011 11:48:41 -0500 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p0NGmckC016724; Sun, 23 Jan 2011 17:48:38 +0100 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id p0NGmcSt016718; Sun, 23 Jan 2011 17:48:38 +0100 Date: Sun, 23 Jan 2011 16:48:00 -0000 From: Jan Kratochvil To: Leon Pollak Cc: gdb@sourceware.org Subject: Re: Restarting gdbserver Message-ID: <20110123164837.GA16407@host1.dyn.jankratochvil.net> References: <201101201129.50875.leonp@plris.com> <201101220052.00630.leonp@plris.com> <20110123132802.GA15230@host1.dyn.jankratochvil.net> <201101231843.44877.leonp@plris.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201101231843.44877.leonp@plris.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00096.txt.bz2 On Sun, 23 Jan 2011 17:43:44 +0100, Leon Pollak wrote: > Thank you, Jan. > > I hope I understood and did what you said: > > bash-4.1$ ./gdb -nx -ex file /opt/FS/common/csu -ex target extended-remote > 192.168.50.4:44000 -ex set sysroot /opt/FS -ex set remote exec-file > /common/csu -ex start > GNU gdb (GDB) 7.2 > Copyright (C) 2010 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=armv5tl- > montavista-linux-gnueabi". > For bug reporting instructions, please see: > . > Reading symbols from /opt/FS/common/csu...done. > Remote debugging using 192.168.50.4:44000 > Temporary breakpoint 1 at 0x20374: file /Projects/CSU/src/main.cpp, line 16. > Starting program: /opt/FS/common/csu > > Temporary breakpoint 1, main () at /Projects/CSU/src/main.cpp:16 > 16 MsgLog("OFP Version: %s dated %s", OFP_VERSION, > __TIMESTAMP__); > (gdb) c > Continuing. > ^C > Program received signal SIGINT, Interrupt. > 0x400314bc in pthread_cond_wait@@GLIBC_2.4 () from /opt/FS/lib/libpthread.so.0 > (gdb) bt > #0 0x400314bc in pthread_cond_wait@@GLIBC_2.4 () from > /opt/FS/lib/libpthread.so.0 > #1 0x00000000 in ?? () > (gdb) > ---------------------------------------------------------------------------- > God knows why it decided to stop at main... This is done intentionally by the GDB command `start'. > Is it what you meant? So symbols from /opt/FS/common/csu work as can be seen in the main function. Symbols from remote `/lib/libpthread.so.0' do not work. I guess it uses separate debug info. You can try: readelf -wi /opt/FS/lib/libpthread.so.0 readelf -wi /opt/FS/usr/lib/debug/opt/FS/lib/libpthread.so.0 readelf -wi /opt/FS/usr/lib/debug/opt/FS/lib/libpthread.so.0.debug # There are just guesses, it depends on the montavista distro from which comes # /opt/FS/lib/libpthread.so.0 and I do not know montavista. readelf should # come from the montavista cross binutils package. I guess you should really use also the part of the reproducer from me: -ex 'set debug-file-directory /host1/usr/lib/debug that is in your case: -ex 'set debug-file-directory /opt/FS/usr/lib/debug And you should also verify the separate debug info files from montavista are installed under /opt/FS/usr/lib/debug (for example *-debuginfo.rpm packages in Fedora). Regards, Jan