| |||
| Home > Debugging embedded applications > Debugging shared libraries | |||
Shared libraries enable parts of your application to be dynamically loaded at runtime. You must ensure that the shared libraries on your target are the same as those on your host. The code layout must be identical, but the shared libraries on your target do not need to contain debug symbols.
You can set standard execution breakpoints in a shared library but not until it is loaded by the application and the debug symbols are loaded into the debugger. Pending breakpoints however, enable you to set execution breakpoints in a shared library before it is loaded by the application.
When a new shared library is loaded the debugger re-evaluates all pending breakpoints, those with addresses that it can resolve, are set as standard execution breakpoints. Unresolved addresses remain as pending breakpoints.
The debugger automatically changes any breakpoints in a shared library to a pending breakpoint when the library is unloaded by your application.
In Eclipse, you can load shared libraries in the Debug Configurations dialog box. If you have one library file then you can use the Load symbols from file option or the Other file on host to download option in the Files panel of the Files tab.
Options in the Files tab depend on the type of platform and debug operation that you select in the Connection tab.
Alternatively if you have multiple library files then it is probably more efficient to modify the search paths in use by the debugger when searching for shared libraries. To do this you can use the Shared library search directory option in the Paths panel of the Debugger tab.
For more information on the options in the Debug Configurations dialog box, see the dynamic help.