#include "util/linux/exception_handler_client.h"
#include <errno.h>
#include <signal.h>
#include <sys/prctl.h>
#include <sys/wait.h>
#include <unistd.h>
#include "base/check_op.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "build/build_config.h"
#include "third_party/lss/lss.h"
#include "util/file/file_io.h"
#include "util/linux/ptrace_broker.h"
#include "util/linux/socket.h"
#include "util/misc/from_pointer_cast.h"
#include "util/posix/signals.h"
#if BUILDFLAG(IS_ANDROID)
#include <android/api-level.h>
#endif
namespace crashpad {
namespace {
class ScopedSigprocmaskRestore { … };
}
ExceptionHandlerClient::ExceptionHandlerClient(int sock, bool multiple_clients)
: … { … }
ExceptionHandlerClient::~ExceptionHandlerClient() = default;
bool ExceptionHandlerClient::GetHandlerCredentials(ucred* creds) { … }
int ExceptionHandlerClient::RequestCrashDump(
const ExceptionHandlerProtocol::ClientInformation& info) { … }
int ExceptionHandlerClient::SetPtracer(pid_t pid) { … }
void ExceptionHandlerClient::SetCanSetPtracer(bool can_set_ptracer) { … }
int ExceptionHandlerClient::SignalCrashDump(
const ExceptionHandlerProtocol::ClientInformation& info,
VMAddress stack_pointer) { … }
int ExceptionHandlerClient::SendCrashDumpRequest(
const ExceptionHandlerProtocol::ClientInformation& info,
VMAddress stack_pointer) { … }
int ExceptionHandlerClient::WaitForCrashDumpComplete() { … }
}