sanitizer_symbolizer_mac.h [plain text]
#ifndef SANITIZER_SYMBOLIZER_MAC_H
#define SANITIZER_SYMBOLIZER_MAC_H
#include "sanitizer_platform.h"
#if SANITIZER_MAC
#include "sanitizer_allocator_internal.h"
#include "sanitizer_common.h"
#include "sanitizer_symbolizer.h"
#include <unistd.h>
#include <util.h>
#include <sys/errno.h>
namespace __sanitizer {
class AtosSymbolizer : public ExternalSymbolizerInterface {
public:
explicit AtosSymbolizer(const char *atos_path) : atos_path_(atos_path) {}
void ParseSymbolizedStackFrames(const char *str, SymbolizedStack *res);
char *SendCommand(uptr addr, bool is_data, const char *module_name,
uptr module_offset);
private:
bool StartSubprocessIfNotStarted();
const char *atos_path_;
int fd_to_child_ = 0;
static const uptr kBufferSize = 16 * 1024;
char buffer_[kBufferSize];
bool forkfailed_ = false;
};
}
#endif // SANITIZER_MAC
#endif // SANITIZER_SYMBOLIZER_MAC_H