Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Get rid of host <signal.h> in config/tm-linux.h
@ 2001-07-11  1:19 Mark Kettenis
  2001-07-11 14:44 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Kettenis @ 2001-07-11  1:19 UTC (permalink / raw)
  To: gdb-patches; +Cc: dmj+

As pointed out by Daniel Jacobowitz in his Linux/MIPS patch, including
the host <signal.h> in the tm.h file makes no sense.  This moves it to
the nm.h file and leaves reasonable defaults for REALTIME_LO and
REALTIME_HI in tm-linux.h.

Daniel, I think this should make it possible for you to include
tm-linux.h instead of copying over the relevant bits in
config/mips/tm-linux.h.

Checked in.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* config/tm-linux.h: Do not include <signal.h>.  Instead provide
	reasonable defaults for REALTIME_LO and REALTIME_HI if they're not
	already defined.
	* config/nm-linux.h: Include <signal.h>.
	[__SIGRTMIN] (REALTIME_LO, REALTIME_HI): Define to __SIGRTMIN and
	(__SIGRTMAX + 1) respectively.

Index: config/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/tm-linux.h,v
retrieving revision 1.3
diff -u -p -r1.3 tm-linux.h
--- config/tm-linux.h 2001/03/06 08:21:20 1.3
+++ config/tm-linux.h 2001/07/11 08:06:51
@@ -19,15 +19,12 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/* Some versions of Linux have real-time signal support in the C library, and
-   some don't.  We have to include this file to find out.  */
-#include <signal.h>
+/* Pick reasonable defaults for the number of real-time signals.  */
 
-#ifdef __SIGRTMIN
-#define REALTIME_LO __SIGRTMIN
-#define REALTIME_HI (__SIGRTMAX + 1)
-#else
+#ifndef REALTIME_LO
 #define REALTIME_LO 32
+#endif
+#ifndef REALTIME_HI
 #define REALTIME_HI 64
 #endif
 
Index: config/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/nm-linux.h,v
retrieving revision 1.7
diff -u -p -r1.7 nm-linux.h
--- config/nm-linux.h 2001/05/15 00:03:37 1.7
+++ config/nm-linux.h 2001/07/11 08:06:51
@@ -1,4 +1,4 @@
-/* Native support for GNU/Linux, for GDB, the GNU debugger.
+/* Native support for GNU/Linux.
    Copyright 1999, 2000
    Free Software Foundation, Inc.
 
@@ -54,3 +54,13 @@ extern int linuxthreads_prepare_to_proce
 
 #define GDB_GREGSET_T  elf_gregset_t
 #define GDB_FPREGSET_T elf_fpregset_t
+
+/* Since we're building a native debugger, we can include <signal.h>
+   to find the range of real-time signals.  */
+
+#include <signal.h>
+
+#ifdef __SIGRTMIN
+#define REALTIME_LO	__SIGRTMIN
+#define REALTIME_HI	(__SIGRTMAX + 1)
+#endif


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

* Re: [PATCH] Get rid of host <signal.h> in config/tm-linux.h
  2001-07-11  1:19 [PATCH] Get rid of host <signal.h> in config/tm-linux.h Mark Kettenis
@ 2001-07-11 14:44 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2001-07-11 14:44 UTC (permalink / raw)
  To: gdb-patches

On Wed, Jul 11, 2001 at 10:19:35AM +0200, Mark Kettenis wrote:
> As pointed out by Daniel Jacobowitz in his Linux/MIPS patch, including
> the host <signal.h> in the tm.h file makes no sense.  This moves it to
> the nm.h file and leaves reasonable defaults for REALTIME_LO and
> REALTIME_HI in tm-linux.h.
> 
> Daniel, I think this should make it possible for you to include
> tm-linux.h instead of copying over the relevant bits in
> config/mips/tm-linux.h.

Yes, it does.  Fixed with the attached patch (committed).

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2001-07-11  Daniel Jacobowitz  <drow@mvista.com>

	* config/mips/tm-linux.h: Include "tm-linux.h" instead of copying
	from it.  Move definitions of REALTIME_LO and REALTIME_HI above
	include.

Index: tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-linux.h,v
retrieving revision 1.1
diff -u -r1.1 tm-linux.h
--- tm-linux.h	2001/07/10 20:41:54	1.1
+++ tm-linux.h	2001/07/11 21:41:17
@@ -30,33 +30,17 @@
 #undef SKIP_TRAMPOLINE_CODE
 #undef IGNORE_HELPER_CALL
 
-/* FIXME: Do not include "tm-linux.h", because we do not want the host's
-   <signal.h>.  Instead, copy the non-signal bits for now.  */
-
-/* We need this file for the SOLIB_TRAMPOLINE stuff.  */
-
-#include "tm-sysv4.h"
-
-/* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
-   link.h is available on all linux platforms.  For I386 and SH3/4,
-   we hard-code the information rather than use link.h anyway (for
-   the benefit of cross-debugging).  We may move to doing that for
-   other architectures as well.  */
+/* Linux/MIPS has __SIGRTMAX == 127.  */
 
-#define SVR4_SHARED_LIBS
-#include "solib.h"              /* Support for shared libraries.  */
+#define REALTIME_LO 32
+#define REALTIME_HI 128
 
-/* End from "tm-linux.h".  */
+#include "tm-linux.h"
 
 /* There's an E_MIPS_ABI_O32 flag in e_flags, but we don't use it - in
    fact, using it may violate the o32 ABI.  */
 
 #define MIPS_DEFAULT_ABI MIPS_ABI_O32
-
-/* Linux/MIPS has __SIGRTMAX == 127.  */
-
-#define REALTIME_LO 32
-#define REALTIME_HI 128
 
 /* Use target_specific function to define link map offsets.  */
 


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

end of thread, other threads:[~2001-07-11 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-11  1:19 [PATCH] Get rid of host <signal.h> in config/tm-linux.h Mark Kettenis
2001-07-11 14:44 ` Daniel Jacobowitz

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