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]
Other format: [Raw text]

Building cross-gdb to arm-netbsd


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  <rearnsha@arm.com>

	* 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  <ian@wasabisystems.com>

	* 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 */


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