* ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
[deliverable/binutils-gdb.git] / gdb / gnu-nat.c
index cceef39fac7e9446cf10c690b696728593afa4a3..3ec33520fbe013b72fd138d91e5073c94ceedf94 100644 (file)
@@ -1,5 +1,6 @@
 /* Interface GDB to the GNU Hurd.
-   Copyright (C) 1992, 95, 96, 97, 1999, 2000 Free Software Foundation, Inc.
+   Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +24,6 @@
    Boston, MA 02111-1307, USA.
  */
 
-#include <assert.h>
 #include <errno.h>
 #include <limits.h>
 #include <setjmp.h>
@@ -60,6 +60,7 @@
 #include "gdbcmd.h"
 #include "gdbcore.h"
 #include "gdbthread.h"
+#include "gdb_assert.h"
 
 #include "gnu-nat.h"
 
@@ -261,7 +262,7 @@ proc_update_sc (struct proc *proc)
   if (proc->sc == 0 && proc->state_changed)
     /* Since PROC may start running, we must write back any state changes. */
     {
-      assert (proc_is_thread (proc));
+      gdb_assert (proc_is_thread (proc));
       proc_debug (proc, "storing back changed thread state");
       err = thread_set_state (proc->port, THREAD_STATE_FLAVOR,
                         (thread_state_t) &proc->state, THREAD_STATE_SIZE);
@@ -317,7 +318,7 @@ proc_update_sc (struct proc *proc)
 void
 proc_abort (struct proc *proc, int force)
 {
-  assert (proc_is_thread (proc));
+  gdb_assert (proc_is_thread (proc));
 
   if (!proc->aborted)
     {
@@ -538,7 +539,7 @@ make_proc (struct inf *inf, mach_port_t port, int tid)
 {
   error_t err;
   mach_port_t prev_port = MACH_PORT_NULL;
-  struct proc *proc = malloc (sizeof (struct proc));
+  struct proc *proc = xmalloc (sizeof (struct proc));
 
   proc->port = port;
   proc->tid = tid;
@@ -635,10 +636,7 @@ _proc_free (struct proc *proc)
 struct inf *
 make_inf (void)
 {
-  struct inf *inf = malloc (sizeof (struct inf));
-
-  if (!inf)
-    return 0;
+  struct inf *inf = xmalloc (sizeof (struct inf));
 
   inf->task = 0;
   inf->threads = 0;
@@ -1156,7 +1154,7 @@ inf_suspend (struct inf *inf)
 void
 inf_set_step_thread (struct inf *inf, struct proc *thread)
 {
-  assert (!thread || proc_is_thread (thread));
+  gdb_assert (!thread || proc_is_thread (thread));
 
   if (thread)
     inf_debug (inf, "setting step thread: %d/%d", inf->pid, thread->tid);
@@ -1428,7 +1426,7 @@ gnu_wait (int tid, struct target_waitstatus *status)
   extern int notify_server (mach_msg_header_t *, mach_msg_header_t *);
   extern int process_reply_server (mach_msg_header_t *, mach_msg_header_t *);
 
-  assert (inf->task);
+  gdb_assert (inf->task);
 
   if (!inf->threads && !inf->pending_execs)
     /* No threads!  Assume that maybe some outside agency is frobbing our
@@ -1668,7 +1666,7 @@ S_exception_raise_request (mach_port_t port, mach_port_t reply_port,
              inf_debug (waiting_inf, "Handler is task exception port <%d>",
                         inf->task->saved_exc_port);
              inf->wait.exc.handler = inf->task->saved_exc_port;
-             assert (inf->task->exc_port == port);
+             gdb_assert (inf->task->exc_port == port);
            }
          if (inf->wait.exc.handler != MACH_PORT_NULL)
            /* Add a reference to the exception handler. */
@@ -2194,7 +2192,7 @@ gnu_detach (char *args, int from_tty)
 static void
 gnu_terminal_init_inferior (void)
 {
-  assert (current_inferior);
+  gdb_assert (current_inferior);
   terminal_init_inferior_with_pgrp (current_inferior->pid);
 }
 
@@ -2446,6 +2444,7 @@ out:
    is ignored. */
 static int
 gnu_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+                struct mem_attrib *attrib,
                 struct target_ops *target)
 {
   task_t task = (current_inferior
This page took 0.025175 seconds and 4 git commands to generate.