From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9320 invoked by alias); 14 Nov 2003 17:26:03 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9304 invoked from network); 14 Nov 2003 17:25:59 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sources.redhat.com with SMTP; 14 Nov 2003 17:25:59 -0000 Received: (qmail 26718 invoked by uid 10); 14 Nov 2003 17:25:58 -0000 Received: (qmail 3906 invoked by uid 500); 14 Nov 2003 17:25:52 -0000 Message-ID: <20031114172552.3905.qmail@gossamer.airs.com> Date: Fri, 14 Nov 2003 17:26:00 -0000 From: Ian Lance Taylor To: gdb-patches@sources.redhat.com, rearnsha@arm.com Subject: Building cross-gdb to arm-netbsd X-SW-Source: 2003-11/txt/msg00298.txt.bz2 Building a cross gdb to arm-netbsd fails. There are a few functions in breakpoint.c which are only defined if SOLIB_ADD is defined. For arm-netbsd, SOLIB_ADD is normally defined by solib.h. For a native arm-netbsd build, solib.h is included (indirectly) by the NAT_FILE config/arm/nm-nbsd.h. However, this does not happen for a cross gdb to arm-netbsd. For example, clear_solib() in solib.c calls disable_breakpoints_in_shlibs(), which is only defined in breakpoint.c if SOLIB_ADD is defined. solib.o appears in TDEPFILES in config/arm/nbsd.mt, which I think is correct for this target. I don't know how the solib.h thing is supposed to be handled in the multi-arch regime. Presumably it is wrong for breakpoint.c to only define functions based on SOLIB_ADD. In any case, this patch fixes the build problem. It reverses part of this change, because it resurrects config/arm/tm-nbsd.h. 2002-02-19 Richard Earnshaw * configure.tgt (arm*-*-netbsd*): This variant is now fully multi-arch. * config/arm/nbsd.mt (TM_FILE): Delete. * config/arm/tm-nbsd.h: Delete. So I don't know if this patch is correct. But either this patch, or some different fix, should be applied. Ian 2003-11-14 Ian Lance Taylor * config/arm/nbsd.mt (TM_FILE): Define. * config/arm/tm-nbsd.h: New file. Index: config/arm/nbsd.mt =================================================================== RCS file: /cvs/src/src/gdb/config/arm/nbsd.mt,v retrieving revision 1.5 diff -u -p -r1.5 nbsd.mt --- config/arm/nbsd.mt 22 May 2002 03:59:54 -0000 1.5 +++ config/arm/nbsd.mt 14 Nov 2003 17:18:21 -0000 @@ -1,2 +1,3 @@ # Target: ARM running NetBSD TDEPFILES= arm-tdep.o armnbsd-tdep.o solib.o solib-svr4.o nbsd-tdep.o +TM_FILE=tm-nbsd.h Index: config/arm/tm-nbsd.h =================================================================== RCS file: config/arm/tm-nbsd.h diff -N config/arm/tm-nbsd.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ config/arm/tm-nbsd.h 14 Nov 2003 17:18:21 -0000 @@ -0,0 +1,27 @@ +/* Macro definitions for ARM running under NetBSD. + Copyright 2003 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef TM_NBSD_H +#define TM_NBSD_H + +#include "arm/tm-arm.h" +#include "solib.h" + +#endif /* TM_NBSD_H */