[yocto] gdb/gdbserver vs. eclipse

Robert Berger gmane at reliableembeddedsystems.com
Sat Sep 5 08:26:03 PDT 2015


Hi,

On 09/05/2015 02:47 AM, Rudolf J Streif wrote:
> Hi Robert,
> 
> I am seeing the same thing. I cannot even step into a library function unless 
> I check "Load shared library symbols automatically" in Debug Configurations > 
> Remote C/C++ Application > <Your Application> > Debugger > Shared Libraries.

This needs to be turned on.

I think I made some progress - see attached image.

As you can see I stepped into printf and friends.

For this to work I needed a few more things:

1) directory needs the be the same on host and target

the executable on the host:

/home/student/BBBworkspace/HelloBBBAutotooled/src/HelloBBBAutotooled

the executable on the target:

/home/student/BBBWorkspace/HelloBBBAutotooled/src/HelloBBBAutotooled

2) .gdbinit

I copied my gdbinit on the host to

/home/student/BBBworkspace/HelloBBBAutotooled/.gdbinit

that's the .gdbinit

# don't use default libs from x86/Ubuntu:
set sysroot /opt/adt-target-sysroot/beagle-bone-black-ml
set solib-absolute-prefix /opt/adt-target-sysroot/beagle-bone-black-ml
set solib-search-path  /opt/adt-target-sysroot/beagle-bone-black-ml
# point to the libraries with debug info:
set debug-file-directory
/opt/adt-target-sysroot/beagle-bone-black-ml/usr/lib/debug
# point to the source code:
set substitute-path /usr/src/debug
/opt/adt-target-sysroot/beagle-bone-black-ml/usr/src/debug
set substitute-path /
/opt/adt-target-sysroot/beagle-bone-black-ml/usr/src/debug

3) Once you enter the debug view you need to go to the gdb console and:

source /home/student/BBBworkspace/HelloBBBAutotooled/.gdbinit

This did the trick for me.

Regards,

Robert
...The most likely way for the world to be destroyed, most experts
agree, is by accident. That's where we come in; we're computer
professionals. We cause accidents.

My public pgp key is available,at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: eclipse-debug-system-libs.png
Type: image/png
Size: 183960 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20150905/cc0ee2b2/attachment.png>


More information about the yocto mailing list