This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Cross solib support; multi-arch problem?
- To: gdb-patches at sources dot redhat dot com
- Subject: Cross solib support; multi-arch problem?
- From: Orjan Friberg <orjan dot friberg at axis dot com>
- Date: Wed, 07 Nov 2001 12:14:31 +0100
- Organization: Axis Communications AB
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?
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"
(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.
--
Orjan Friberg E-mail: orjan.friberg@axis.com
Axis Communications AB Phone: +46 46 272 17 68