add xfail for "print u_var" test in gdb.ada/packed_array.exp
[deliverable/binutils-gdb.git] / gdb / darwin-nat.c
index 535720df17264d731e4d6a31caaa242ca124529e..b345aac5915ef7794af363c6188ef70aa3f07077 100644 (file)
@@ -1,5 +1,5 @@
 /* Darwin support for GDB, the GNU debugger.
-   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    Contributed by AdaCore.
 
@@ -129,7 +129,7 @@ mach_port_t darwin_ex_port;
 /* Port set.  */
 mach_port_t darwin_port_set;
 
-/* Page size. */
+/* Page size.  */
 static vm_size_t mach_page_size;
 
 /* If Set, catch all mach exceptions (before they are converted to signals
@@ -363,7 +363,7 @@ darwin_check_new_threads (struct inferior *inf)
          old_ix++;
          continue;
        }
-      gdb_assert (0);
+      gdb_assert_not_reached ("unexpected thread case");
     }
 
   if (darwin_inf->threads)
@@ -914,7 +914,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
        case EXC_BREAKPOINT:
          /* Many internal GDB routines expect breakpoints to be reported
             as TARGET_SIGNAL_TRAP, and will report TARGET_EXC_BREAKPOINT
-            as a spurious signal. */
+            as a spurious signal.  */
          status->value.sig = TARGET_SIGNAL_TRAP;
          break;
        default:
@@ -980,7 +980,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
 static int
 cancel_breakpoint (ptid_t ptid)
 {
-  /* Arrange for a breakpoint to be hit again later. We will handle
+  /* Arrange for a breakpoint to be hit again later.  We will handle
      the current event, eventually we will resume this thread, and this
      breakpoint will trap again.
 
@@ -1514,12 +1514,9 @@ darwin_attach (struct target_ops *ops, char *args, int from_tty)
   struct inferior *inf;
   kern_return_t kret;
 
-  if (!args)
-    error_no_arg (_("process-id to attach"));
+  pid = parse_pid_to_attach (args);
 
-  pid = atoi (args);
-
-  if (pid == getpid ())                /* Trying to masturbate? */
+  if (pid == getpid ())                /* Trying to masturbate?  */
     error (_("I refuse to debug myself!"));
 
   if (from_tty)
@@ -1658,7 +1655,7 @@ darwin_read_write_inferior (task_t task, CORE_ADDR addr,
   inferior_debug (8, _("darwin_read_write_inferior(task=%x, %s, len=%d)\n"),
                  task, core_addr_to_string (addr), length);
 
-  /* Get memory from inferior with page aligned addresses */
+  /* Get memory from inferior with page aligned addresses */
   kret = mach_vm_read (task, low_address, aligned_length,
                      &copied, &copy_count);
   if (kret != KERN_SUCCESS)
@@ -1710,10 +1707,10 @@ darwin_read_write_inferior (task_t task, CORE_ADDR addr,
         core_addr_to_string (region_start),
         core_addr_to_string (region_length));
 
-      /* Check for holes in memory */
+      /* Check for holes in memory */
       if (region_start > region_address)
        {
-         warning (_("No memory at %s (vs %s+0x%x). Nothing written"),
+         warning (_("No memory at %s (vs %s+0x%x).  Nothing written"),
                   core_addr_to_string (region_address),
                   core_addr_to_string (region_start),
                   (unsigned)region_length);
@@ -1771,7 +1768,7 @@ out:
 
 \f
 /* Return 0 on failure, number of bytes handled otherwise.  TARGET
-   is ignored. */
+   is ignored.  */
 static int
 darwin_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
                    struct mem_attrib *attrib, struct target_ops *target)
This page took 0.027213 seconds and 4 git commands to generate.