This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] Always define all of TARGET_SIGNAL_*
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 10 Mar 2002 19:20:38 -0500
- Subject: Re: [rfa] Always define all of TARGET_SIGNAL_*
- References: <20020227221148.A30753@nevyn.them.org> <3C7E456C.6090605@cygnus.com> <20020228115139.A8496@nevyn.them.org> <3C7E6634.4010209@cygnus.com>
On Thu, Feb 28, 2002 at 12:17:40PM -0500, Andrew Cagney wrote:
> >On Thu, Feb 28, 2002 at 09:57:48AM -0500, Andrew Cagney wrote:
> >
> >>>I've been meaning to fix this since I noticed it last summer. These
> >>>numbers
> >>>are part of the remote protocol. While I think the last ones are never
> >>>sent
> >>>over the wire, they could be (with the exception of TARGET_SIGNAL_LAST
> >>>which
> >>>is -not- part of the protocol, as I understand it). Having them jump
> >>>around
> >>>is bad.
> >
> >>
> >>Wasn't this enum going to be moved to signals.h?
> >
> >
> >I think so, but I didn't see any pressing reason to. If you want, I
> >can do that.
> >
> >OK otherwise?
>
> I'd leave it until after things branch and then fix it properly in the
> trunk.
Now that we've got a "gdb/signals.h", there's a place to fix this
properly in the trunk. How does this patch look?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
2002-03-10 Daniel Jacobowitz <drow@mvista.com>
* signals.h: Update comments.
(enum target_signal): Remove conditional compilation around
Mach-specific signals.
Index: signals.h
===================================================================
RCS file: /cvs/src/src/include/gdb/signals.h,v
retrieving revision 1.1
diff -u -p -r1.1 signals.h
--- signals.h 2002/03/11 00:01:11 1.1
+++ signals.h 2002/03/11 00:20:15
@@ -32,7 +32,8 @@
Since these numbers have actually made it out into other software
(stubs, etc.), you mustn't disturb the assigned numbering. If you
need to add new signals here, add them to the end of the explicitly
- numbered signals.
+ numbered signals, at the comment marker. Add them unconditionally,
+ not within any #if or #ifdef.
This is based strongly on Unix/POSIX signals for several reasons:
(1) This set of signals represents a widely-accepted attempt to
@@ -208,7 +209,6 @@ enum target_signal
TARGET_SIGNAL_REALTIME_126,
TARGET_SIGNAL_REALTIME_127,
-#if defined(MACH) || defined(__MACH__)
/* Mach exceptions */
TARGET_EXC_BAD_ACCESS,
TARGET_EXC_BAD_INSTRUCTION,
@@ -216,7 +216,7 @@ enum target_signal
TARGET_EXC_EMULATION,
TARGET_EXC_SOFTWARE,
TARGET_EXC_BREAKPOINT,
-#endif
+
TARGET_SIGNAL_INFO,
/* Some signal we don't know about. */
@@ -225,6 +225,8 @@ enum target_signal
/* Use whatever signal we use when one is not specifically specified
(for passing to proceed and so on). */
TARGET_SIGNAL_DEFAULT,
+
+ /* If you are adding a new signal, add it just above this comment. */
/* Last and unused enum value, for sizing arrays, etc. */
TARGET_SIGNAL_LAST