Remove varobj_language_string, languages and varobj_languages
[deliverable/binutils-gdb.git] / gdb / darwin-nat.c
index cbf1f787b426d3f1f384c9bab39ab34f51b32631..6995c2565f56d3dc7f8015c6b6358e7f50597b71 100644 (file)
@@ -48,7 +48,6 @@
 #include <signal.h>
 #include <string.h>
 #include <ctype.h>
-#include <sys/param.h>
 #include <sys/sysctl.h>
 #include <sys/proc.h>
 #include <libproc.h>
@@ -898,16 +897,16 @@ darwin_decode_message (mach_msg_header_t *hdr,
       switch (thread->event.ex_type)
        {
        case EXC_BAD_ACCESS:
-         status->value.sig = TARGET_EXC_BAD_ACCESS;
+         status->value.sig = GDB_EXC_BAD_ACCESS;
          break;
        case EXC_BAD_INSTRUCTION:
-         status->value.sig = TARGET_EXC_BAD_INSTRUCTION;
+         status->value.sig = GDB_EXC_BAD_INSTRUCTION;
          break;
        case EXC_ARITHMETIC:
-         status->value.sig = TARGET_EXC_ARITHMETIC;
+         status->value.sig = GDB_EXC_ARITHMETIC;
          break;
        case EXC_EMULATION:
-         status->value.sig = TARGET_EXC_EMULATION;
+         status->value.sig = GDB_EXC_EMULATION;
          break;
        case EXC_SOFTWARE:
          if (thread->event.ex_data[0] == EXC_SOFT_SIGNAL)
@@ -929,11 +928,11 @@ darwin_decode_message (mach_msg_header_t *hdr,
                }
            }
          else
-           status->value.sig = TARGET_EXC_SOFTWARE;
+           status->value.sig = GDB_EXC_SOFTWARE;
          break;
        case EXC_BREAKPOINT:
          /* Many internal GDB routines expect breakpoints to be reported
-            as GDB_SIGNAL_TRAP, and will report TARGET_EXC_BREAKPOINT
+            as GDB_SIGNAL_TRAP, and will report GDB_EXC_BREAKPOINT
             as a spurious signal.  */
          status->value.sig = GDB_SIGNAL_TRAP;
          break;
@@ -1918,26 +1917,6 @@ darwin_read_dyld_info (task_t task, CORE_ADDR addr, gdb_byte *rdaddr,
 #endif
 
 \f
-/* Return 0 on failure, number of bytes handled otherwise.  TARGET
-   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)
-{
-  struct inferior *inf = current_inferior ();
-  task_t task = inf->private->task;
-
-  if (task == MACH_PORT_NULL)
-    return 0;
-
-  inferior_debug (8, _("darwin_xfer_memory(%s, %d, %c)\n"),
-                 core_addr_to_string (memaddr), len, write ? 'w' : 'r');
-
-  if (write)
-    return darwin_read_write_inferior (task, memaddr, NULL, myaddr, len);
-  else
-    return darwin_read_write_inferior (task, memaddr, myaddr, NULL, len);
-}
 
 static LONGEST
 darwin_xfer_partial (struct target_ops *ops,
@@ -2002,10 +1981,10 @@ darwin_pid_to_exec_file (int pid)
   char *path;
   int res;
 
-  path = xmalloc (MAXPATHLEN);
+  path = xmalloc (PATH_MAX);
   make_cleanup (xfree, path);
 
-  res = proc_pidinfo (pid, PROC_PIDPATHINFO, 0, path, MAXPATHLEN);
+  res = proc_pidinfo (pid, PROC_PIDPATHINFO, 0, path, PATH_MAX);
   if (res >= 0)
     return path;
   else
@@ -2124,7 +2103,6 @@ _initialize_darwin_inferior (void)
   darwin_ops->to_pid_to_str = darwin_pid_to_str;
   darwin_ops->to_pid_to_exec_file = darwin_pid_to_exec_file;
   darwin_ops->to_load = NULL;
-  darwin_ops->deprecated_xfer_memory = darwin_xfer_memory;
   darwin_ops->to_xfer_partial = darwin_xfer_partial;
   darwin_ops->to_supports_multi_process = darwin_supports_multi_process;
   darwin_ops->to_get_ada_task_ptid = darwin_get_ada_task_ptid;
This page took 0.029791 seconds and 4 git commands to generate.