libbacktrace: support fetching executable name using sysctl
authorIan Lance Taylor <iant@golang.org>
Sat, 15 Feb 2020 23:29:02 +0000 (15:29 -0800)
committerIan Lance Taylor <iant@golang.org>
Sat, 9 May 2020 22:20:13 +0000 (15:20 -0700)
commit261356844a6cb3404f2627a58302f296fb6bebb2
tree84dbfe1a8086ad45ee32fabca2ca1212b6050b85
parent925b418e065a9d94bd2c0d87fbfc93b573a309af
libbacktrace: support fetching executable name using sysctl

This supports FreeBSD and NetBSD when /proc is not mounted.

libbacktrace/
* fileline.c (sysctl_exec_name): New static function.
(sysctl_exec_name1): New macro or static function.
(sysctl_exec_name2): Likewise.
(fileline_initialize): Try sysctl_exec_name[12].
* configure.ac: Check for sysctl args to fetch executable name.
* configure: Regenerate.
* config.h.in: Regenerate.
libbacktrace/ChangeLog
libbacktrace/config.h.in
libbacktrace/configure
libbacktrace/configure.ac
libbacktrace/fileline.c