Using 'solib-search-path' on 64/32-bit targets

Dmitry Antipov dantipov@nvidia.com
Tue Jan 16 13:28:00 GMT 2018


For the remote debugging on a 64-bit target with 32-bit compatibility, is it reasonable
to have gdb.setup with 'solib-search-path' pointed to both 64- and 32-bit libraries
(say, 'set solib-search-path /path/to/target/fs/lib64:/path/to/target/fs/lib32')? Currently GDB
just gives up the search if an inappropriate library is found, and will not try to examine
the rest of 'solib-search-path' entries. IOW if we're debugging 32-bit process with libXXX.so
dependency and 'solib-search-path' is set as above, /path/to/target/fs/lib32/libXXX.so won't
be found if /path/to/target/fs/lib64/libXXX.so is present. Attached is a simple attempt to
"fix" that behavior (toggled by new 'solib-search-giveup' flag), but I'm not sure whether
it needs to be "fixed" in that way at all :-).

Dmitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb_solib_lookup_2.patch
Type: text/x-patch
Size: 3652 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20180116/de37d452/attachment.bin>


More information about the Gdb mailing list