Yes, I'm able to debug the externalsrc component. I can see variables, set breakpoints, step/next through the code etc. (so the symbols are valid). And local changes to the externalsrc component are reflected when I debug.
But I can't list the externalsrc component source code from within gdb (or find it anywhere in the image). The source for all of the other components is in the image (and I can list it in gdb). When I try to list the code for the externalsrc component, gdb prints this error message: "[path on my build? machine]/sourceFile.c: No such file or directory." If I don't use externalsrc at all, I can debug all of the components and list source code for all of them from within gdb. So, I can't solve how to get the externalsrc source code into the image. I don't mind if I have to use "set substitute-path" from within gdb if externalsrc source files are put in a different place (although, it'd be ideal if they were put in the same place). Thanks ________________________________________ From: Khem Raj <raj.k...@gmail.com> Sent: Wednesday, July 15, 2015 1:49 PM To: Dave Kimble Cc: yocto@yoctoproject.org Subject: Re: [yocto] using gdb with externalsrc On Wed, Jul 15, 2015 at 9:36 AM, Dave Kimble <dkim...@alticast.com> wrote: > We've got a component of an existing Yocto project under active development > that we'd like to debug with gdb. > > We've added these features to get gdb and the debug symbol packages into the > image: > > EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug" > > IMAGE_FEATURES = "ssh-server-openssh dbg-pkgs" > > > We've added these variables to build the component under active development > from the local code: > INHERIT += "externalsrc" > EXTERNALSRC_pn-[component] = "[local source code path]/[component]" > > All seems well, as the build succeeds and the component in the image > reflects local code changes. However, the component source code never makes > it into the image, so it can't be referenced in gdb. > > Is there a secret to using dbg-pkgs and EXTERNALSRC together? Can you check if -dbg package for extrnalsrc component is installed ? secondly, does the debugging work if you dont isue externalsrc for this particular component.
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto