Bug 1753272 - On macOS, always enable frame pointer stack walking, even in builds which may not have frame pointers. r=gerald

Differential Revision: https://phabricator.services.mozilla.com/D137677
This commit is contained in:
Markus Stange 2022-02-03 16:31:05 +00:00
parent 698d981290
commit 740759c4ef
2 changed files with 10 additions and 8 deletions

View File

@ -92,10 +92,11 @@
# define USE_MOZ_STACK_WALK
#endif
// Mac builds only have frame pointers when MOZ_PROFILING is specified, so
// FramePointerStackWalk() only works in that case. We don't use MozStackWalk()
// on Mac.
#if defined(GP_OS_darwin) && defined(MOZ_PROFILING)
// Mac builds use FramePointerStackWalk(). Even if we build without
// frame pointers, we'll still get useful stacks in system libraries
// because those always have frame pointers.
// We don't use MozStackWalk() on Mac.
#if defined(GP_OS_darwin)
# define HAVE_NATIVE_UNWIND
# define USE_FRAME_POINTER_STACK_WALK
#endif

View File

@ -126,10 +126,11 @@
# define USE_MOZ_STACK_WALK
#endif
// Mac builds only have frame pointers when MOZ_PROFILING is specified, so
// FramePointerStackWalk() only works in that case. We don't use MozStackWalk()
// on Mac.
#if defined(GP_OS_darwin) && defined(MOZ_PROFILING)
// Mac builds use FramePointerStackWalk(). Even if we build without
// frame pointers, we'll still get useful stacks in system libraries
// because those always have frame pointers.
// We don't use MozStackWalk() on Mac.
#if defined(GP_OS_darwin)
# define HAVE_NATIVE_UNWIND
# define USE_FRAME_POINTER_STACK_WALK
#endif