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

Zachary Turner zturner at google.com
Fri Mar 20 18:28:08 PDT 2015


all of the lldb:: types are 64 bit because it needs to be able to hold a
pid of any platform (if you are remote debugging for example). You need to
cast to and from ::pid_t inside your host layer
On Fri, Mar 20, 2015 at 6:24 PM Davide Italiano <davide at freebsd.org> wrote:

> Just for the records, it's uint64_t as defined in lldb_types.h. pid_t is
> int32_t at least on FreeBSD and Mac OS (didn't check Linux).  Also, clang
> complains about signed vs unsigned comparison:
>
> ../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp:973:49:
> warning: comparison of integers of different signs: 'lldb::pid_t' (aka
> 'unsigned long') and 'int' [-Wsign-compare]
>
>   if ((pid = terminal.Fork(err_str, err_len)) == -1)
>        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^  ~~
>
> so actually this change make the logic correct in case fork() fails and
> therefore returns -1 to the parent.
>
>
> http://reviews.llvm.org/D8491
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150321/cdfac271/attachment.html>


More information about the lldb-commits mailing list