HomePhabricator

FreeBSD: attach to pid from different cwd

Authored by emaste on Sep 2 2017, 6:41 PM.

Description

FreeBSD: attach to pid from different cwd

attach by pid worked when running from the directory from which the
target was launched, but failed from a different directory. Use the
kern.proc.pathname sysctl to locate the target, falling back to the
original case of the target's argv[0] if that fails. Based on a patch
from Vignesh Balu.

Differential Revision: https://reviews.llvm.org/D32271

llvm-svn: 312430