Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Building cross-gdb to arm-netbsd
@ 2003-11-14 17:26 Ian Lance Taylor
  2003-11-14 18:58 ` Mark Kettenis
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2003-11-14 17:26 UTC (permalink / raw)
  To: gdb-patches, rearnsha

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Building cross-gdb to arm-netbsd
  2003-11-14 17:26 Building cross-gdb to arm-netbsd Ian Lance Taylor
@ 2003-11-14 18:58 ` Mark Kettenis
  2003-11-14 20:13   ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Kettenis @ 2003-11-14 18:58 UTC (permalink / raw)
  To: ian; +Cc: gdb-patches, rearnsha

   Date: 14 Nov 2003 12:25:52 -0500
   From: Ian Lance Taylor <ian@wasabisystems.com>

   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.

I guess none of us really do.  However, the current situation for
arm-netbsd is clearly wrong.

   In any case, this patch fixes the build problem.

   2003-11-14  Ian Lance Taylor  <ian@wasabisystems.com>

	   * config/arm/nbsd.mt (TM_FILE): Define.
	   * config/arm/tm-nbsd.h: New file.

Your config/arm/tm-nbsd.h also includes "arm/tm-arm.h".  Is that
necessary?

Mark


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Building cross-gdb to arm-netbsd
  2003-11-14 18:58 ` Mark Kettenis
@ 2003-11-14 20:13   ` Ian Lance Taylor
  2003-11-14 20:42     ` Mark Kettenis
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2003-11-14 20:13 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches, rearnsha

Mark Kettenis <kettenis@chello.nl> writes:

>    In any case, this patch fixes the build problem.
> 
>    2003-11-14  Ian Lance Taylor  <ian@wasabisystems.com>
> 
> 	   * config/arm/nbsd.mt (TM_FILE): Define.
> 	   * config/arm/tm-nbsd.h: New file.
> 
> Your config/arm/tm-nbsd.h also includes "arm/tm-arm.h".  Is that
> necessary?

To be honest, I don't know.  I did it by analogy with i386/tm-nbsd.h.

I suppose, looking at it more closely, then the definition of
VARIABLES_INSIDE_BLOCK is not needed, since the system compiler is
always gcc.  So the only thing which arm/tm-arm.h does is define
GDB_MULTI_ARCH.  Looking at defs.h, that may also be unnecessary.

So I guess it is not needed.  gdb does build without that #include.

Ian


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Building cross-gdb to arm-netbsd
  2003-11-14 20:13   ` Ian Lance Taylor
@ 2003-11-14 20:42     ` Mark Kettenis
  2003-11-14 20:45       ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Kettenis @ 2003-11-14 20:42 UTC (permalink / raw)
  To: ian; +Cc: gdb-patches, rearnsha

   From: Ian Lance Taylor <ian@wasabisystems.com>
   Date: 14 Nov 2003 15:01:26 -0500

   Mark Kettenis <kettenis@chello.nl> writes:

   > Your config/arm/tm-nbsd.h also includes "arm/tm-arm.h".  Is that
   > necessary?

   To be honest, I don't know.  I did it by analogy with i386/tm-nbsd.h.

   I suppose, looking at it more closely, then the definition of
   VARIABLES_INSIDE_BLOCK is not needed, since the system compiler is
   always gcc.  So the only thing which arm/tm-arm.h does is define
   GDB_MULTI_ARCH.  Looking at defs.h, that may also be unnecessary.

Yes, setting GDB_MULTI_ARCH shouldn't be necessary in this case.

   So I guess it is not needed.  gdb does build without that #include.

In that case, could you check it in without the #include?

Thanks,

Mark


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Building cross-gdb to arm-netbsd
  2003-11-14 20:42     ` Mark Kettenis
@ 2003-11-14 20:45       ` Ian Lance Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Lance Taylor @ 2003-11-14 20:45 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches, rearnsha

Mark Kettenis <kettenis@chello.nl> writes:

>    So I guess it is not needed.  gdb does build without that #include.
> 
> In that case, could you check it in without the #include?

Done.  Thanks.

Ian


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-11-14 20:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-14 17:26 Building cross-gdb to arm-netbsd Ian Lance Taylor
2003-11-14 18:58 ` Mark Kettenis
2003-11-14 20:13   ` Ian Lance Taylor
2003-11-14 20:42     ` Mark Kettenis
2003-11-14 20:45       ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox