#include <getopt.h>
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <chrono>
#include <condition_variable>
#include <functional>
#include <mutex>
#include <optional>
#include <random>
#include <ratio>
#include <string>
#include <string_view>
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "client/annotation.h"
#include "client/length_delimited_ring_buffer.h"
#include "client/ring_buffer_annotation.h"
#include "tools/tool_support.h"
#include "util/stdlib/string_number_conversion.h"
#include "util/synchronization/scoped_spin_guard.h"
#include "util/thread/thread.h"
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#else
#include <signal.h>
#endif
namespace crashpad {
namespace test {
namespace {
constexpr Annotation::Type kRingBufferLoadTestType = …;
std::atomic<bool> g_should_exit = …;
struct RingBufferAnnotationSnapshotParams final { … };
template <uint32_t RingBufferCapacity>
class RingBufferAnnotationSnapshot final { … };
void Usage(const base::FilePath& me) { … }
int TestMain(int argc, char** argv) { … }
}
}
}
#if BUILDFLAG(IS_POSIX)
int main(int argc, char** argv) { … }
#elif BUILDFLAG(IS_WIN)
int wmain(int argc, wchar_t* argv[]) {
return crashpad::ToolSupport::Wmain(argc, argv, crashpad::test::TestMain);
}
#endif