#include "sanitizer_platform.h"
#include "sanitizer_symbolizer_markup.h"
#if SANITIZER_POSIX
# include <dlfcn.h>
# include <errno.h>
# include <stdint.h>
# include <stdlib.h>
# include <sys/wait.h>
# include <unistd.h>
# include "sanitizer_allocator_internal.h"
# include "sanitizer_common.h"
# include "sanitizer_file.h"
# include "sanitizer_flags.h"
# include "sanitizer_internal_defs.h"
# include "sanitizer_linux.h"
# include "sanitizer_placement_new.h"
# include "sanitizer_posix.h"
# include "sanitizer_procmaps.h"
# include "sanitizer_symbolizer_internal.h"
# include "sanitizer_symbolizer_libbacktrace.h"
# include "sanitizer_symbolizer_mac.h"
namespace __cxxabiv1 {
extern "C" SANITIZER_WEAK_ATTRIBUTE
char *__cxa_demangle(const char *mangled, char *buffer,
size_t *length, int *status);
}
namespace __sanitizer {
const char *DemangleCXXABI(const char *name) { … }
swift_demangle_ft;
static swift_demangle_ft swift_demangle_f;
static void InitializeSwiftDemangler() { … }
const char *DemangleSwift(const char *name) { … }
const char *DemangleSwiftAndCXX(const char *name) { … }
static bool CreateTwoHighNumberedPipes(int *infd_, int *outfd_) { … }
bool SymbolizerProcess::StartSymbolizerSubprocess() { … }
class Addr2LineProcess final : public SymbolizerProcess { … };
const char Addr2LineProcess::output_terminator_[] = …;
bool Addr2LineProcess::ReachedEndOfOutput(const char *buffer,
uptr length) const { … }
class Addr2LinePool final : public SymbolizerTool { … };
# if SANITIZER_SUPPORTS_WEAK_HOOKS
extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE bool
__sanitizer_symbolize_code(const char *ModuleName, u64 ModuleOffset,
char *Buffer, int MaxLength);
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE bool
__sanitizer_symbolize_data(const char *ModuleName, u64 ModuleOffset,
char *Buffer, int MaxLength);
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE bool
__sanitizer_symbolize_frame(const char *ModuleName, u64 ModuleOffset,
char *Buffer, int MaxLength);
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE void
__sanitizer_symbolize_flush();
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE bool
__sanitizer_symbolize_demangle(const char *Name, char *Buffer, int MaxLength);
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE bool
__sanitizer_symbolize_set_demangle(bool Demangle);
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE bool
__sanitizer_symbolize_set_inline_frames(bool InlineFrames);
}
class InternalSymbolizer final : public SymbolizerTool { … };
# else
class InternalSymbolizer final : public SymbolizerTool {
public:
static InternalSymbolizer *get(LowLevelAllocator *alloc) { return 0; }
};
# endif
const char *Symbolizer::PlatformDemangle(const char *name) { … }
static SymbolizerTool *ChooseExternalSymbolizer(LowLevelAllocator *allocator) { … }
static void ChooseSymbolizerTools(IntrusiveList<SymbolizerTool> *list,
LowLevelAllocator *allocator) { … }
Symbolizer *Symbolizer::PlatformInit() { … }
void Symbolizer::LateInitialize() { … }
}
#endif