llvm/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cpp

//===-- sanitizer_stacktrace.cpp ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is shared between AddressSanitizer and ThreadSanitizer
// run-time libraries.
//===----------------------------------------------------------------------===//

#include "sanitizer_stacktrace.h"

#include "sanitizer_common.h"
#include "sanitizer_flags.h"
#include "sanitizer_platform.h"
#include "sanitizer_ptrauth.h"

namespace __sanitizer {

uptr StackTrace::GetNextInstructionPc(uptr pc) {}

uptr StackTrace::GetCurrentPc() {}

void BufferedStackTrace::Init(const uptr *pcs, uptr cnt, uptr extra_top_pc) {}

// Sparc implementation is in its own file.
#if !defined(__sparc__)

// In GCC on ARM bp points to saved lr, not fp, so we should check the next
// cell in stack to be a saved frame pointer. GetCanonicFrame returns the
// pointer to saved frame pointer in any case.
static inline uhwptr *GetCanonicFrame(uptr bp,
                                      uptr stack_top,
                                      uptr stack_bottom) {}

void BufferedStackTrace::UnwindFast(uptr pc, uptr bp, uptr stack_top,
                                    uptr stack_bottom, u32 max_depth) {}

#endif  // !defined(__sparc__)

void BufferedStackTrace::PopStackFrames(uptr count) {}

static uptr Distance(uptr a, uptr b) {}

uptr BufferedStackTrace::LocatePcInTrace(uptr pc) {}

}  // namespace __sanitizer