[PATCH] Implement argv0-less getMainExecutable for FreeBSD

Ed Maste emaste at freebsd.org
Wed Oct 8 20:01:13 PDT 2014

Hi samsonov,

The llvm-symbolizer patch in D5610 needs to call getMainExecutable without argv0.

Today this works on Linux, which reads /proc/self/exe, but does not on FreeBSD and other operating systems, which determine the exe name from argv0.

On FreeBSD the exe name can be found from the kern.proc.pathname sysctl.  This probably works on other BSDs as well; others can confirm and update the #ifdefs.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5693.14622.patch
Type: text/x-patch
Size: 1336 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141009/d08ae03b/attachment.bin>

More information about the llvm-commits mailing list