On 4/18/16 9:16 AM, Andreas Müller wrote: > On Mon, Apr 18, 2016 at 3:55 PM, Burton, Ross <[email protected]> wrote: >> >> On 18 April 2016 at 14:08, Hongxu Jia <[email protected]> wrote: >>> >>> If sysroot is required, override DEBUG_FLAGS to remove -fdebug-prefix-map >> >> >> We should probably get this in the release notes, as many people do indeed >> want remote debug to work. >> >> Can you tell gdb the base path to use when looking for symbols? I've not >> done remote GDB for some time but wouldn't "set substitute-path / >> //my/sysroot/" work? Or maybe /usr /my/sysroot/usr? >> >> If gdb can't be told then instead of having to replace all of DEBUG_FLAGS it >> would be neat if the prefix mapping variables where in another variable that >> could just be unset. >> >> Ross > OK I think I could live with removing -fdebug-prefix-map for now. > > A thought: We have the setting IMAGE_GEN_DEBUGFS - I have not yet > tested. As far as I understand it creates an unstripped sysroot and > does not affect target rootfs - is that correct? Does the sysroot > created by IMAGE_GEN_DEBUGFS contain the sources? If yes we could set > that as sysroot for gdb. > > I think one of the problems we have here is that there is no reference > way documented (or it is outdated) how remote debugging is meant to be > performed.
Remote debugging is setup to always assume the remote side has access to a debugable sysroot. This isn't the project's sysroot, since that is transient, but a REAL matching sysroot to the main image. The easiest way to do this is to add the following to your local.conf: IMAGE_GEN_DEBUGFS = '1' After this, look in your deploy directory and you will see the image to deploy to the target, and also a matching 'debug' chunk that you keep on your local host. This way you -know- they are always in sync. There is class material from the various Yocto Project Dev Day classes on using this. The alternative is tell GDB itself to map directories. I don't remember offhand the right option, but GDB supports remapping a directory reference to an actual directory. It should be pretty simple to re-map it -- but due to the transient nature of the sysroot directory in the build, I don't recommend doing it this way. --Mark -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
