# Problem debugging FX30 using shared library

**URL:** <https://forum.legato.io/t/problem-debugging-fx30-using-shared-library/3464>\
**Category:** Uncategorized\
**Created:** [July 20, 2018, 12:25pm UTC](https://forum.legato.io/t/problem-debugging-fx30-using-shared-library/3464 "2018-07-20T12:25:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karlkuhn](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@karlkuhn](https://forum.legato.io/u/karlkuhn)\
**Post date:** [July 20, 2018, 12:25pm UTC](https://forum.legato.io/t/problem-debugging-fx30-using-shared-library/3464/1 "2018-07-20T12:25:48Z")

</div>

Hi, I am trying to debug my application that is running on a FX30s. It builds and runs OK, but the debugger tries to attached with the following error messages…

> GNU gdb (GDB) 7.7.1  
> Copyright (C) 2014 Free Software Foundation, Inc.  
> License GPLv3+: GNU GPL version 3 or later [http://gnu.org/licenses/gpl.html](http://gnu.org/licenses/gpl.html)  
> This is free software: you are free to change and redistribute it.  
> There is NO WARRANTY, to the extent permitted by law. Type “show copying”  
> and “show warranty” for details.  
> This GDB was configured as “–host=i686-pokysdk-linux --target=arm-poky-linux-gnueabi”.  
> Type “show configuration” for configuration details.  
> For bug reporting instructions, please see:  
> [http://www.gnu.org/software/gdb/bugs/](http://www.gnu.org/software/gdb/bugs/).  
> Find the GDB manual and other documentation resources online at:  
> [http://www.gnu.org/software/gdb/documentation/](http://www.gnu.org/software/gdb/documentation/).  
> For help, type “help”.  
> Type “apropos word” to search for commands related to “word”.  
> warning: Unable to find dynamic linker breakpoint function.  
> GDB will be unable to debug shared library initializers  
> and track explicitly loaded dynamic code.  
> Cannot access memory at address 0x0  
> warning: Could not load shared library symbols for 9 libraries, e.g. /bin/…/lib/libDL4Api-Linux.so.  
> Use the “info sharedlibrary” command to see the complete listing.  
> Do you need “set solib-search-path” or “set sysroot”?  
> Quit

I am using DS 5.00 and LF 16.10.1.

The one shared library is cross compiled using arm-poky-linux-gnueabi-g++ not sure what the other 8 are…

How do I best get around this issue?

Thanks,

Karl

---

<div class="post-metadata">

**Author:** ![flu](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/flu/32/813_2.png) [@flu](https://forum.legato.io/u/flu)\
**Post date:** [July 20, 2018, 2:19pm UTC](https://forum.legato.io/t/problem-debugging-fx30-using-shared-library/3464/2 "2018-07-20T14:19:47Z")

</div>

Hello Karl,

Please tell which procedure has been used on your side:

- add “-d” option to mkapp
- or rebuild Legato by passing STRIP\_STAGING\_STREE=0 to its make, add --cflags=“-g” and --ldflags=“-g” to mkapp, and pass “set solib-search-path” to GDB client?

KR.

---

<div class="post-metadata">

**Author:** ![karlkuhn](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@karlkuhn](https://forum.legato.io/u/karlkuhn)\
**Post date:** [July 20, 2018, 2:31pm UTC](https://forum.legato.io/t/problem-debugging-fx30-using-shared-library/3464/3 "2018-07-20T14:31:20Z")

</div>

Hi @flu, I have built it using Developer studio… the build log is as follows

> 15:27:51 \*\*\*\* Incremental Build of configuration Target\_Legato\_Debug for project DLC\_Gateway\_Legato \*\*\*\*  
> make -I /home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato all  
> cd …;mkapp -t wp85 -o Target\_Legato\_Debug -w Target\_Legato\_Debug -i “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/interfaces/atServices” -i “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/interfaces/secureStorage” -i “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/interfaces/positioning” -i “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/interfaces/wifi” -i “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/interfaces/airVantage” -i “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/interfaces” -i “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/interfaces/modemServices” -i “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/interfaces/supervisor” -i “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/interfaces/logDaemon” -i /home/legato/projects/DLC-Gateways\_DS/DLC-Gateway-Base -i /home/legato/projects/DLC-Gateways\_DS/XPlat-Shared -i /home/legato/projects/DLC-Gateways\_DS/DL4Api-Base -i /home/legato/projects/DLC-Gateways\_DS/DL4Api-Linux -s “.” -s “/home/legato/legato/packages/legato.framework.16.10.1.wp85-wp750x-201701111029/resources/legato/components” -C -g -X -g -L -g DLC\_Gateway\_Legato.adef  
> ninja: no work to do.  
> av-pack -b . -u DLC\_Gateway\_Legato.wp85.update -t LegatoApplication  
> Generating an airvantage package for a legato application.  
> adding: DLC\_Gateway\_Legato.wp85.update (deflated 0%)  
> adding: manifest.app (deflated 69%)
> 
> 15:27:51 Build Finished (took 430ms)

---

<div class="post-metadata">

**Author:** ![bharath\_08](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bharath\_08](https://forum.legato.io/u/bharath_08)\
**Post date:** [October 23, 2018, 1:52pm UTC](https://forum.legato.io/t/problem-debugging-fx30-using-shared-library/3464/4 "2018-10-23T13:52:02Z")

</div>

Hi,

As per flu mentioned, please try to provide the -d option in mkapp command.

For your reference, Please check the below link for Debug using GDB.

> **[Debug using GDB - Legato Docs](https://docs.legato.io/latest/howToDebugGDB.html#howToDebugGDB_building)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

Best Regards,  
Bharath Kumar V
