Bug 2827 - Cross-debugging instructions not really effective
Summary: Cross-debugging instructions not really effective
Status: RESOLVED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4
Assignee: Scott Rifenbark
QA Contact:
URL: http://git.yoctoproject.org/cgit.cgi/...
Whiteboard: 21 March 2013 - Resolved/Fixed
Depends on:
Blocks:
 
Reported: 2012-07-24 14:25 UTC by Paul Eggleton
Modified: 2013-03-21 15:53 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2012-07-24 14:25:46 UTC
The Reference manual in section 5.2.2.1 suggests you can find gdb in the following location:

tmp/sysroots/<host-arch>/usr/bin/<target-abi>-gdb 

Unfortunately this is not suitable for running directly; one user reports that this results in the following error:

error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory.

I'm not sure what needs to be changed here but it does seem like the instructions provided are too simplistic for how things work currently.
Comment 1 Scott Rifenbark 2012-09-04 17:01:30 UTC
After talking with Paul Eggleton on this bug he has suggested taking it over and seeing about fixing the issue.  Then, once the issue is fixed, I can document it in the manual.  For now, I could adjust the manual so that the discussion is more generic and does not suggest specific steps, that in this case, do not work.

Scott
Comment 2 Paul Eggleton 2012-09-04 17:13:24 UTC
My suggestion for the moment would be to just comment out the bits that talk about running gdb directly from within tmp/sysroots; we can leave in the stuff about using meta-toolchain as I'm pretty confident that should be working.
Comment 3 Paul Eggleton 2013-03-19 14:33:15 UTC
The underlying problem seems to be fixed now; I was able to run the produced gdb executable without any errors. There is only one difference now in that there is an extra subdirectory in the path i.e.:

tmp/sysroots/<host-arch>/usr/bin/<target-platform>/<target-abi>-gdb 

e.g. for n450 with Poky on a 64-bit host:

tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux/i586-poky-linux-gdb

Scott, could you add this back into the documentation?
Comment 4 Scott Rifenbark 2013-03-19 17:07:54 UTC
Paul, 

Here is the updated section: http://www.yoctoproject.org/docs/1.4/dev-manual/dev-manual.html#platdev-gdb-remotedebug-launch-gdb-buildcross

Can you look this section over and "okay" it or suggest changes?

Thanks, 
Scott
Comment 5 Paul Eggleton 2013-03-21 10:13:02 UTC
Great, thanks. One more thing though - the path in the example above this needs to be updated too. Here's an equivalent path you'd get from building meta-toolchain currently for beagleboard and installing it into the default path:

/opt/poky/1.4/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
Comment 6 Scott Rifenbark 2013-03-21 15:43:40 UTC
Paul, 

The change is in.  If you okay this I can close this bug.

http://www.yoctoproject.org/docs/1.4/dev-manual/dev-manual.html#platdev-gdb-remotedebug-launch-gdb-buildcross

Scott
Comment 7 Scott Rifenbark 2013-03-21 15:53:52 UTC
Made some wording changes to the area right before the updated example.

Closing.

Scott