UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer ykota
Observer
1,155 Views
Registered: ‎01-05-2017

Adding libs to Petalinux GDB

Hi All,

 

I am using petalinux on Microzed board which has a zynq SOC. I have a lot of apps and libs that we custom developed for our board. The apps use libs to perform tasks. 

Example: components/apps/myApp uses components/apps/myLib

 

 

When I want to debug this on the target using gdb, I perform the following steps,

Please Note: Target is connected to host in a private network with IP 192.168.X.X. Host is running a Linux OS

On Target:

cd /bin
gdbserver host:1534 myApp

 

On Host:

petalinux-util --gdb myApp

target remote 192.168.X.X:1534

 

With this I can only debug myApp, I cannot debug myLib which is dynamically linked in myApp.

 

Warning in GDB I get is:

(gdb) target remote 192.168.X.X:1534
Remote debugging using 192.168.X.X:1534
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0xb6fd7ac0 in ?? ()
(gdb)

 

Has anyone got this to work? Any pointers on how to get this to work?? 

0 Kudos
1 Reply
Scholar rfs613
Scholar
1,145 Views
Registered: ‎05-28-2013

Re: Adding libs to Petalinux GDB

You'll need to have, on your host machine, a version of the library with debug symbols in it (the version on the target can be stripped). Then gdb needs a bit of help to locate the library, typically using the command: set solib-search-path

For more details, you can google the warning message, this is a fairly common question. See for example https://www.fayewilliams.com/2013/01/31/gdb-unable-to-find-dynamic-linker-breakpoint-function/
0 Kudos