Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Unified Diff: base/debug/stack_trace.cc

Issue 2782063005: Explicitly specify whether to emit frame pointers by default. (Closed)
Patch Set: arm64 -> arm Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/stack_trace.h ('k') | base/debug/stack_trace_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/stack_trace.cc
diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc
index 43a23d95ac10ba0ca270a654cf1525a59b55ab58..ede8bd4e1d44812085267b32766c0b70d4e2dc29 100644
--- a/base/debug/stack_trace.cc
+++ b/base/debug/stack_trace.cc
@@ -12,7 +12,7 @@
#include "base/logging.h"
#include "base/macros.h"
-#if HAVE_TRACE_STACK_FRAME_POINTERS
+#if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
#if defined(OS_LINUX) || defined(OS_ANDROID)
#include <pthread.h>
@@ -28,14 +28,14 @@
extern "C" void* __libc_stack_end;
#endif
-#endif // HAVE_TRACE_STACK_FRAME_POINTERS
+#endif // BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
namespace base {
namespace debug {
namespace {
-#if HAVE_TRACE_STACK_FRAME_POINTERS && !defined(OS_WIN)
+#if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS) && !defined(OS_WIN)
#if defined(__arm__) && defined(__GNUC__) && !defined(__clang__)
// GCC and LLVM generate slightly different frames on ARM, see
@@ -142,11 +142,11 @@ void* LinkStackFrames(void* fpp, void* parent_fp) {
return prev_parent_fp;
}
-#endif // HAVE_TRACE_STACK_FRAME_POINTERS && !defined(OS_WIN)
+#endif // BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS) && !defined(OS_WIN)
} // namespace
-#if HAVE_TRACE_STACK_FRAME_POINTERS
+#if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
uintptr_t GetStackEnd() {
#if defined(OS_ANDROID)
// Bionic reads proc/maps on every call to pthread_getattr_np() when called
@@ -194,7 +194,7 @@ uintptr_t GetStackEnd() {
// Don't know how to get end of the stack.
return 0;
}
-#endif // HAVE_TRACE_STACK_FRAME_POINTERS
+#endif // BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
StackTrace::StackTrace() : StackTrace(arraysize(trace_)) {}
@@ -220,7 +220,7 @@ std::string StackTrace::ToString() const {
return stream.str();
}
-#if HAVE_TRACE_STACK_FRAME_POINTERS
+#if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
size_t TraceStackFramePointers(const void** out_trace,
size_t max_depth,
@@ -286,7 +286,7 @@ ScopedStackFrameLinker::~ScopedStackFrameLinker() {
}
#endif // !defined(OS_WIN)
-#endif // HAVE_TRACE_STACK_FRAME_POINTERS
+#endif // BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
} // namespace debug
} // namespace base
« no previous file with comments | « base/debug/stack_trace.h ('k') | base/debug/stack_trace_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698