2000-02-19 Philippe De Muyter <phdm@macqel.be>
[deliverable/binutils-gdb.git] / gdb / target.c
index bf465dd7cfe6c3f24749a1baa26ee08cd141e247..fa9cf88a1083a8c73d92ae0141a19f45df0ed778 100644 (file)
@@ -1,5 +1,5 @@
 /* Select target systems and architectures at runtime for GDB.
-   Copyright 1990, 1992-1995, 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1990, 1992-1995, 1998-2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
    This file is part of GDB.
@@ -30,7 +30,7 @@
 #include "bfd.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include <signal.h>
 
 extern int errno;
@@ -549,7 +549,7 @@ cleanup_target (t)
            (int (*) (int, char *, char *, int *)) 
            return_zero);
   de_fault (to_rcmd, 
-           (void (*) (char *, struct gdb_file *)) 
+           (void (*) (char *, struct ui_file *)) 
            tcomplain);
   de_fault (to_enable_exception_callback, 
            (struct symtab_and_line * (*) (enum exception_event_kind, int)) 
@@ -2022,8 +2022,6 @@ do_target_signal_to_host (enum target_signal oursig,
       return SIGPRIO;
 #endif
 
-    case TARGET_SIGNAL_REALTIME_32: return 32; /* by definition */ 
-
       /* Mach exceptions.  Assumes that the values for EXC_ are positive! */
 #if defined (EXC_BAD_ACCESS) && defined (_NSIG)
     case TARGET_EXC_BAD_ACCESS:
@@ -2060,11 +2058,21 @@ do_target_signal_to_host (enum target_signal oursig,
       if (oursig >= TARGET_SIGNAL_REALTIME_33
          && oursig <= TARGET_SIGNAL_REALTIME_63)
        {
+         /* This block of signals is continuous, and
+             TARGET_SIGNAL_REALTIME_33 is 33 by definition.  */
          int retsig =
-         (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + REALTIME_LO;
-         if (retsig < REALTIME_HI)
+           (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + 33;
+         if (retsig >= REALTIME_LO && retsig < REALTIME_HI)
            return retsig;
        }
+#if (REALTIME_LO < 33)
+      else if (oursig == TARGET_SIGNAL_REALTIME_32)
+       {
+         /* TARGET_SIGNAL_REALTIME_32 isn't contiguous with
+             TARGET_SIGNAL_REALTIME_33.  It is 32 by definition.  */
+         return 32;
+       }
+#endif
 #endif
       *oursig_ok = 0;
       return 0;
@@ -2892,7 +2900,7 @@ debug_to_query (type, req, resp, siz)
 
 static void
 debug_to_rcmd (char *command,
-              struct gdb_file *outbuf)
+              struct ui_file *outbuf)
 {
   debug_target.to_rcmd (command, outbuf);
   fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command);
This page took 0.024674 seconds and 4 git commands to generate.