Elena Laskavaia
|
Qnx IDE: Tip of the Day #10: Remote debugging with shared library
|
Elena Laskavaia
04/02/2009 11:31 AM
post25863
|
Qnx IDE: Tip of the Day #10: Remote debugging with shared library
Remote debugging is not an easy thing, and remove debugging with shared libraries is more complected.
To do successful debugging with shared library (i.e. to set breakpoints in libraries and view sources) you need the
following things:
- create launch configuration for debugging
- have set of binary and all libraries available on target. Library name should be SONAME, i.e. name that binary
required, not the name of the file. Usually they different by .so postfix. I.e. compiler would create libaaa.so and
actual name is libaaa.so.1. Loader needs second name. Linker needs first. If you using IDE to upload (Upload tab of
launch configuration) it will rename all libraries appropriately. If not - you have to take care of it yourself. Also
you need to set LD_LIBRARY_PATH variable in Environment tab if libraries are not in standard path (path is on target).
- set of binary and libraries with debug info available on the host. Debugger has to know where they are.
Set binary in the Main tan and Library paths in the Debugger tab - Shared Libraries. Library name MUST be SOMENAME on
the host, i.e. libaaa.so.1, otherwise debugger would not find it. If you using IDE upload it will also take care of
renaming host libraries, if not you have to make sure they are renamed. The better approach for debugging would be
actually not to use soname at all when you building the library for debugging (controlled by linker option).
- sources for binary and library available on host. If it was compiled on different host you also need to set Path
mapping in the Source tab.
Happy debugging!
|
|
|