Regenerate or1k opcodes file
[deliverable/binutils-gdb.git] / gdb / fbsd-nat.c
index d2ec5274abdc0742056f3cef3308dd71295d1184..bdf078e6cc2e915dde1bedc950a02d370a42d7e4 100644 (file)
 static char *
 fbsd_pid_to_exec_file (struct target_ops *self, int pid)
 {
-  ssize_t len = PATH_MAX;
+  ssize_t len;
   static char buf[PATH_MAX];
   char name[PATH_MAX];
 
 #ifdef KERN_PROC_PATHNAME
+  size_t buflen;
   int mib[4];
 
   mib[0] = CTL_KERN;
   mib[1] = KERN_PROC;
   mib[2] = KERN_PROC_PATHNAME;
   mib[3] = pid;
-  if (sysctl (mib, 4, buf, &len, NULL, 0) == 0)
+  buflen = sizeof buf;
+  if (sysctl (mib, 4, buf, &buflen, NULL, 0) == 0)
     return buf;
 #endif
 
@@ -301,7 +303,7 @@ fbsd_pid_to_str (struct target_ops *ops, ptid_t ptid)
       static char buf[64];
       int pid = ptid_get_pid (ptid);
 
-      xsnprintf (buf, sizeof buf, "process %d, LWP %d", pid, lwp);
+      xsnprintf (buf, sizeof buf, "LWP %d of process %d", lwp, pid);
       return buf;
     }
 
This page took 0.02364 seconds and 4 git commands to generate.