#include "sanitizer_common.h"
#include "sanitizer_placement_new.h"
#include "sanitizer_stacktrace.h"
#include "sanitizer_stacktrace_printer.h"
#include "sanitizer_symbolizer.h"
namespace __sanitizer {
namespace {
class StackTraceTextPrinter { … };
static void CopyStringToBuffer(const InternalScopedString &str, char *out_buf,
uptr out_buf_size) { … }
}
void StackTrace::PrintTo(InternalScopedString *output) const { … }
uptr StackTrace::PrintTo(char *out_buf, uptr out_buf_size) const { … }
void StackTrace::Print() const { … }
void BufferedStackTrace::Unwind(u32 max_depth, uptr pc, uptr bp, void *context,
uptr stack_top, uptr stack_bottom,
bool request_fast_unwind) { … }
int GetModuleAndOffsetForPc(uptr pc, char *module_name, uptr module_name_len,
uptr *pc_offset) { … }
}
usingnamespace__sanitizer;
extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE
void __sanitizer_symbolize_pc(uptr pc, const char *fmt, char *out_buf,
uptr out_buf_size) { … }
SANITIZER_INTERFACE_ATTRIBUTE
void __sanitizer_symbolize_global(uptr data_addr, const char *fmt,
char *out_buf, uptr out_buf_size) { … }
SANITIZER_INTERFACE_ATTRIBUTE
int __sanitizer_get_module_and_offset_for_pc(void *pc, char *module_name,
uptr module_name_len,
void **pc_offset) { … }
}