[Lldb-commits] [PATCH] Use the right type for pid_t on FreeBSD

Davide Italiano davide at freebsd.org
Fri Mar 20 13:28:01 PDT 2015


Hi emaste,

pid_t is int32_t on FreeBSD, not uint64_t.  I think it's better committing a small sin her rather than changing it globally.

http://reviews.llvm.org/D8491

Files:
  ProcessMonitor.cpp

Index: ProcessMonitor.cpp
===================================================================
--- ProcessMonitor.cpp
+++ ProcessMonitor.cpp
@@ -964,8 +964,13 @@
     lldb_utility::PseudoTerminal terminal;
     const size_t err_len = 1024;
     char err_str[err_len];
-    lldb::pid_t pid;

+    // XXX: This should be ideally lldb::pid_t but
+    // currently lldb defines pid_t as unsigned 64-bit
+    // everywhere, while FreeBSD defines the type as
+    // signed 32-bits.
+    int32_t pid;
+
     // Propagate the environment if one is not supplied.
     if (envp == NULL || envp[0] == NULL)
         envp = const_cast<const char **>(environ);

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8491.22372.patch
Type: text/x-patch
Size: 648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150320/3b066044/attachment.bin>


More information about the lldb-commits mailing list