From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22949 invoked by alias); 20 Aug 2014 08:17:30 -0000 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 Received: (qmail 22934 invoked by uid 89); 20 Aug 2014 08:17:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Aug 2014 08:17:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7K8HJvR019446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Aug 2014 04:17:19 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7K8HIKr024121; Wed, 20 Aug 2014 04:17:18 -0400 Message-ID: <53F4598D.8020208@redhat.com> Date: Wed, 20 Aug 2014 08:17:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Laszlo Papp CC: gdb@sourceware.org Subject: Re: Debugging issue with gdbserver and a daemon on the target References: <53F3743F.3000106@redhat.com> <53F3776D.2010705@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-08/txt/msg00086.txt.bz2 On 08/19/2014 07:01 PM, Laszlo Papp wrote: > Hmm, it seems that the stripped binary on the target and the one on > the host were out-of-sync. This is really strange since I have not > changed the source code. Seems different compilations still can get > out-of-sync for the same code so that when I rebuild the same source > code, I always need to update the binary on the target, too? Ideally, if you used the exact same inputs, and the exact same tools, and the same exact same tool options, the output is the same. You can check that with md5sum, or some such. > > Anyway, now I only have problems with finding the sources file to view > them in cgdb. I do not know why it is wrong, but it seems to be. As > you can see the paths are set up for dwarf correctly: > > /usr/src/debug/foo-git/AUTOINC+0c2cbe33e653afa335ca25156d293552001228fa-r0/git/meh > > ... yet, gdb says src/bar.c cannot be found even though it should be > in the aforementioned > /usr/src/debug/foo-git/AUTOINC+0c2cbe33e653afa335ca25156d293552001228fa-r0/git/meh > path, provided my sysroot setting is good above, but if that was not > good, it would not load the binaries anyway, right? Correct. > So, if I set that > path one line above with the "-d" option to gdb, then the source file > can be viewed. What may be going on here? That sounds like the expected behavior, as the source directory knobs are independent from the sysroot setting. See: https://sourceware.org/gdb/current/onlinedocs/gdb/Source-Path.html > Thanks in advance. I am so desperately lost. :( I think I'm lost on which part you are lost. :-) Thanks, Pedro Alves