forked from OSchip/llvm-project
[nolibc] Move symbolizer to RTSanitizerCommonLibc, and make it optional using a weak symbol.
llvm-svn: 182372
This commit is contained in:
parent
fad029202f
commit
c787d42f40
|
@ -13,9 +13,7 @@ set(SANITIZER_SOURCES
|
|||
sanitizer_printf.cc
|
||||
sanitizer_stackdepot.cc
|
||||
sanitizer_stacktrace.cc
|
||||
sanitizer_symbolizer.cc
|
||||
sanitizer_symbolizer_itanium.cc
|
||||
sanitizer_symbolizer_linux.cc
|
||||
sanitizer_symbolizer_mac.cc
|
||||
sanitizer_symbolizer_win.cc
|
||||
sanitizer_thread_registry.cc
|
||||
|
@ -27,6 +25,8 @@ set(SANITIZER_LIBCDEP_SOURCES
|
|||
sanitizer_linux_libcdep.cc
|
||||
sanitizer_posix_libcdep.cc
|
||||
sanitizer_stoptheworld_linux_libcdep.cc
|
||||
sanitizer_symbolizer_libcdep.cc
|
||||
sanitizer_symbolizer_linux_libcdep.cc
|
||||
)
|
||||
|
||||
# Explicitly list all sanitizer_common headers. Not all of these are
|
||||
|
|
|
@ -85,7 +85,7 @@ void StackTrace::PrintStack(const uptr *addr, uptr size,
|
|||
frame_num++;
|
||||
}
|
||||
}
|
||||
if (symbolize && addr_frames_num == 0) {
|
||||
if (symbolize && addr_frames_num == 0 && SymbolizeCode) {
|
||||
// Use our own (online) symbolizer, if necessary.
|
||||
addr_frames_num = SymbolizeCode(pc, addr_frames.data(),
|
||||
addr_frames.size());
|
||||
|
|
|
@ -66,7 +66,8 @@ struct DataInfo {
|
|||
// for a given address (in all inlined functions). Returns the number
|
||||
// of descriptions actually filled.
|
||||
// This function should NOT be called from two threads simultaneously.
|
||||
uptr SymbolizeCode(uptr address, AddressInfo *frames, uptr max_frames);
|
||||
uptr SymbolizeCode(uptr address, AddressInfo *frames, uptr max_frames)
|
||||
SANITIZER_WEAK_ATTRIBUTE;
|
||||
bool SymbolizeData(uptr address, DataInfo *info);
|
||||
|
||||
bool IsSymbolizerAvailable();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//===-- sanitizer_symbolizer.cc -------------------------------------------===//
|
||||
//===-- sanitizer_symbolizer_libcdep.cc -----------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
|
@ -1,4 +1,4 @@
|
|||
//===-- sanitizer_symbolizer_linux.cc -------------------------------------===//
|
||||
//===-- sanitizer_symbolizer_linux_libcdep.cc -----------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
Loading…
Reference in New Issue