[lldb-dev] Is there a reason pid_t/tid_t are defined to be uint64_t?

Greg Clayton clayborg at gmail.com
Fri Feb 27 15:30:06 PST 2015


lldb::pid_t is for any pid from any platform. ::pid_t should be used if you plan to actually call something from the local system, so you might need to "static_cast<::pid_t>(pid)" when making sys calls. Everything inside LLDB itself that is host host specific code should be dealing in lldb::pid_t and lldb::tid_t and when you enter code that _is_ platform specific, like any code in lldb/Source/Host or like ProcessLinux.cpp, you will need to static cast any lldb:: types down to system types.


> On Feb 27, 2015, at 3:07 PM, Chaoren Lin <chaorenl at google.com> wrote:
> 
> Hi Greg,
> 
> The 8 byte pid_t/tid_t are causing syscalls to fail to fail on 32 bit Linux due to argument alignment. Is there a reason pid_t/tid_t are defined to be uint64_t, and not pid_t as defined in <sys/types.h>?
> 
> Thanks,
> Chaoren





More information about the lldb-dev mailing list