#include "snapshot/crashpad_types/crashpad_info_reader.h"
#include <sys/types.h>
#include <memory>
#include "build/build_config.h"
#include "client/annotation_list.h"
#include "client/crashpad_info.h"
#include "client/simple_address_range_bag.h"
#include "client/simple_string_dictionary.h"
#include "gtest/gtest.h"
#include "test/multiprocess_exec.h"
#include "test/process_type.h"
#include "util/file/file_io.h"
#include "util/misc/from_pointer_cast.h"
#include "util/process/process_memory_native.h"
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#include "test/linux/fake_ptrace_connection.h"
#endif
namespace crashpad {
namespace test {
namespace {
constexpr TriState kCrashpadHandlerBehavior = …;
constexpr TriState kSystemCrashReporterForwarding = …;
constexpr TriState kGatherIndirectlyReferencedMemory = …;
constexpr uint32_t kIndirectlyReferencedMemoryCap = …;
class ScopedUnsetCrashpadInfo { … };
class CrashpadInfoTestDataSetup { … };
void ExpectCrashpadInfo(ProcessType process,
bool is_64_bit,
VMAddress info_address,
VMAddress extra_memory_address,
VMAddress simple_annotations_address,
VMAddress annotations_list_address) { … }
TEST(CrashpadInfoReader, ReadFromSelf) { … }
CRASHPAD_CHILD_TEST_MAIN(ReadFromChildTestMain) { … }
class ReadFromChildTest : public MultiprocessExec { … };
TEST(CrashpadInfoReader, ReadFromChild) { … }
}
}
}