This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: solib search algorithm for cross-gdb


Paul Koning wrote:

When I said "cross-gdb" I was thinking about host != target -- for
example an Intel host and a MIPS target.  Using the literal library
path can't possibly be right in that case.

Daniel suggests some other cases that are more dynamic -- host ==
target but we're doing remote debugging.

Right now we have TARGET_SO_FIND_AND_OPEN_SOLIB as a way for the
target specific code to add another way to find libraries, but we
don't have any way for any component to subtract ways, which is what I
need here.


Setting solib-absolute-prefix is a the way to subtract searching from the root since it either searches <abspath> or <solib-abs-pref>/<abspath>, not both. Don't know if it's practical for you but we explicitly set solib-absolute-prefix in our init functions so we never have to worry about accidentally getting /usr/lib/somelib.so instead of $SDK_ROOT/usr/lib/somelib.so.


cheers,

Kris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]