This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: Cross solib support; multi-arch problem?


On Wed, Nov 07, 2001 at 12:14:31PM +0100, Orjan Friberg wrote:
> I've been trying to configure the CRIS target to understand shared
> libraries.  It being pure multi-arch, I only have a cris.mt file in
> config/cris which looks like:
> 
> TDEPFILES= cris-tdep.o corelow.o solib.o
> 
> (I may have to add solib-svr4.o to that list; right now I'm just trying
> to get something to build.)  In addition to that, I've included
> "solib.h" in cris-tdep.c.  Building fails because of undefined reference
> to `disable_breakpoints_in_shlibs'.  Checking breakpoint.c, that
> function and a few others are inside an #ifdef SOLIB_ADD, which is
> defined in solib.h.  Strange, no?

Well, for one thing, you're right - you will need to add solib-svr4.o.

> I've scrutinized mips-linux-tdep.c since it seems to have the
> functionality I want to implement, being a cross-debugger and
> understanding shared libs.  From looking at its config files, I couldn't
> figure out what makes the solib thingy build correctly.  Then I thought
> it might be related to mips-linux being only partially multi-arched.

For the next thing, you're right again.  SOLIB_ADD is defined based on
the included header.  What needs to happen is probably that it needs to
be somehow multi-arched, or at least multi-arch aware.  Andrew?

> So, I added a tm-cris.h file containing:
> 
> #define GDB_MULTI_ARCH 1
> #include "solib.h"
> 
> (and commented out the gdb_multi_arch=yes line in configure.tgt) and
> behold, it builds.  Granted, it bombs when I try to use the
> sharedlibrary command.  I'm not sure what needs to be fixed; if it's
> something in the multi-arch framework or if I just need to do something
> differently in my tdep file.

Do you have a link map structure?  Note that that doesn't seem to be
multiarched either :(  Search for svr4 in mips-linux-tdep.c and in
config/mips/linux.h.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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