Index: compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.h =================================================================== --- compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.h +++ compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.h @@ -25,6 +25,9 @@ extern uptr MainThreadStackBase, MainThreadStackSize; extern sanitizer_shadow_bounds_t ShadowBounds; +// One frame in a backtrace (printed on a line by itself). +constexpr const char *kFormatBacktraceFrame = "{{{bt:%u:%p}}}"; + } // namespace __sanitizer #endif // SANITIZER_FUCHSIA Index: compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc =================================================================== --- compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc +++ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc @@ -13,9 +13,13 @@ //===----------------------------------------------------------------------===// #include "sanitizer_platform.h" -#if SANITIZER_FUCHSIA +#if SANITIZER_FUCHSIA || SANITIZER_RTEMS +#if SANITIZER_FUCHSIA #include "sanitizer_fuchsia.h" +#elif SANITIZER_RTEMS +#include "sanitizer_rtems.h" +#endif #include "sanitizer_stacktrace.h" #include "sanitizer_symbolizer.h" @@ -43,9 +47,6 @@ // Global variable name or equivalent from data memory address. constexpr const char *kFormatData = "{{{data:%p}}}"; -// One frame in a backtrace (printed on a line by itself). -constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; - // This is used by UBSan for type names, and by ASan for global variable names. // It's expected to return a static buffer that will be reused on each call. const char *Symbolizer::Demangle(const char *name) { @@ -97,7 +98,7 @@ void RenderFrame(InternalScopedString *buffer, const char *format, int frame_no, const AddressInfo &info, bool vs_style, const char *strip_path_prefix, const char *strip_func_prefix) { - buffer->append(kFormatFrame, frame_no, info.address); + buffer->append(kFormatBacktraceFrame, frame_no, info.address); } Symbolizer *Symbolizer::PlatformInit() { @@ -111,6 +112,7 @@ UnwindSignalStackCallbackType unwind, const void *unwind_context) {} +#if !SANITIZER_RTEMS struct UnwindTraceArg { BufferedStackTrace *stack; u32 max_depth; @@ -146,6 +148,7 @@ CHECK_NE(context, nullptr); UNREACHABLE("signal context doesn't exist"); } +#endif // !SANITIZER_RTEMS } // namespace __sanitizer