This is the mail archive of the
mailing list for the GDB project.
Re: Debugging issue with gdbserver and a daemon on the target
- From: Pedro Alves <palves at redhat dot com>
- To: Laszlo Papp <lpapp at kde dot org>
- Cc: gdb at sourceware dot org
- Date: Wed, 20 Aug 2014 09:17:17 +0100
- Subject: Re: Debugging issue with gdbserver and a daemon on the target
- Authentication-results: sourceware.org; auth=none
- References: <CAOMwXhPxtfv7f=akjpuTh+HNCGDeEm0vxen1Kp3pPco++gvuLg at mail dot gmail dot com> <53F3743F dot 3000106 at redhat dot com> <CAOMwXhMmyXmHi9gZADtkTYb9mbF2hZRv2vHPC5AEcNWkE9duBg at mail dot gmail dot com> <53F3776D dot 2010705 at redhat dot com> <CAOMwXhOQkPH-6By+C0zcu3RAQMhWypC18ZsFrLK+ncdAcq3b0Q at mail dot gmail dot com>
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:
> ... yet, gdb says src/bar.c cannot be found even though it should be
> in the aforementioned
> path, provided my sysroot setting is good above, but if that was not
> good, it would not load the binaries anyway, right?
> 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:
> Thanks in advance. I am so desperately lost. :(
I think I'm lost on which part you are lost. :-)