Commit c3d43744 authored by Federico G. Schwindt's avatar Federico G. Schwindt Committed by Dridi Boukelmoune

Make unwind work under macos

parent e5238678
......@@ -612,7 +612,7 @@ pan_backtrace(struct vsb *vsb)
unw_get_reg(&cursor, UNW_REG_SP, &sp);
unw_get_proc_name(&cursor, fname, sizeof(fname), &offp);
VSB_printf(vsb, "ip=0x%lx, sp=0x%lx <%s+0x%lx>\n", (long) ip,
(long) sp, fname[0] ? fname : "<unknown>", offp);
(long) sp, fname[0] ? fname : "<unknown>", (long)offp);
}
VSB_indent(vsb, -2);
......
......@@ -341,7 +341,14 @@ AC_ARG_WITH([unwind],
[use libunwind to print stacktraces (use libexecinfo otherwise). Recommended on alpine linux. Defaults to no.])])
if test "$with_unwind" = yes; then
PKG_CHECK_MODULES([LIBUNWIND], [libunwind])
case $target in
*-*-darwin*)
# Always present but .pc is not installed
;;
*)
PKG_CHECK_MODULES([LIBUNWIND], [libunwind])
;;
esac
AC_DEFINE([WITH_UNWIND], [1],
[Define to 1 to use libunwind instead of libexecinfo])
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment