From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19348 invoked by alias); 1 Jul 2002 16:29:10 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19337 invoked from network); 1 Jul 2002 16:29:06 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 1 Jul 2002 16:29:06 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9538F3CB2; Mon, 1 Jul 2002 12:29:03 -0400 (EDT) Message-ID: <3D20834F.3000304@ges.redhat.com> Date: Mon, 01 Jul 2002 09:29:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020613 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michal Ludvig Cc: gdb Subject: Re: cross-target gdb compilation problems References: <3D2080A2.6080702@suse.cz> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00009.txt.bz2 > Hi all, > I'm trying to fix cross-target gdb compilation for x86-64 target (testing on i386 host). The problem is, that it always fails with: > libgdb.a(solib.o): In function `clear_solib': > /ttt/64/gdb/gdb/solib.c:742: undefined reference to `disable_breakpoints_in_shlibs' > libgdb.a(solib-svr4.o): In function `enable_break': > /ttt/64/gdb/gdb/solib-svr4.c:856: undefined reference to `remove_solib_event_breakpoints' > /ttt/64/gdb/gdb/solib-svr4.c:983: undefined reference to `create_solib_event_breakpoint' > collect2: ld returned 1 exit status > make: *** [gdb] Error 1 > while linking gdb binary. > > I realised, that many other targets define #include "solib.h" in their config/*/tm-*.h files. However x86-64 is a pure multiarch target and thus using TM file is not allowed. > When I add '#include "solib.h"' directly to breakpoints.c it compiles and links just fine. Also it seems like most targets use it anyway. If we would wrap all #defines in solib.h between #ifndef...#endif it would remain backward compatible for targets that define their own macros. Or am I wrong? Like this: Until someone fixes these limitations in the solib code, adding the include to the tm*-.h file (and dropping back to multi-arch partial) is the accepted way of addressing this problem. > [solib.h] > + #ifndef SOLIB_ADD > #define SOLIB_ADD(filename, from_tty, targ, readsyms) \ > solib_add (filename, from_tty, targ, readsyms) > + #endif > > Or is there another way to solve my compilation problems? Sigh, yes, someone needs to get down and finish of the solib stuff :-/ enjoy, Andrew