While using lldb we found the small bug with attaching to the running process.
"attach" works fine when we run the lldb on the same dir where we ran the executable but not if the dir changes.
cd lldb_temp/
./test &
[2] 39044
cd ../
/b/vignesh/lldb_daily_build/20170419_bkup/binaries/bin/lldb
(lldb) attach 39044
error: attach failed: unable to find executable for './test'
I see the lldb using the relative path instead of absolute path of the exe.
Modified the way sysctl gets the exe name to get the absolute path.