Re: [RFA] Remove REALTIME_HI/LO macros from target headers

Ulrich Weigand
2006-11-28T19:40:00Z

Daniel Jacobowitz wrote:

> I'm not too worried about it. Let's assume it won't be a problem, and
> if it is, it's easy to fix.

OK, fine with me.

> > Would it be OK to commit the current patch as-is, and do the removal
> > from nm-linux.h as a follow-on patch?
>
> Yes, that's fine; the current patch is OK.

Thanks; I've committed the patch now.

Here's the follow-on patch to remove the definition from nm-linux.h
as well; tested on s390-ibm-linux and s390x-ibm-linux. OK?

Bye,
Ulrich

ChangeLog:

* config/nm-linux.h: Do not include <signal.h>.
(REALTIME_LO, REALTIME_HI): Do not define.
* signals/signals.c (REALTIME_HI): Fix off-by-one bug.

diff -ur gdb-orig/gdb/config/nm-linux.h gdb-head/gdb/config/nm-linux.h
--- gdb-orig/gdb/config/nm-linux.h 2006-11-24 19:29:57.000000000 +0100
+++ gdb-head/gdb/config/nm-linux.h 2006-11-28 20:02:26.533200576 +0100
@@ -25,16 +25,6 @@
/* GNU/Linux is SVR4-ish but its /proc file system isn't. */
#undef USE_PROC_FS

-/* 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
-
extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))

diff -ur gdb-orig/gdb/signals/signals.c gdb-head/gdb/signals/signals.c
--- gdb-orig/gdb/signals/signals.c 2005-12-23 20:05:48.000000000 +0100
+++ gdb-head/gdb/signals/signals.c 2006-11-28 20:02:43.954215168 +0100
@@ -37,10 +37,10 @@
#ifndef REALTIME_LO
# if defined(__SIGRTMIN)
# define REALTIME_LO __SIGRTMIN
-# define REALTIME_HI __SIGRTMAX
+# define REALTIME_HI (__SIGRTMAX + 1)
# elif defined(SIGRTMIN)
# define REALTIME_LO SIGRTMIN
-# define REALTIME_HI SIGRTMAX
+# define REALTIME_HI (SIGRTMAX + 1)
# endif
#endif