Hi irimi
I'd also like to thank you for that great tutorial. It really saves you a lot of time and trouble. Thank you.
I have the same question as madwlabby. I am using latest backfire release and am having trouble remotely debugging the project with libraries.
For this project I am using libmicrohttpd library. I did make menuconfig and installed it (I selected * not M).
If I make both Makefiles, compile, copy and install on the device the application/package is working as it should.
In eclipse:
- Project Properties -> C/C++ Build -> Settings -> Compiler / Includes -> Include paths -> "/Home/User/openwrt/backfire/staging_dir/target-i386_uClibc-0.9.30.1/usr/include"
- Project Properties -> C/C++ Build -> Settings -> Compiler / Includes -> Libraries -> "microhttpd"
- Project Properties -> C/C++ Build -> Settings -> Linker / Libraries -> Library search path -> "/Home/User/openwrt/backfire/staging_dir/target-i386_uClibc-0.9.30.1/usr/lib"
The project builds normally (Project -> Build Project). When I try to debug it's working all the way till the breakpoint reaches d=MHD_start_daemon... (helloworld code available on their website).
**** Build of configuration Debug for project hellobrowser ****
make all
Building file: ../src/hellobrowser.c
Invoking: Cross GCC Compiler
i486-openwrt-linux-gcc -I/home/User/openwrt/backfire/staging_dir/target-i386_uClibc-0.9.30.1/usr/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/hellobrowser.d" -MT"src/hellobrowser.d" -o "src/hellobrowser.o" "../src/hellobrowser.c"
Finished building: ../src/hellobrowser.c
Building target: hellobrowser
Invoking: Cross GCC Linker
i486-openwrt-linux-gcc -L/home/User/openwrt/backfire/staging_dir/target-i386_uClibc-0.9.30.1/usr/lib -o "hellobrowser" ./src/hellobrowser.o -lmicrohttpd
Finished building target: hellobrowser
**** Build Finished ****
gdb outputs:
warning: Can not parse XML target description; XML support was disabled at compile time
[New Thread 23243]
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: .dynamic section for "/usr/lib/libmicrohttpd.so.5" is not at the expected address (wrong library or version mismatch?)
Error while mapping shared library sections:
/lib/libgcc_s.so.1: No such file or directory.
Error while mapping shared library sections:
/lib/libc.so.0: No such file or directory.
Error while mapping shared library sections:
/lib/libpthread.so.0: No such file or directory.
Error while mapping shared library sections:
/lib/ld-uClibc.so.0: No such file or directory.
Cannot find bounds of current function
I have been playing with this for two days now (try & error) without any breakthrough.
I'd really appreciate if you could provide a tutorial, guide, suggestion about how can one debug with libraries.
Thank you again.
Regards