Closed GoogleCodeExporter closed 9 years ago
Code is here: https://github.com/alk/gperftools/tree/wip-selectable-backtracing
Original comment by alkondratenko
on 9 Feb 2014 at 2:43
Hi, thanks for the path. It does look good, you just forgot the adds guards for
the case systme does not have libunwind-dev installed. With this following
patch, it builds in the aforementioned case:
diff --git a/src/stacktrace.cc b/src/stacktrace.cc
index 327711e..98da963 100644
--- a/src/stacktrace.cc
+++ b/src/stacktrace.cc
@@ -90,12 +90,14 @@ struct GetStackImplementation {
#define HAVE_GST_generic
#endif
+#ifdef HAVE_LIBUNWIND_H
#define STACKTRACE_INL_HEADER "stacktrace_libunwind-inl.h"
#define GST_SUFFIX libunwind
#include "stacktrace_impl_setup-inl.h"
#undef GST_SUFFIX
#undef STACKTRACE_INL_HEADER
#define HAVE_GST_libunwind
+#endif
#if defined(__i386__) || defined(__x86_64__)
#define STACKTRACE_INL_HEADER "stacktrace_x86-inl.h"
Original comment by zatr...@gmail.com
on 10 Feb 2014 at 4:33
merged updated patch. Thanks for feedback.
Original comment by alkondratenko
on 17 Feb 2014 at 4:02
Original issue reported on code.google.com by
alkondratenko
on 9 Feb 2014 at 1:56