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

Unified Diff: base/debug/stack_trace.h

Issue 1996243002: Workaround ARM tracing issues for non-component builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/BUILD.gn ('k') | base/debug/stack_trace.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/stack_trace.h
diff --git a/base/debug/stack_trace.h b/base/debug/stack_trace.h
index 23e7b5164b63472409a92e992c5c1095dfa48d26..44c712f2aa934e1de66eb3e29ce5586a56613a5a 100644
--- a/base/debug/stack_trace.h
+++ b/base/debug/stack_trace.h
@@ -24,7 +24,17 @@ struct _CONTEXT;
#if defined(OS_POSIX) && ( \
defined(__i386__) || defined(__x86_64__) || \
- (defined(__arm__) && !defined(__thumb__)))
+ (defined(__arm__) && ( \
+ /* We don't normally support thumb mode... */ \
+ !defined(__thumb__) || \
+ /* ...unless we're building non-component build with Clang. \
+ Clang properly sets up fp register, so we can walk stack frames, \
+ but it pushes arbitrary number of registers between fp (r7) and \
+ lr (r14). However in non-component build, where all code is \
+ inside a single mapped region, it's possible to guess lr by \
+ probing up to 7 locations on the stack. */ \
+ (defined(__clang__) && !defined(COMPONENT_BUILD) && \
+ defined(OS_ANDROID)))))
#define HAVE_TRACE_STACK_FRAME_POINTERS 1
#else
#define HAVE_TRACE_STACK_FRAME_POINTERS 0
« no previous file with comments | « base/BUILD.gn ('k') | base/debug/stack_trace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698