<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(171, 171, 171) solid;font-family:'Segoe UI WPC', 'Segoe UI', Tahoma, 'Microsoft Sans Serif', Verdana, sans-serif;font-size:11pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(223, 237, 250);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 2px 4px 0px 4px;vertical-align:sub;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(223, 237, 250) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}--></style>
</head>
<body>
<div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
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.<br>
<br>
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:<br>
"[path on my <strong style="text-decoration: underline;"><em>build</em></strong><span style="text-decoration: underline;"></span>​ machine]/sourceFile.c: No such file or directory."
<div><br>
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.<br>
<br>
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).<br>
<br>
Thanks<br>
<br>
<br>
________________________________________<br>
From: Khem Raj <raj.khem@gmail.com><br>
Sent: Wednesday, July 15, 2015 1:49 PM<br>
To: Dave Kimble<br>
Cc: yocto@yoctoproject.org<br>
Subject: Re: [yocto] using gdb with externalsrc<br>
<br>
On Wed, Jul 15, 2015 at 9:36 AM, Dave Kimble <dkimble@alticast.com> wrote:<br>
> We've got a component of an existing Yocto project under active development<br>
> that we'd like to debug with gdb.<br>
><br>
> We’ve added these features to get gdb and the debug symbol packages into the<br>
> image:<br>
><br>
> EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug"<br>
><br>
> IMAGE_FEATURES = "ssh-server-openssh dbg-pkgs"<br>
><br>
><br>
> We’ve added these variables to build the component under active development<br>
> from the local code:<br>
> INHERIT += "externalsrc"<br>
> EXTERNALSRC_pn-[component] = “[local source code path]/[component]”<br>
><br>
> All seems well, as the build succeeds and the component in the image<br>
> reflects local code changes. However, the component source code never makes<br>
> it into the image, so it can’t be referenced in gdb.<br>
><br>
> Is there a secret to using dbg-pkgs and EXTERNALSRC together?<br>
<br>
Can you check if -dbg package for extrnalsrc component is installed ?<br>
secondly, does the debugging work if you dont isue externalsrc for<br>
this particular component.<br>
</div>
</div>
</body>
</html>