This is the mail archive of the
mailing list for the GDB project.
Re: Cross solib support; multi-arch problem?
- To: Orjan Friberg <orjan dot friberg at axis dot com>, gdb-patches at sources dot redhat dot com
- Subject: Re: Cross solib support; multi-arch problem?
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Wed, 7 Nov 2001 09:21:36 -0700
- References: <3BE91797.3442F92D@axis.com>
On Nov 7, 12:14pm, 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
As Daniel has noted, you'll have to add solib-svr4.o to that list.
> 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?
> 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.
> So, I added a tm-cris.h file containing:
> #define GDB_MULTI_ARCH 1
> #include "solib.h"
Unfortunately, I think this is going to be needed for the medium term.
In the fullness of time, we'd like to get all of the shared library
support consolidated to using only solib.c for the interface to the
rest of GDB. Once that is done, ADD_SOLIB and company won't be need
to be macros any more. To be more precise, the shared library
framework present in solib.c will be present for all targets whether
it's needed or not. When SOLIB_ADD() (or probably just solib_add())
is called, it'll simply not do anything when the target in question
doesn't have/require shared library support.