mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Remove DISALLOW_* macros in crashpad
This change was partially scripted and partially done manually with vim regex + manually placing the deleted constructors. The script change looked for destructors in the public: section of a class, if that existed the deleted constructors would go before the destructor. For manual placement I looked for any constructor in the public: section of the corresponding class. If there wasn't one, then it would ideally have gone as the first entry except below enums, classes and typedefs. This may not have been perfect, but is hopefully good enough. Fingers crossed. #include "base/macros.h" is removed from files that don't use ignore_result, which is the only other thing defined in base/macros.h. Bug: chromium:1010217 Change-Id: I099526255a40b1ac1264904b4ece2f3f503c9418 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3171034 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Peter Boström <pbos@chromium.org>
This commit is contained in:
parent
5e43f1ed0a
commit
1aa478d161
@ -23,7 +23,6 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "build/build_config.h"
|
||||
@ -139,6 +138,9 @@ class Annotation {
|
||||
size_(0),
|
||||
type_(type) {}
|
||||
|
||||
Annotation(const Annotation&) = delete;
|
||||
Annotation& operator=(const Annotation&) = delete;
|
||||
|
||||
//! \brief Specifies the number of bytes in \a value_ptr_ to include when
|
||||
//! generating a crash report.
|
||||
//!
|
||||
@ -189,8 +191,6 @@ class Annotation {
|
||||
void* const value_ptr_;
|
||||
ValueSizeType size_;
|
||||
const Type type_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Annotation);
|
||||
};
|
||||
|
||||
//! \brief An \sa Annotation that stores a `NUL`-terminated C-string value.
|
||||
@ -214,6 +214,9 @@ class StringAnnotation : public Annotation {
|
||||
constexpr explicit StringAnnotation(const char name[])
|
||||
: Annotation(Type::kString, name, value_), value_() {}
|
||||
|
||||
StringAnnotation(const StringAnnotation&) = delete;
|
||||
StringAnnotation& operator=(const StringAnnotation&) = delete;
|
||||
|
||||
//! \brief Constructs a new StringAnnotation with the given \a name.
|
||||
//!
|
||||
//! This constructor takes the ArrayInitializerTag for use when
|
||||
@ -262,8 +265,6 @@ class StringAnnotation : public Annotation {
|
||||
// This value is not `NUL`-terminated, since the size is stored by the base
|
||||
// annotation.
|
||||
char value_[MaxSize];
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(StringAnnotation);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef CRASHPAD_CLIENT_ANNOTATION_LIST_H_
|
||||
#define CRASHPAD_CLIENT_ANNOTATION_LIST_H_
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "client/annotation.h"
|
||||
|
||||
@ -35,6 +34,10 @@ class InProcessIntermediateDumpHandler;
|
||||
class AnnotationList {
|
||||
public:
|
||||
AnnotationList();
|
||||
|
||||
AnnotationList(const AnnotationList&) = delete;
|
||||
AnnotationList& operator=(const AnnotationList&) = delete;
|
||||
|
||||
~AnnotationList();
|
||||
|
||||
//! \brief Returns the instance of the list that has been registered on the
|
||||
@ -102,8 +105,6 @@ class AnnotationList {
|
||||
// Dummy linked-list head and tail elements of \a Annotation::Type::kInvalid.
|
||||
Annotation head_;
|
||||
Annotation tail_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AnnotationList);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/macros.h"
|
||||
#include "util/file/file_io.h"
|
||||
#include "util/file/file_reader.h"
|
||||
#include "util/file/file_writer.h"
|
||||
@ -111,6 +110,10 @@ class CrashReportDatabase {
|
||||
class NewReport {
|
||||
public:
|
||||
NewReport();
|
||||
|
||||
NewReport(const NewReport&) = delete;
|
||||
NewReport& operator=(const NewReport&) = delete;
|
||||
|
||||
~NewReport();
|
||||
|
||||
//! \brief An open FileWriter with which to write the report.
|
||||
@ -152,8 +155,6 @@ class CrashReportDatabase {
|
||||
std::vector<ScopedRemoveFile> attachment_removers_;
|
||||
UUID uuid_;
|
||||
CrashReportDatabase* database_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NewReport);
|
||||
};
|
||||
|
||||
//! \brief A crash report that is in the process of being uploaded.
|
||||
@ -162,6 +163,10 @@ class CrashReportDatabase {
|
||||
class UploadReport : public Report {
|
||||
public:
|
||||
UploadReport();
|
||||
|
||||
UploadReport(const UploadReport&) = delete;
|
||||
UploadReport& operator=(const UploadReport&) = delete;
|
||||
|
||||
virtual ~UploadReport();
|
||||
|
||||
//! \brief An open FileReader with which to read the report.
|
||||
@ -189,8 +194,6 @@ class CrashReportDatabase {
|
||||
std::vector<std::unique_ptr<FileReader>> attachment_readers_;
|
||||
std::map<std::string, FileReader*> attachment_map_;
|
||||
bool report_metrics_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(UploadReport);
|
||||
};
|
||||
|
||||
//! \brief The result code for operations performed on a database.
|
||||
@ -233,6 +236,9 @@ class CrashReportDatabase {
|
||||
kCannotRequestUpload,
|
||||
};
|
||||
|
||||
CrashReportDatabase(const CrashReportDatabase&) = delete;
|
||||
CrashReportDatabase& operator=(const CrashReportDatabase&) = delete;
|
||||
|
||||
virtual ~CrashReportDatabase() {}
|
||||
|
||||
//! \brief Opens a database of crash reports, possibly creating it.
|
||||
@ -422,8 +428,6 @@ class CrashReportDatabase {
|
||||
virtual OperationStatus RecordUploadAttempt(UploadReport* report,
|
||||
bool successful,
|
||||
const std::string& id) = 0;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashReportDatabase);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "client/settings.h"
|
||||
#include "util/file/directory_reader.h"
|
||||
@ -100,6 +101,10 @@ struct ReportMetadata {
|
||||
class ScopedLockFile {
|
||||
public:
|
||||
ScopedLockFile() = default;
|
||||
|
||||
ScopedLockFile(const ScopedLockFile&) = delete;
|
||||
ScopedLockFile& operator=(const ScopedLockFile&) = delete;
|
||||
|
||||
~ScopedLockFile() = default;
|
||||
|
||||
ScopedLockFile& operator=(ScopedLockFile&& other) {
|
||||
@ -158,8 +163,6 @@ class ScopedLockFile {
|
||||
|
||||
private:
|
||||
ScopedRemoveFile lock_file_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedLockFile);
|
||||
};
|
||||
|
||||
off_t GetFileSize(const base::FilePath& filepath) {
|
||||
@ -195,6 +198,11 @@ void AddAttachmentSize(const base::FilePath& attachments_dir, uint64_t* size) {
|
||||
class CrashReportDatabaseGeneric : public CrashReportDatabase {
|
||||
public:
|
||||
CrashReportDatabaseGeneric();
|
||||
|
||||
CrashReportDatabaseGeneric(const CrashReportDatabaseGeneric&) = delete;
|
||||
CrashReportDatabaseGeneric& operator=(const CrashReportDatabaseGeneric&) =
|
||||
delete;
|
||||
|
||||
~CrashReportDatabaseGeneric() override;
|
||||
|
||||
bool Initialize(const base::FilePath& path, bool may_create);
|
||||
@ -297,8 +305,6 @@ class CrashReportDatabaseGeneric : public CrashReportDatabase {
|
||||
base::FilePath base_dir_;
|
||||
Settings settings_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashReportDatabaseGeneric);
|
||||
};
|
||||
|
||||
FileWriter* CrashReportDatabase::NewReport::AddAttachment(
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "base/cxx17_backports.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
#include "base/scoped_generic.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
@ -127,6 +128,10 @@ std::string XattrNameInternal(const base::StringPiece& name, bool new_name) {
|
||||
class CrashReportDatabaseMac : public CrashReportDatabase {
|
||||
public:
|
||||
explicit CrashReportDatabaseMac(const base::FilePath& path);
|
||||
|
||||
CrashReportDatabaseMac(const CrashReportDatabaseMac&) = delete;
|
||||
CrashReportDatabaseMac& operator=(const CrashReportDatabaseMac&) = delete;
|
||||
|
||||
virtual ~CrashReportDatabaseMac();
|
||||
|
||||
bool Initialize(bool may_create);
|
||||
@ -243,8 +248,6 @@ class CrashReportDatabaseMac : public CrashReportDatabase {
|
||||
Settings settings_;
|
||||
bool xattr_new_names_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashReportDatabaseMac);
|
||||
};
|
||||
|
||||
FileWriter* CrashReportDatabase::NewReport::AddAttachment(
|
||||
|
@ -32,6 +32,9 @@ class CrashReportDatabaseTest : public testing::Test {
|
||||
public:
|
||||
CrashReportDatabaseTest() {}
|
||||
|
||||
CrashReportDatabaseTest(const CrashReportDatabaseTest&) = delete;
|
||||
CrashReportDatabaseTest& operator=(const CrashReportDatabaseTest&) = delete;
|
||||
|
||||
protected:
|
||||
// testing::Test:
|
||||
void SetUp() override {
|
||||
@ -125,8 +128,6 @@ class CrashReportDatabaseTest : public testing::Test {
|
||||
private:
|
||||
ScopedTempDir temp_dir_;
|
||||
std::unique_ptr<CrashReportDatabase> db_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashReportDatabaseTest);
|
||||
};
|
||||
|
||||
TEST_F(CrashReportDatabaseTest, Initialize) {
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/numerics/safe_math.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "client/settings.h"
|
||||
@ -208,6 +209,9 @@ ReportDisk::ReportDisk(const UUID& uuid,
|
||||
//! to disk, and queries.
|
||||
class Metadata {
|
||||
public:
|
||||
Metadata(const Metadata&) = delete;
|
||||
Metadata& operator=(const Metadata&) = delete;
|
||||
|
||||
//! \brief Writes any changes if necessary, unlocks and closes the file
|
||||
//! handle.
|
||||
~Metadata();
|
||||
@ -296,8 +300,6 @@ class Metadata {
|
||||
const base::FilePath report_dir_;
|
||||
bool dirty_; //! \brief `true` when a Write() is required on destruction.
|
||||
std::vector<ReportDisk> reports_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Metadata);
|
||||
};
|
||||
|
||||
Metadata::~Metadata() {
|
||||
@ -615,6 +617,10 @@ bool CreateDirectoryIfNecessary(const base::FilePath& path) {
|
||||
class CrashReportDatabaseWin : public CrashReportDatabase {
|
||||
public:
|
||||
explicit CrashReportDatabaseWin(const base::FilePath& path);
|
||||
|
||||
CrashReportDatabaseWin(const CrashReportDatabaseWin&) = delete;
|
||||
CrashReportDatabaseWin& operator=(const CrashReportDatabaseWin&) = delete;
|
||||
|
||||
~CrashReportDatabaseWin() override;
|
||||
|
||||
bool Initialize(bool may_create);
|
||||
@ -662,8 +668,6 @@ class CrashReportDatabaseWin : public CrashReportDatabase {
|
||||
base::FilePath base_dir_;
|
||||
Settings settings_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashReportDatabaseWin);
|
||||
};
|
||||
|
||||
base::FilePath CrashReportDatabaseWin::AttachmentsRootPath() {
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "util/file/file_io.h"
|
||||
@ -46,6 +45,10 @@ namespace crashpad {
|
||||
class CrashpadClient {
|
||||
public:
|
||||
CrashpadClient();
|
||||
|
||||
CrashpadClient(const CrashpadClient&) = delete;
|
||||
CrashpadClient& operator=(const CrashpadClient&) = delete;
|
||||
|
||||
~CrashpadClient();
|
||||
|
||||
//! \brief Starts a Crashpad handler process, performing any necessary
|
||||
@ -744,8 +747,6 @@ class CrashpadClient {
|
||||
#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
std::set<int> unhandled_signals_;
|
||||
#endif // OS_APPLE
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashpadClient);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -42,6 +42,9 @@ class CrashHandler : public Thread,
|
||||
public UniversalMachExcServer::Interface,
|
||||
public ObjcExceptionDelegate {
|
||||
public:
|
||||
CrashHandler(const CrashHandler&) = delete;
|
||||
CrashHandler& operator=(const CrashHandler&) = delete;
|
||||
|
||||
static CrashHandler* Get() {
|
||||
static CrashHandler* instance = new CrashHandler();
|
||||
return instance;
|
||||
@ -215,8 +218,6 @@ class CrashHandler : public Thread,
|
||||
struct sigaction old_action_ = {};
|
||||
internal::IOSSystemDataCollector system_data_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashHandler);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -129,6 +129,9 @@ std::vector<std::string> BuildArgsToLaunchWithLinker(
|
||||
// A base class for Crashpad signal handler implementations.
|
||||
class SignalHandler {
|
||||
public:
|
||||
SignalHandler(const SignalHandler&) = delete;
|
||||
SignalHandler& operator=(const SignalHandler&) = delete;
|
||||
|
||||
// Returns the currently installed signal hander. May be `nullptr` if no
|
||||
// handler has been installed.
|
||||
static SignalHandler* Get() { return handler_; }
|
||||
@ -208,8 +211,6 @@ class SignalHandler {
|
||||
static SignalHandler* handler_;
|
||||
|
||||
static thread_local bool disabled_for_thread_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SignalHandler);
|
||||
};
|
||||
SignalHandler* SignalHandler::handler_ = nullptr;
|
||||
thread_local bool SignalHandler::disabled_for_thread_ = false;
|
||||
@ -217,6 +218,9 @@ thread_local bool SignalHandler::disabled_for_thread_ = false;
|
||||
// Launches a single use handler to snapshot this process.
|
||||
class LaunchAtCrashHandler : public SignalHandler {
|
||||
public:
|
||||
LaunchAtCrashHandler(const LaunchAtCrashHandler&) = delete;
|
||||
LaunchAtCrashHandler& operator=(const LaunchAtCrashHandler&) = delete;
|
||||
|
||||
static LaunchAtCrashHandler* Get() {
|
||||
static LaunchAtCrashHandler* instance = new LaunchAtCrashHandler();
|
||||
return instance;
|
||||
@ -272,12 +276,13 @@ class LaunchAtCrashHandler : public SignalHandler {
|
||||
std::vector<std::string> envp_strings_;
|
||||
std::vector<const char*> envp_;
|
||||
bool set_envp_ = false;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(LaunchAtCrashHandler);
|
||||
};
|
||||
|
||||
class RequestCrashDumpHandler : public SignalHandler {
|
||||
public:
|
||||
RequestCrashDumpHandler(const RequestCrashDumpHandler&) = delete;
|
||||
RequestCrashDumpHandler& operator=(const RequestCrashDumpHandler&) = delete;
|
||||
|
||||
static RequestCrashDumpHandler* Get() {
|
||||
static RequestCrashDumpHandler* instance = new RequestCrashDumpHandler();
|
||||
return instance;
|
||||
@ -365,8 +370,6 @@ class RequestCrashDumpHandler : public SignalHandler {
|
||||
// don't anything with it except pass it along).
|
||||
uint64_t crash_loop_before_time_ = 0;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RequestCrashDumpHandler);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -81,6 +81,10 @@ class StartHandlerForSelfTest
|
||||
std::tuple<bool, bool, bool, bool, CrashType>> {
|
||||
public:
|
||||
StartHandlerForSelfTest() = default;
|
||||
|
||||
StartHandlerForSelfTest(const StartHandlerForSelfTest&) = delete;
|
||||
StartHandlerForSelfTest& operator=(const StartHandlerForSelfTest&) = delete;
|
||||
|
||||
~StartHandlerForSelfTest() = default;
|
||||
|
||||
void SetUp() override {
|
||||
@ -95,8 +99,6 @@ class StartHandlerForSelfTest
|
||||
|
||||
private:
|
||||
StartHandlerForSelfTestOptions options_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(StartHandlerForSelfTest);
|
||||
};
|
||||
|
||||
bool HandleCrashSuccessfully(int, siginfo_t*, ucontext_t*) {
|
||||
@ -212,6 +214,9 @@ class ScopedAltSignalStack {
|
||||
public:
|
||||
ScopedAltSignalStack() = default;
|
||||
|
||||
ScopedAltSignalStack(const ScopedAltSignalStack&) = delete;
|
||||
ScopedAltSignalStack& operator=(const ScopedAltSignalStack&) = delete;
|
||||
|
||||
~ScopedAltSignalStack() {
|
||||
if (stack_mem_.is_valid()) {
|
||||
stack_t stack;
|
||||
@ -242,8 +247,6 @@ class ScopedAltSignalStack {
|
||||
|
||||
private:
|
||||
ScopedMmap stack_mem_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedAltSignalStack);
|
||||
};
|
||||
|
||||
class CrashThread : public Thread {
|
||||
@ -252,6 +255,9 @@ class CrashThread : public Thread {
|
||||
CrashpadClient* client)
|
||||
: client_signal_stack_(), options_(options), client_(client) {}
|
||||
|
||||
CrashThread(const CrashThread&) = delete;
|
||||
CrashThread& operator=(const CrashThread&) = delete;
|
||||
|
||||
private:
|
||||
void ThreadMain() override {
|
||||
// It is only necessary to call InitializeSignalStackForThread() once, but
|
||||
@ -269,8 +275,6 @@ class CrashThread : public Thread {
|
||||
ScopedAltSignalStack client_signal_stack_;
|
||||
const StartHandlerForSelfTestOptions& options_;
|
||||
CrashpadClient* client_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashThread);
|
||||
};
|
||||
|
||||
CRASHPAD_CHILD_TEST_MAIN(StartHandlerForSelfTestChild) {
|
||||
@ -360,6 +364,11 @@ class StartHandlerForSelfInChildTest : public MultiprocessExec {
|
||||
}
|
||||
}
|
||||
|
||||
StartHandlerForSelfInChildTest(const StartHandlerForSelfInChildTest&) =
|
||||
delete;
|
||||
StartHandlerForSelfInChildTest& operator=(
|
||||
const StartHandlerForSelfInChildTest&) = delete;
|
||||
|
||||
private:
|
||||
void MultiprocessParent() override {
|
||||
ScopedTempDir temp_dir;
|
||||
@ -415,8 +424,6 @@ class StartHandlerForSelfInChildTest : public MultiprocessExec {
|
||||
}
|
||||
|
||||
StartHandlerForSelfTestOptions options_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(StartHandlerForSelfInChildTest);
|
||||
};
|
||||
|
||||
TEST_P(StartHandlerForSelfTest, StartHandlerInChild) {
|
||||
@ -450,6 +457,11 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
class StartHandlerForClientTest {
|
||||
public:
|
||||
StartHandlerForClientTest() = default;
|
||||
|
||||
StartHandlerForClientTest(const StartHandlerForClientTest&) = delete;
|
||||
StartHandlerForClientTest& operator=(const StartHandlerForClientTest&) =
|
||||
delete;
|
||||
|
||||
~StartHandlerForClientTest() = default;
|
||||
|
||||
bool Initialize(bool sanitize) {
|
||||
@ -513,6 +525,9 @@ class StartHandlerForClientTest {
|
||||
// more privileged, process.
|
||||
class SandboxedHandler {
|
||||
public:
|
||||
SandboxedHandler(const SandboxedHandler&) = delete;
|
||||
SandboxedHandler& operator=(const SandboxedHandler&) = delete;
|
||||
|
||||
static SandboxedHandler* Get() {
|
||||
static SandboxedHandler* instance = new SandboxedHandler();
|
||||
return instance;
|
||||
@ -565,22 +580,22 @@ class StartHandlerForClientTest {
|
||||
|
||||
FileHandle client_sock_;
|
||||
bool sanitize_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SandboxedHandler);
|
||||
};
|
||||
|
||||
ScopedTempDir temp_dir_;
|
||||
ScopedFileHandle client_sock_;
|
||||
ScopedFileHandle server_sock_;
|
||||
bool sanitize_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(StartHandlerForClientTest);
|
||||
};
|
||||
|
||||
// Tests starting the handler for a child process.
|
||||
class StartHandlerForChildTest : public Multiprocess {
|
||||
public:
|
||||
StartHandlerForChildTest() = default;
|
||||
|
||||
StartHandlerForChildTest(const StartHandlerForChildTest&) = delete;
|
||||
StartHandlerForChildTest& operator=(const StartHandlerForChildTest&) = delete;
|
||||
|
||||
~StartHandlerForChildTest() = default;
|
||||
|
||||
bool Initialize(bool sanitize) {
|
||||
@ -607,8 +622,6 @@ class StartHandlerForChildTest : public Multiprocess {
|
||||
}
|
||||
|
||||
StartHandlerForClientTest test_state_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(StartHandlerForChildTest);
|
||||
};
|
||||
|
||||
TEST(CrashpadClient, StartHandlerForChild) {
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/mach_logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "util/mac/mac_util.h"
|
||||
#include "util/mach/bootstrap.h"
|
||||
@ -94,6 +95,9 @@ class ScopedPthreadAttrDestroy {
|
||||
: pthread_attr_(pthread_attr) {
|
||||
}
|
||||
|
||||
ScopedPthreadAttrDestroy(const ScopedPthreadAttrDestroy&) = delete;
|
||||
ScopedPthreadAttrDestroy& operator=(const ScopedPthreadAttrDestroy&) = delete;
|
||||
|
||||
~ScopedPthreadAttrDestroy() {
|
||||
errno = pthread_attr_destroy(pthread_attr_);
|
||||
PLOG_IF(WARNING, errno != 0) << "pthread_attr_destroy";
|
||||
@ -101,13 +105,14 @@ class ScopedPthreadAttrDestroy {
|
||||
|
||||
private:
|
||||
pthread_attr_t* pthread_attr_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedPthreadAttrDestroy);
|
||||
};
|
||||
|
||||
//! \brief Starts a Crashpad handler, possibly restarting it if it dies.
|
||||
class HandlerStarter final : public NotifyServer::DefaultInterface {
|
||||
public:
|
||||
HandlerStarter(const HandlerStarter&) = delete;
|
||||
HandlerStarter& operator=(const HandlerStarter&) = delete;
|
||||
|
||||
~HandlerStarter() {}
|
||||
|
||||
//! \brief Starts a Crashpad handler initially, as opposed to starting it for
|
||||
@ -427,8 +432,6 @@ class HandlerStarter final : public NotifyServer::DefaultInterface {
|
||||
std::vector<std::string> arguments_;
|
||||
base::mac::ScopedMachReceiveRight notify_port_;
|
||||
uint64_t last_start_time_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(HandlerStarter);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include "base/atomicops.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/scoped_generic.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@ -339,6 +338,11 @@ class ScopedCallSetHandlerStartupState {
|
||||
public:
|
||||
ScopedCallSetHandlerStartupState() : successful_(false) {}
|
||||
|
||||
ScopedCallSetHandlerStartupState(const ScopedCallSetHandlerStartupState&) =
|
||||
delete;
|
||||
ScopedCallSetHandlerStartupState& operator=(
|
||||
const ScopedCallSetHandlerStartupState&) = delete;
|
||||
|
||||
~ScopedCallSetHandlerStartupState() {
|
||||
SetHandlerStartupState(successful_ ? StartupState::kSucceeded
|
||||
: StartupState::kFailed);
|
||||
@ -348,8 +352,6 @@ class ScopedCallSetHandlerStartupState {
|
||||
|
||||
private:
|
||||
bool successful_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedCallSetHandlerStartupState);
|
||||
};
|
||||
|
||||
bool StartHandlerProcess(
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "client/annotation_list.h"
|
||||
#include "client/simple_address_range_bag.h"
|
||||
@ -71,6 +70,9 @@ struct CrashpadInfo {
|
||||
|
||||
CrashpadInfo();
|
||||
|
||||
CrashpadInfo(const CrashpadInfo&) = delete;
|
||||
CrashpadInfo& operator=(const CrashpadInfo&) = delete;
|
||||
|
||||
//! \brief Sets the bag of extra memory ranges to be included in the snapshot.
|
||||
//!
|
||||
//! Extra memory ranges may exist in \a address_range_bag at the time that
|
||||
@ -270,8 +272,6 @@ struct CrashpadInfo {
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashpadInfo);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -64,6 +64,9 @@ class ScopedTaskThreads {
|
||||
mach_msg_type_number_t thread_count)
|
||||
: threads_(threads), thread_count_(thread_count) {}
|
||||
|
||||
ScopedTaskThreads(const ScopedTaskThreads&) = delete;
|
||||
ScopedTaskThreads& operator=(const ScopedTaskThreads&) = delete;
|
||||
|
||||
~ScopedTaskThreads() {
|
||||
for (uint32_t thread_index = 0; thread_index < thread_count_;
|
||||
++thread_index) {
|
||||
@ -77,8 +80,6 @@ class ScopedTaskThreads {
|
||||
private:
|
||||
thread_act_array_t threads_;
|
||||
mach_msg_type_number_t thread_count_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedTaskThreads);
|
||||
};
|
||||
|
||||
//! \brief Log \a key as a string.
|
||||
|
@ -32,6 +32,12 @@ namespace internal {
|
||||
//! Note: All methods are `RUNS-DURING-CRASH`.
|
||||
class InProcessIntermediateDumpHandler final {
|
||||
public:
|
||||
InProcessIntermediateDumpHandler() = delete;
|
||||
InProcessIntermediateDumpHandler(const InProcessIntermediateDumpHandler&) =
|
||||
delete;
|
||||
InProcessIntermediateDumpHandler& operator=(
|
||||
const InProcessIntermediateDumpHandler&) = delete;
|
||||
|
||||
//! \brief Set kVersion to 1.
|
||||
//!
|
||||
//! \param[in] writer The dump writer
|
||||
@ -136,8 +142,6 @@ class InProcessIntermediateDumpHandler final {
|
||||
//! \brief Write Crashpad annotations list.
|
||||
static void WriteCrashpadAnnotationsList(IOSIntermediateDumpWriter* writer,
|
||||
CrashpadInfo* crashpad_info);
|
||||
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(InProcessIntermediateDumpHandler);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "client/crash_report_database.h"
|
||||
|
||||
namespace crashpad {
|
||||
@ -81,14 +80,16 @@ class AgePruneCondition final : public PruneCondition {
|
||||
//! \param[in] max_age_in_days Reports created more than this many days ago
|
||||
//! will be deleted.
|
||||
explicit AgePruneCondition(int max_age_in_days);
|
||||
|
||||
AgePruneCondition(const AgePruneCondition&) = delete;
|
||||
AgePruneCondition& operator=(const AgePruneCondition&) = delete;
|
||||
|
||||
~AgePruneCondition();
|
||||
|
||||
bool ShouldPruneReport(const CrashReportDatabase::Report& report) override;
|
||||
|
||||
private:
|
||||
const time_t oldest_report_time_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AgePruneCondition);
|
||||
};
|
||||
|
||||
//! \brief A PruneCondition that deletes older reports to keep the total
|
||||
@ -102,6 +103,11 @@ class DatabaseSizePruneCondition final : public PruneCondition {
|
||||
//! \param[in] max_size_in_kb The maximum number of kilobytes that all crash
|
||||
//! reports should consume.
|
||||
explicit DatabaseSizePruneCondition(size_t max_size_in_kb);
|
||||
|
||||
DatabaseSizePruneCondition(const DatabaseSizePruneCondition&) = delete;
|
||||
DatabaseSizePruneCondition& operator=(const DatabaseSizePruneCondition&) =
|
||||
delete;
|
||||
|
||||
~DatabaseSizePruneCondition();
|
||||
|
||||
bool ShouldPruneReport(const CrashReportDatabase::Report& report) override;
|
||||
@ -109,8 +115,6 @@ class DatabaseSizePruneCondition final : public PruneCondition {
|
||||
private:
|
||||
const size_t max_size_in_kb_;
|
||||
size_t measured_size_in_kb_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DatabaseSizePruneCondition);
|
||||
};
|
||||
|
||||
//! \brief A PruneCondition that conjoins two other PruneConditions.
|
||||
@ -133,6 +137,10 @@ class BinaryPruneCondition final : public PruneCondition {
|
||||
//! \param[in] lhs The left-hand side of \a op. This class takes ownership.
|
||||
//! \param[in] rhs The right-hand side of \a op. This class takes ownership.
|
||||
BinaryPruneCondition(Operator op, PruneCondition* lhs, PruneCondition* rhs);
|
||||
|
||||
BinaryPruneCondition(const BinaryPruneCondition&) = delete;
|
||||
BinaryPruneCondition& operator=(const BinaryPruneCondition&) = delete;
|
||||
|
||||
~BinaryPruneCondition();
|
||||
|
||||
bool ShouldPruneReport(const CrashReportDatabase::Report& report) override;
|
||||
@ -141,8 +149,6 @@ class BinaryPruneCondition final : public PruneCondition {
|
||||
const Operator op_;
|
||||
std::unique_ptr<PruneCondition> lhs_;
|
||||
std::unique_ptr<PruneCondition> rhs_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BinaryPruneCondition);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -149,6 +149,10 @@ TEST(PruneCrashReports, SizeCondition) {
|
||||
class StaticCondition final : public PruneCondition {
|
||||
public:
|
||||
explicit StaticCondition(bool value) : value_(value), did_execute_(false) {}
|
||||
|
||||
StaticCondition(const StaticCondition&) = delete;
|
||||
StaticCondition& operator=(const StaticCondition&) = delete;
|
||||
|
||||
~StaticCondition() {}
|
||||
|
||||
bool ShouldPruneReport(const CrashReportDatabase::Report& report) override {
|
||||
@ -161,8 +165,6 @@ class StaticCondition final : public PruneCondition {
|
||||
private:
|
||||
const bool value_;
|
||||
bool did_execute_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(StaticCondition);
|
||||
};
|
||||
|
||||
TEST(PruneCrashReports, BinaryCondition) {
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/scoped_generic.h"
|
||||
#include "build/build_config.h"
|
||||
#include "util/file/file_io.h"
|
||||
@ -46,6 +45,10 @@ struct ScopedLockedFileHandleTraits {
|
||||
class Settings {
|
||||
public:
|
||||
Settings();
|
||||
|
||||
Settings(const Settings&) = delete;
|
||||
Settings& operator=(const Settings&) = delete;
|
||||
|
||||
~Settings();
|
||||
|
||||
//! \brief Initializes the settings data store.
|
||||
@ -130,6 +133,10 @@ class Settings {
|
||||
const base::FilePath& lockfile_path);
|
||||
ScopedLockedFileHandle(ScopedLockedFileHandle&& other);
|
||||
ScopedLockedFileHandle& operator=(ScopedLockedFileHandle&& other);
|
||||
|
||||
ScopedLockedFileHandle(const ScopedLockedFileHandle&) = delete;
|
||||
ScopedLockedFileHandle& operator=(const ScopedLockedFileHandle&) = delete;
|
||||
|
||||
~ScopedLockedFileHandle();
|
||||
|
||||
// These mirror the non-Fuchsia ScopedLockedFileHandle via ScopedGeneric so
|
||||
@ -147,8 +154,6 @@ class Settings {
|
||||
|
||||
FileHandle handle_;
|
||||
base::FilePath lockfile_path_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedLockedFileHandle);
|
||||
};
|
||||
#else // OS_FUCHSIA
|
||||
using ScopedLockedFileHandle =
|
||||
@ -221,8 +226,6 @@ class Settings {
|
||||
base::FilePath file_path_;
|
||||
|
||||
InitializationState initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Settings);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -28,6 +28,9 @@ class SettingsTest : public testing::Test {
|
||||
public:
|
||||
SettingsTest() = default;
|
||||
|
||||
SettingsTest(const SettingsTest&) = delete;
|
||||
SettingsTest& operator=(const SettingsTest&) = delete;
|
||||
|
||||
base::FilePath settings_path() {
|
||||
return temp_dir_.path().Append(FILE_PATH_LITERAL("settings"));
|
||||
}
|
||||
@ -55,8 +58,6 @@ class SettingsTest : public testing::Test {
|
||||
private:
|
||||
ScopedTempDir temp_dir_;
|
||||
Settings settings_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SettingsTest);
|
||||
};
|
||||
|
||||
TEST_F(SettingsTest, ClientID) {
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "util/misc/from_pointer_cast.h"
|
||||
#include "util/numeric/checked_range.h"
|
||||
@ -66,6 +65,9 @@ class TSimpleAddressRangeBag {
|
||||
current_(0) {
|
||||
}
|
||||
|
||||
Iterator(const Iterator&) = delete;
|
||||
Iterator& operator=(const Iterator&) = delete;
|
||||
|
||||
//! \brief Returns the next entry in the bag, or `nullptr` if at the end of
|
||||
//! the collection.
|
||||
const Entry* Next() {
|
||||
@ -81,8 +83,6 @@ class TSimpleAddressRangeBag {
|
||||
private:
|
||||
const TSimpleAddressRangeBag& bag_;
|
||||
size_t current_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Iterator);
|
||||
};
|
||||
|
||||
TSimpleAddressRangeBag()
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <type_traits>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "util/misc/implicit_cast.h"
|
||||
|
||||
@ -82,6 +81,9 @@ class TSimpleStringDictionary {
|
||||
current_(0) {
|
||||
}
|
||||
|
||||
Iterator(const Iterator&) = delete;
|
||||
Iterator& operator=(const Iterator&) = delete;
|
||||
|
||||
//! \brief Returns the next entry in the map, or `nullptr` if at the end of
|
||||
//! the collection.
|
||||
const Entry* Next() {
|
||||
@ -97,8 +99,6 @@ class TSimpleStringDictionary {
|
||||
private:
|
||||
const TSimpleStringDictionary& map_;
|
||||
size_t current_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Iterator);
|
||||
};
|
||||
|
||||
TSimpleStringDictionary()
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "base/cxx17_backports.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "build/build_config.h"
|
||||
#include "gtest/gtest.h"
|
||||
@ -80,6 +79,9 @@ class TestSimulateCrashMac final : public MachMultiprocess,
|
||||
succeed_(true) {
|
||||
}
|
||||
|
||||
TestSimulateCrashMac(const TestSimulateCrashMac&) = delete;
|
||||
TestSimulateCrashMac& operator=(const TestSimulateCrashMac&) = delete;
|
||||
|
||||
~TestSimulateCrashMac() {}
|
||||
|
||||
// UniversalMachExcServer::Interface:
|
||||
@ -325,8 +327,6 @@ class TestSimulateCrashMac final : public MachMultiprocess,
|
||||
exception_behavior_t behavior_;
|
||||
thread_state_flavor_t flavor_;
|
||||
bool succeed_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestSimulateCrashMac);
|
||||
};
|
||||
|
||||
TEST(SimulateCrash, SimulateCrash) {
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "client/crash_report_database.h"
|
||||
#include "util/misc/uuid.h"
|
||||
#include "util/stdlib/thread_safe_vector.h"
|
||||
@ -70,6 +69,10 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
||||
CrashReportUploadThread(CrashReportDatabase* database,
|
||||
const std::string& url,
|
||||
const Options& options);
|
||||
|
||||
CrashReportUploadThread(const CrashReportUploadThread&) = delete;
|
||||
CrashReportUploadThread& operator=(const CrashReportUploadThread&) = delete;
|
||||
|
||||
~CrashReportUploadThread();
|
||||
|
||||
//! \brief Informs the upload thread that a new pending report has been added
|
||||
@ -172,8 +175,6 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
||||
WorkerThread thread_;
|
||||
ThreadSafeVector<UUID> known_pending_report_uuids_;
|
||||
CrashReportDatabase* database_; // weak
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashReportUploadThread);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "handler/handler_main.h"
|
||||
#include "minidump/test/minidump_user_extension_stream_util.h"
|
||||
@ -30,11 +29,11 @@ class TestUserStreamDataSource : public crashpad::UserStreamDataSource {
|
||||
public:
|
||||
TestUserStreamDataSource() {}
|
||||
|
||||
TestUserStreamDataSource(const TestUserStreamDataSource&) = delete;
|
||||
TestUserStreamDataSource& operator=(const TestUserStreamDataSource&) = delete;
|
||||
|
||||
std::unique_ptr<crashpad::MinidumpUserExtensionStreamDataSource>
|
||||
ProduceStreamData(crashpad::ProcessSnapshot* process_snapshot) override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(TestUserStreamDataSource);
|
||||
};
|
||||
|
||||
std::unique_ptr<crashpad::MinidumpUserExtensionStreamDataSource>
|
||||
|
@ -270,12 +270,14 @@ int ExitFailure() {
|
||||
class CallMetricsRecordNormalExit {
|
||||
public:
|
||||
CallMetricsRecordNormalExit() {}
|
||||
|
||||
CallMetricsRecordNormalExit(const CallMetricsRecordNormalExit&) = delete;
|
||||
CallMetricsRecordNormalExit& operator=(const CallMetricsRecordNormalExit&) =
|
||||
delete;
|
||||
|
||||
~CallMetricsRecordNormalExit() {
|
||||
MetricsRecordExit(Metrics::LifetimeMilestone::kExitedNormally);
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(CallMetricsRecordNormalExit);
|
||||
};
|
||||
|
||||
#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
|
||||
@ -391,6 +393,10 @@ BOOL WINAPI ConsoleHandler(DWORD console_event) {
|
||||
class TerminateHandler final : public SessionEndWatcher {
|
||||
public:
|
||||
TerminateHandler() : SessionEndWatcher() {}
|
||||
|
||||
TerminateHandler(const TerminateHandler&) = delete;
|
||||
TerminateHandler& operator=(const TerminateHandler&) = delete;
|
||||
|
||||
~TerminateHandler() override {}
|
||||
|
||||
private:
|
||||
@ -398,8 +404,6 @@ class TerminateHandler final : public SessionEndWatcher {
|
||||
void SessionEnding() override {
|
||||
MetricsRecordExit(Metrics::LifetimeMilestone::kTerminated);
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TerminateHandler);
|
||||
};
|
||||
|
||||
void ReinstallCrashHandler() {
|
||||
@ -489,6 +493,9 @@ class ScopedStoppable {
|
||||
public:
|
||||
ScopedStoppable() = default;
|
||||
|
||||
ScopedStoppable(const ScopedStoppable&) = delete;
|
||||
ScopedStoppable& operator=(const ScopedStoppable&) = delete;
|
||||
|
||||
~ScopedStoppable() {
|
||||
if (stoppable_) {
|
||||
stoppable_->Stop();
|
||||
@ -501,8 +508,6 @@ class ScopedStoppable {
|
||||
|
||||
private:
|
||||
std::unique_ptr<Stoppable> stoppable_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedStoppable);
|
||||
};
|
||||
|
||||
void InitCrashpadLogging() {
|
||||
|
@ -46,6 +46,10 @@ namespace {
|
||||
class Logger final : public LogOutputStream::Delegate {
|
||||
public:
|
||||
Logger() = default;
|
||||
|
||||
Logger(const Logger&) = delete;
|
||||
Logger& operator=(const Logger&) = delete;
|
||||
|
||||
~Logger() override = default;
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
@ -72,9 +76,6 @@ class Logger final : public LogOutputStream::Delegate {
|
||||
size_t OutputCap() override { return 0; }
|
||||
size_t LineWidth() override { return 0; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(Logger);
|
||||
};
|
||||
|
||||
bool WriteMinidumpLogFromFile(FileReaderInterface* file_reader) {
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "client/crash_report_database.h"
|
||||
#include "handler/crash_report_upload_thread.h"
|
||||
#include "handler/linux/exception_handler_server.h"
|
||||
@ -72,6 +71,10 @@ class CrashReportExceptionHandler : public ExceptionHandlerServer::Delegate {
|
||||
bool write_minidump_to_log,
|
||||
const UserStreamDataSources* user_stream_data_sources);
|
||||
|
||||
CrashReportExceptionHandler(const CrashReportExceptionHandler&) = delete;
|
||||
CrashReportExceptionHandler& operator=(const CrashReportExceptionHandler&) =
|
||||
delete;
|
||||
|
||||
~CrashReportExceptionHandler() override;
|
||||
|
||||
// ExceptionHandlerServer::Delegate:
|
||||
@ -113,8 +116,6 @@ class CrashReportExceptionHandler : public ExceptionHandlerServer::Delegate {
|
||||
bool write_minidump_to_database_;
|
||||
bool write_minidump_to_log_;
|
||||
const UserStreamDataSources* user_stream_data_sources_; // weak
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashReportExceptionHandler);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "client/crash_report_database.h"
|
||||
#include "handler/linux/exception_handler_server.h"
|
||||
#include "handler/user_stream_data_source.h"
|
||||
@ -58,6 +57,11 @@ class CrosCrashReportExceptionHandler
|
||||
const std::map<std::string, std::string>* process_annotations,
|
||||
const UserStreamDataSources* user_stream_data_sources);
|
||||
|
||||
CrosCrashReportExceptionHandler(const CrosCrashReportExceptionHandler&) =
|
||||
delete;
|
||||
CrosCrashReportExceptionHandler& operator=(
|
||||
const CrosCrashReportExceptionHandler&) = delete;
|
||||
|
||||
~CrosCrashReportExceptionHandler() override;
|
||||
|
||||
// ExceptionHandlerServer::Delegate:
|
||||
@ -92,8 +96,6 @@ class CrosCrashReportExceptionHandler
|
||||
const UserStreamDataSources* user_stream_data_sources_; // weak
|
||||
base::FilePath dump_dir_;
|
||||
bool always_allow_feedback_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrosCrashReportExceptionHandler);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "util/file/file_io.h"
|
||||
#include "util/linux/exception_handler_protocol.h"
|
||||
#include "util/misc/address_types.h"
|
||||
@ -116,6 +115,10 @@ class ExceptionHandlerServer {
|
||||
};
|
||||
|
||||
ExceptionHandlerServer();
|
||||
|
||||
ExceptionHandlerServer(const ExceptionHandlerServer&) = delete;
|
||||
ExceptionHandlerServer& operator=(const ExceptionHandlerServer&) = delete;
|
||||
|
||||
~ExceptionHandlerServer();
|
||||
|
||||
//! \brief Sets the handler's PtraceStrategyDecider.
|
||||
@ -187,8 +190,6 @@ class ExceptionHandlerServer {
|
||||
ScopedFileHandle pollfd_;
|
||||
std::atomic<bool> keep_running_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerServer);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -45,6 +45,9 @@ class RunServerThread : public Thread {
|
||||
ExceptionHandlerServer::Delegate* delegate)
|
||||
: server_(server), delegate_(delegate), join_sem_(0) {}
|
||||
|
||||
RunServerThread(const RunServerThread&) = delete;
|
||||
RunServerThread& operator=(const RunServerThread&) = delete;
|
||||
|
||||
~RunServerThread() override {}
|
||||
|
||||
bool JoinWithTimeout(double timeout) {
|
||||
@ -65,8 +68,6 @@ class RunServerThread : public Thread {
|
||||
ExceptionHandlerServer* server_;
|
||||
ExceptionHandlerServer::Delegate* delegate_;
|
||||
Semaphore join_sem_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RunServerThread);
|
||||
};
|
||||
|
||||
class ScopedStopServerAndJoinThread {
|
||||
@ -75,6 +76,10 @@ class ScopedStopServerAndJoinThread {
|
||||
RunServerThread* thread)
|
||||
: server_(server), thread_(thread) {}
|
||||
|
||||
ScopedStopServerAndJoinThread(const ScopedStopServerAndJoinThread&) = delete;
|
||||
ScopedStopServerAndJoinThread& operator=(
|
||||
const ScopedStopServerAndJoinThread&) = delete;
|
||||
|
||||
~ScopedStopServerAndJoinThread() {
|
||||
server_->Stop();
|
||||
EXPECT_TRUE(thread_->JoinWithTimeout(5.0));
|
||||
@ -83,8 +88,6 @@ class ScopedStopServerAndJoinThread {
|
||||
private:
|
||||
ExceptionHandlerServer* server_;
|
||||
RunServerThread* thread_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedStopServerAndJoinThread);
|
||||
};
|
||||
|
||||
class TestDelegate : public ExceptionHandlerServer::Delegate {
|
||||
@ -92,6 +95,9 @@ class TestDelegate : public ExceptionHandlerServer::Delegate {
|
||||
TestDelegate()
|
||||
: Delegate(), last_exception_address_(0), last_client_(-1), sem_(0) {}
|
||||
|
||||
TestDelegate(const TestDelegate&) = delete;
|
||||
TestDelegate& operator=(const TestDelegate&) = delete;
|
||||
|
||||
~TestDelegate() {}
|
||||
|
||||
bool WaitForException(double timeout_seconds,
|
||||
@ -159,8 +165,6 @@ class TestDelegate : public ExceptionHandlerServer::Delegate {
|
||||
VMAddress last_exception_address_;
|
||||
pid_t last_client_;
|
||||
Semaphore sem_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestDelegate);
|
||||
};
|
||||
|
||||
class MockPtraceStrategyDecider : public PtraceStrategyDecider {
|
||||
@ -168,6 +172,10 @@ class MockPtraceStrategyDecider : public PtraceStrategyDecider {
|
||||
MockPtraceStrategyDecider(PtraceStrategyDecider::Strategy strategy)
|
||||
: PtraceStrategyDecider(), strategy_(strategy) {}
|
||||
|
||||
MockPtraceStrategyDecider(const MockPtraceStrategyDecider&) = delete;
|
||||
MockPtraceStrategyDecider& operator=(const MockPtraceStrategyDecider&) =
|
||||
delete;
|
||||
|
||||
~MockPtraceStrategyDecider() {}
|
||||
|
||||
Strategy ChooseStrategy(int sock,
|
||||
@ -198,8 +206,6 @@ class MockPtraceStrategyDecider : public PtraceStrategyDecider {
|
||||
|
||||
private:
|
||||
Strategy strategy_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MockPtraceStrategyDecider);
|
||||
};
|
||||
|
||||
class ExceptionHandlerServerTest : public testing::TestWithParam<bool> {
|
||||
@ -211,6 +217,10 @@ class ExceptionHandlerServerTest : public testing::TestWithParam<bool> {
|
||||
sock_to_handler_(),
|
||||
use_multi_client_socket_(GetParam()) {}
|
||||
|
||||
ExceptionHandlerServerTest(const ExceptionHandlerServerTest&) = delete;
|
||||
ExceptionHandlerServerTest& operator=(const ExceptionHandlerServerTest&) =
|
||||
delete;
|
||||
|
||||
~ExceptionHandlerServerTest() = default;
|
||||
|
||||
int SockToHandler() { return sock_to_handler_.get(); }
|
||||
@ -228,6 +238,9 @@ class ExceptionHandlerServerTest : public testing::TestWithParam<bool> {
|
||||
CrashDumpTest(ExceptionHandlerServerTest* server_test, bool succeeds)
|
||||
: Multiprocess(), server_test_(server_test), succeeds_(succeeds) {}
|
||||
|
||||
CrashDumpTest(const CrashDumpTest&) = delete;
|
||||
CrashDumpTest& operator=(const CrashDumpTest&) = delete;
|
||||
|
||||
~CrashDumpTest() = default;
|
||||
|
||||
void MultiprocessParent() override {
|
||||
@ -267,8 +280,6 @@ class ExceptionHandlerServerTest : public testing::TestWithParam<bool> {
|
||||
private:
|
||||
ExceptionHandlerServerTest* server_test_;
|
||||
bool succeeds_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashDumpTest);
|
||||
};
|
||||
|
||||
void ExpectCrashDumpUsingStrategy(PtraceStrategyDecider::Strategy strategy,
|
||||
@ -303,8 +314,6 @@ class ExceptionHandlerServerTest : public testing::TestWithParam<bool> {
|
||||
ScopedFileHandle sock_to_handler_;
|
||||
int sock_to_client_;
|
||||
bool use_multi_client_socket_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerServerTest);
|
||||
};
|
||||
|
||||
TEST_P(ExceptionHandlerServerTest, ShutdownWithNoClients) {
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "client/crash_report_database.h"
|
||||
#include "handler/crash_report_upload_thread.h"
|
||||
#include "handler/user_stream_data_source.h"
|
||||
@ -59,6 +58,10 @@ class CrashReportExceptionHandler final
|
||||
const std::map<std::string, std::string>* process_annotations,
|
||||
const UserStreamDataSources* user_stream_data_sources);
|
||||
|
||||
CrashReportExceptionHandler(const CrashReportExceptionHandler&) = delete;
|
||||
CrashReportExceptionHandler& operator=(const CrashReportExceptionHandler&) =
|
||||
delete;
|
||||
|
||||
~CrashReportExceptionHandler();
|
||||
|
||||
// UniversalMachExcServer::Interface:
|
||||
@ -86,8 +89,6 @@ class CrashReportExceptionHandler final
|
||||
CrashReportUploadThread* upload_thread_; // weak
|
||||
const std::map<std::string, std::string>* process_annotations_; // weak
|
||||
const UserStreamDataSources* user_stream_data_sources_; // weak
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashReportExceptionHandler);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -50,6 +50,10 @@ class ExceptionHandlerServerRun : public UniversalMachExcServer::Interface,
|
||||
composite_mach_message_server_.AddHandler(¬ify_server_);
|
||||
}
|
||||
|
||||
ExceptionHandlerServerRun(const ExceptionHandlerServerRun&) = delete;
|
||||
ExceptionHandlerServerRun& operator=(const ExceptionHandlerServerRun&) =
|
||||
delete;
|
||||
|
||||
~ExceptionHandlerServerRun() {
|
||||
}
|
||||
|
||||
@ -183,8 +187,6 @@ class ExceptionHandlerServerRun : public UniversalMachExcServer::Interface,
|
||||
mach_port_t notify_port_; // weak
|
||||
bool running_;
|
||||
bool launchd_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerServerRun);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <mach/mach.h>
|
||||
|
||||
#include "base/mac/scoped_mach_port.h"
|
||||
#include "base/macros.h"
|
||||
#include "util/mach/exc_server_variants.h"
|
||||
|
||||
namespace crashpad {
|
||||
@ -37,6 +36,10 @@ class ExceptionHandlerServer {
|
||||
//! signal.
|
||||
ExceptionHandlerServer(base::mac::ScopedMachReceiveRight receive_port,
|
||||
bool launchd);
|
||||
|
||||
ExceptionHandlerServer(const ExceptionHandlerServer&) = delete;
|
||||
ExceptionHandlerServer& operator=(const ExceptionHandlerServer&) = delete;
|
||||
|
||||
~ExceptionHandlerServer();
|
||||
|
||||
//! \brief Runs the exception-handling server.
|
||||
@ -73,8 +76,6 @@ class ExceptionHandlerServer {
|
||||
base::mac::ScopedMachReceiveRight receive_port_;
|
||||
base::mac::ScopedMachReceiveRight notify_port_;
|
||||
bool launchd_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerServer);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "util/thread/stoppable.h"
|
||||
#include "util/thread/worker_thread.h"
|
||||
|
||||
@ -41,6 +40,10 @@ class PruneCrashReportThread : public WorkerThread::Delegate, public Stoppable {
|
||||
//! pruning.
|
||||
PruneCrashReportThread(CrashReportDatabase* database,
|
||||
std::unique_ptr<PruneCondition> condition);
|
||||
|
||||
PruneCrashReportThread(const PruneCrashReportThread&) = delete;
|
||||
PruneCrashReportThread& operator=(const PruneCrashReportThread&) = delete;
|
||||
|
||||
~PruneCrashReportThread();
|
||||
|
||||
// Stoppable:
|
||||
@ -70,8 +73,6 @@ class PruneCrashReportThread : public WorkerThread::Delegate, public Stoppable {
|
||||
WorkerThread thread_;
|
||||
std::unique_ptr<PruneCondition> condition_;
|
||||
CrashReportDatabase* database_; // weak
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(PruneCrashReportThread);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "handler/user_stream_data_source.h"
|
||||
#include "util/win/exception_handler_server.h"
|
||||
|
||||
@ -63,6 +62,10 @@ class CrashReportExceptionHandler final
|
||||
const std::vector<base::FilePath>* attachments,
|
||||
const UserStreamDataSources* user_stream_data_sources);
|
||||
|
||||
CrashReportExceptionHandler(const CrashReportExceptionHandler&) = delete;
|
||||
CrashReportExceptionHandler& operator=(const CrashReportExceptionHandler&) =
|
||||
delete;
|
||||
|
||||
~CrashReportExceptionHandler();
|
||||
|
||||
// ExceptionHandlerServer::Delegate:
|
||||
@ -81,8 +84,6 @@ class CrashReportExceptionHandler final
|
||||
const std::map<std::string, std::string>* process_annotations_; // weak
|
||||
const std::vector<base::FilePath>* attachments_; // weak
|
||||
const UserStreamDataSources* user_stream_data_sources_; // weak
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashReportExceptionHandler);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -36,6 +36,10 @@ namespace crashpad {
|
||||
class MinidumpAnnotationWriter final : public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpAnnotationWriter();
|
||||
|
||||
MinidumpAnnotationWriter(const MinidumpAnnotationWriter&) = delete;
|
||||
MinidumpAnnotationWriter& operator=(const MinidumpAnnotationWriter&) = delete;
|
||||
|
||||
~MinidumpAnnotationWriter();
|
||||
|
||||
//! \brief Initializes the annotation writer with data from an
|
||||
@ -62,8 +66,6 @@ class MinidumpAnnotationWriter final : public internal::MinidumpWritable {
|
||||
MinidumpAnnotation annotation_;
|
||||
internal::MinidumpUTF8StringWriter name_;
|
||||
MinidumpByteArrayWriter value_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpAnnotationWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpAnnotationList object in a minidump file,
|
||||
@ -71,6 +73,11 @@ class MinidumpAnnotationWriter final : public internal::MinidumpWritable {
|
||||
class MinidumpAnnotationListWriter final : public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpAnnotationListWriter();
|
||||
|
||||
MinidumpAnnotationListWriter(const MinidumpAnnotationListWriter&) = delete;
|
||||
MinidumpAnnotationListWriter& operator=(const MinidumpAnnotationListWriter&) =
|
||||
delete;
|
||||
|
||||
~MinidumpAnnotationListWriter();
|
||||
|
||||
//! \brief Initializes the annotation list writer with a list of
|
||||
@ -100,8 +107,6 @@ class MinidumpAnnotationListWriter final : public internal::MinidumpWritable {
|
||||
private:
|
||||
std::unique_ptr<MinidumpAnnotationList> minidump_list_;
|
||||
std::vector<std::unique_ptr<MinidumpAnnotationWriter>> objects_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpAnnotationListWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
|
||||
@ -29,6 +28,10 @@ namespace crashpad {
|
||||
class MinidumpByteArrayWriter final : public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpByteArrayWriter();
|
||||
|
||||
MinidumpByteArrayWriter(const MinidumpByteArrayWriter&) = delete;
|
||||
MinidumpByteArrayWriter& operator=(const MinidumpByteArrayWriter&) = delete;
|
||||
|
||||
~MinidumpByteArrayWriter() override;
|
||||
|
||||
//! \brief Sets the data to be written.
|
||||
@ -56,8 +59,6 @@ class MinidumpByteArrayWriter final : public internal::MinidumpWritable {
|
||||
private:
|
||||
std::unique_ptr<MinidumpByteArray> minidump_array_;
|
||||
std::vector<uint8_t> data_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpByteArrayWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_context.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
|
||||
@ -33,6 +32,9 @@ struct CPUContextX86_64;
|
||||
//! files.
|
||||
class MinidumpContextWriter : public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpContextWriter(const MinidumpContextWriter&) = delete;
|
||||
MinidumpContextWriter& operator=(const MinidumpContextWriter&) = delete;
|
||||
|
||||
~MinidumpContextWriter() override;
|
||||
|
||||
//! \brief Creates a MinidumpContextWriter based on \a context_snapshot.
|
||||
@ -59,15 +61,16 @@ class MinidumpContextWriter : public internal::MinidumpWritable {
|
||||
|
||||
// MinidumpWritable:
|
||||
size_t SizeOfObject() final;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpContextWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpContextX86 structure in a minidump file.
|
||||
class MinidumpContextX86Writer final : public MinidumpContextWriter {
|
||||
public:
|
||||
MinidumpContextX86Writer();
|
||||
|
||||
MinidumpContextX86Writer(const MinidumpContextX86Writer&) = delete;
|
||||
MinidumpContextX86Writer& operator=(const MinidumpContextX86Writer&) = delete;
|
||||
|
||||
~MinidumpContextX86Writer() override;
|
||||
|
||||
//! \brief Initializes the MinidumpContextX86 based on \a context_snapshot.
|
||||
@ -100,14 +103,17 @@ class MinidumpContextX86Writer final : public MinidumpContextWriter {
|
||||
|
||||
private:
|
||||
MinidumpContextX86 context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpContextX86Writer);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpContextAMD64 structure in a minidump file.
|
||||
class MinidumpContextAMD64Writer final : public MinidumpContextWriter {
|
||||
public:
|
||||
MinidumpContextAMD64Writer();
|
||||
|
||||
MinidumpContextAMD64Writer(const MinidumpContextAMD64Writer&) = delete;
|
||||
MinidumpContextAMD64Writer& operator=(const MinidumpContextAMD64Writer&) =
|
||||
delete;
|
||||
|
||||
~MinidumpContextAMD64Writer() override;
|
||||
|
||||
// Ensure proper alignment of heap-allocated objects. This should not be
|
||||
@ -151,14 +157,16 @@ class MinidumpContextAMD64Writer final : public MinidumpContextWriter {
|
||||
|
||||
private:
|
||||
MinidumpContextAMD64 context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpContextAMD64Writer);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpContextARM structure in a minidump file.
|
||||
class MinidumpContextARMWriter final : public MinidumpContextWriter {
|
||||
public:
|
||||
MinidumpContextARMWriter();
|
||||
|
||||
MinidumpContextARMWriter(const MinidumpContextARMWriter&) = delete;
|
||||
MinidumpContextARMWriter& operator=(const MinidumpContextARMWriter&) = delete;
|
||||
|
||||
~MinidumpContextARMWriter() override;
|
||||
|
||||
//! \brief Initializes the MinidumpContextARM based on \a context_snapshot.
|
||||
@ -191,14 +199,17 @@ class MinidumpContextARMWriter final : public MinidumpContextWriter {
|
||||
|
||||
private:
|
||||
MinidumpContextARM context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpContextARMWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpContextARM64 structure in a minidump file.
|
||||
class MinidumpContextARM64Writer final : public MinidumpContextWriter {
|
||||
public:
|
||||
MinidumpContextARM64Writer();
|
||||
|
||||
MinidumpContextARM64Writer(const MinidumpContextARM64Writer&) = delete;
|
||||
MinidumpContextARM64Writer& operator=(const MinidumpContextARM64Writer&) =
|
||||
delete;
|
||||
|
||||
~MinidumpContextARM64Writer() override;
|
||||
|
||||
//! \brief Initializes the MinidumpContextARM64 based on \a context_snapshot.
|
||||
@ -231,14 +242,17 @@ class MinidumpContextARM64Writer final : public MinidumpContextWriter {
|
||||
|
||||
private:
|
||||
MinidumpContextARM64 context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpContextARM64Writer);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpContextMIPS structure in a minidump file.
|
||||
class MinidumpContextMIPSWriter final : public MinidumpContextWriter {
|
||||
public:
|
||||
MinidumpContextMIPSWriter();
|
||||
|
||||
MinidumpContextMIPSWriter(const MinidumpContextMIPSWriter&) = delete;
|
||||
MinidumpContextMIPSWriter& operator=(const MinidumpContextMIPSWriter&) =
|
||||
delete;
|
||||
|
||||
~MinidumpContextMIPSWriter() override;
|
||||
|
||||
//! \brief Initializes the MinidumpContextMIPS based on \a context_snapshot.
|
||||
@ -271,14 +285,17 @@ class MinidumpContextMIPSWriter final : public MinidumpContextWriter {
|
||||
|
||||
private:
|
||||
MinidumpContextMIPS context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpContextMIPSWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpContextMIPS64 structure in a minidump file.
|
||||
class MinidumpContextMIPS64Writer final : public MinidumpContextWriter {
|
||||
public:
|
||||
MinidumpContextMIPS64Writer();
|
||||
|
||||
MinidumpContextMIPS64Writer(const MinidumpContextMIPS64Writer&) = delete;
|
||||
MinidumpContextMIPS64Writer& operator=(const MinidumpContextMIPS64Writer&) =
|
||||
delete;
|
||||
|
||||
~MinidumpContextMIPS64Writer() override;
|
||||
|
||||
//! \brief Initializes the MinidumpContextMIPS based on \a context_snapshot.
|
||||
@ -311,8 +328,6 @@ class MinidumpContextMIPS64Writer final : public MinidumpContextWriter {
|
||||
|
||||
private:
|
||||
MinidumpContextMIPS64 context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpContextMIPS64Writer);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "util/misc/uuid.h"
|
||||
@ -35,6 +34,11 @@ class ProcessSnapshot;
|
||||
class MinidumpCrashpadInfoWriter final : public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpCrashpadInfoWriter();
|
||||
|
||||
MinidumpCrashpadInfoWriter(const MinidumpCrashpadInfoWriter&) = delete;
|
||||
MinidumpCrashpadInfoWriter& operator=(const MinidumpCrashpadInfoWriter&) =
|
||||
delete;
|
||||
|
||||
~MinidumpCrashpadInfoWriter() override;
|
||||
|
||||
//! \brief Initializes MinidumpCrashpadInfo based on \a process_snapshot.
|
||||
@ -105,8 +109,6 @@ class MinidumpCrashpadInfoWriter final : public internal::MinidumpStreamWriter {
|
||||
MinidumpCrashpadInfo crashpad_info_;
|
||||
std::unique_ptr<MinidumpSimpleStringDictionaryWriter> simple_annotations_;
|
||||
std::unique_ptr<MinidumpModuleCrashpadInfoListWriter> module_list_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpCrashpadInfoWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_thread_id_map.h"
|
||||
|
||||
@ -37,6 +36,10 @@ class MinidumpMemoryListWriter;
|
||||
class MinidumpExceptionWriter final : public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpExceptionWriter();
|
||||
|
||||
MinidumpExceptionWriter(const MinidumpExceptionWriter&) = delete;
|
||||
MinidumpExceptionWriter& operator=(const MinidumpExceptionWriter&) = delete;
|
||||
|
||||
~MinidumpExceptionWriter() override;
|
||||
|
||||
//! \brief Initializes the MINIDUMP_EXCEPTION_STREAM based on \a
|
||||
@ -117,8 +120,6 @@ class MinidumpExceptionWriter final : public internal::MinidumpStreamWriter {
|
||||
private:
|
||||
MINIDUMP_EXCEPTION_STREAM exception_;
|
||||
std::unique_ptr<MinidumpContextWriter> context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpExceptionWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -41,6 +40,10 @@ class MinidumpUserExtensionStreamDataSource;
|
||||
class MinidumpFileWriter final : public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpFileWriter();
|
||||
|
||||
MinidumpFileWriter(const MinidumpFileWriter&) = delete;
|
||||
MinidumpFileWriter& operator=(const MinidumpFileWriter&) = delete;
|
||||
|
||||
~MinidumpFileWriter() override;
|
||||
|
||||
//! \brief Initializes the MinidumpFileWriter and populates it with
|
||||
@ -163,8 +166,6 @@ class MinidumpFileWriter final : public internal::MinidumpWritable {
|
||||
|
||||
// Protects against multiple streams with the same ID being added.
|
||||
std::set<MinidumpStreamType> stream_types_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpFileWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -64,6 +64,9 @@ class TestStream final : public internal::MinidumpStreamWriter {
|
||||
uint8_t stream_value)
|
||||
: stream_data_(stream_size, stream_value), stream_type_(stream_type) {}
|
||||
|
||||
TestStream(const TestStream&) = delete;
|
||||
TestStream& operator=(const TestStream&) = delete;
|
||||
|
||||
~TestStream() override {}
|
||||
|
||||
// MinidumpStreamWriter:
|
||||
@ -86,13 +89,15 @@ class TestStream final : public internal::MinidumpStreamWriter {
|
||||
private:
|
||||
std::string stream_data_;
|
||||
MinidumpStreamType stream_type_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestStream);
|
||||
};
|
||||
|
||||
class StringFileOutputStream : public OutputStreamInterface {
|
||||
public:
|
||||
StringFileOutputStream() = default;
|
||||
|
||||
StringFileOutputStream(const StringFileOutputStream&) = delete;
|
||||
StringFileOutputStream& operator=(const StringFileOutputStream&) = delete;
|
||||
|
||||
~StringFileOutputStream() override = default;
|
||||
bool Write(const uint8_t* data, size_t size) override {
|
||||
return string_file_.Write(data, size);
|
||||
@ -102,8 +107,6 @@ class StringFileOutputStream : public OutputStreamInterface {
|
||||
|
||||
private:
|
||||
StringFile string_file_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(StringFileOutputStream);
|
||||
};
|
||||
|
||||
TEST(MinidumpFileWriter, OneStream) {
|
||||
|
@ -43,6 +43,10 @@ namespace crashpad {
|
||||
class MinidumpHandleDataWriter final : public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpHandleDataWriter();
|
||||
|
||||
MinidumpHandleDataWriter(const MinidumpHandleDataWriter&) = delete;
|
||||
MinidumpHandleDataWriter& operator=(const MinidumpHandleDataWriter&) = delete;
|
||||
|
||||
~MinidumpHandleDataWriter() override;
|
||||
|
||||
//! \brief Adds a MINIDUMP_HANDLE_DESCRIPTOR for each handle in \a
|
||||
@ -68,8 +72,6 @@ class MinidumpHandleDataWriter final : public internal::MinidumpStreamWriter {
|
||||
MINIDUMP_HANDLE_DATA_STREAM handle_data_stream_base_;
|
||||
std::vector<MINIDUMP_HANDLE_DESCRIPTOR> handle_descriptors_;
|
||||
std::map<std::string, internal::MinidumpUTF16StringWriter*> strings_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpHandleDataWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
|
||||
@ -39,6 +38,11 @@ class MinidumpMemoryInfoListWriter final
|
||||
: public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpMemoryInfoListWriter();
|
||||
|
||||
MinidumpMemoryInfoListWriter(const MinidumpMemoryInfoListWriter&) = delete;
|
||||
MinidumpMemoryInfoListWriter& operator=(const MinidumpMemoryInfoListWriter&) =
|
||||
delete;
|
||||
|
||||
~MinidumpMemoryInfoListWriter() override;
|
||||
|
||||
//! \brief Initializes a MINIDUMP_MEMORY_INFO_LIST based on \a memory_map.
|
||||
@ -63,8 +67,6 @@ class MinidumpMemoryInfoListWriter final
|
||||
private:
|
||||
MINIDUMP_MEMORY_INFO_LIST memory_info_list_base_;
|
||||
std::vector<MINIDUMP_MEMORY_INFO> items_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpMemoryInfoListWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
#include "snapshot/memory_snapshot.h"
|
||||
@ -37,6 +36,11 @@ class SnapshotMinidumpMemoryWriter : public internal::MinidumpWritable,
|
||||
public MemorySnapshot::Delegate {
|
||||
public:
|
||||
explicit SnapshotMinidumpMemoryWriter(const MemorySnapshot* memory_snapshot);
|
||||
|
||||
SnapshotMinidumpMemoryWriter(const SnapshotMinidumpMemoryWriter&) = delete;
|
||||
SnapshotMinidumpMemoryWriter& operator=(const SnapshotMinidumpMemoryWriter&) =
|
||||
delete;
|
||||
|
||||
~SnapshotMinidumpMemoryWriter() override;
|
||||
|
||||
//! \brief Returns a MINIDUMP_MEMORY_DESCRIPTOR referencing the data that this
|
||||
@ -111,8 +115,6 @@ class SnapshotMinidumpMemoryWriter : public internal::MinidumpWritable,
|
||||
std::vector<MINIDUMP_MEMORY_DESCRIPTOR*> registered_memory_descriptors_;
|
||||
const MemorySnapshot* memory_snapshot_;
|
||||
FileWriterInterface* file_writer_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SnapshotMinidumpMemoryWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MINIDUMP_MEMORY_LIST stream in a minidump file,
|
||||
@ -120,6 +122,10 @@ class SnapshotMinidumpMemoryWriter : public internal::MinidumpWritable,
|
||||
class MinidumpMemoryListWriter final : public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpMemoryListWriter();
|
||||
|
||||
MinidumpMemoryListWriter(const MinidumpMemoryListWriter&) = delete;
|
||||
MinidumpMemoryListWriter& operator=(const MinidumpMemoryListWriter&) = delete;
|
||||
|
||||
~MinidumpMemoryListWriter() override;
|
||||
|
||||
//! \brief Adds a concrete initialized SnapshotMinidumpMemoryWriter for each
|
||||
@ -197,8 +203,6 @@ class MinidumpMemoryListWriter final : public internal::MinidumpStreamWriter {
|
||||
snapshots_created_during_merge_;
|
||||
std::vector<SnapshotMinidumpMemoryWriter*> all_memory_writers_; // weak
|
||||
MINIDUMP_MEMORY_LIST memory_list_base_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpMemoryListWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -235,6 +235,9 @@ class TestMemoryStream final : public internal::MinidumpStreamWriter {
|
||||
TestMemoryStream(uint64_t base_address, size_t size, uint8_t value)
|
||||
: MinidumpStreamWriter(), memory_(base_address, size, value) {}
|
||||
|
||||
TestMemoryStream(const TestMemoryStream&) = delete;
|
||||
TestMemoryStream& operator=(const TestMemoryStream&) = delete;
|
||||
|
||||
~TestMemoryStream() override {}
|
||||
|
||||
TestMinidumpMemoryWriter* memory() {
|
||||
@ -266,8 +269,6 @@ class TestMemoryStream final : public internal::MinidumpStreamWriter {
|
||||
|
||||
private:
|
||||
TestMinidumpMemoryWriter memory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestMemoryStream);
|
||||
};
|
||||
|
||||
TEST(MinidumpMemoryWriter, ExtraMemory) {
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -60,6 +59,10 @@ std::string MinidumpMiscInfoDebugBuildString();
|
||||
class MinidumpMiscInfoWriter final : public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpMiscInfoWriter();
|
||||
|
||||
MinidumpMiscInfoWriter(const MinidumpMiscInfoWriter&) = delete;
|
||||
MinidumpMiscInfoWriter& operator=(const MinidumpMiscInfoWriter&) = delete;
|
||||
|
||||
~MinidumpMiscInfoWriter() override;
|
||||
|
||||
//! \brief Initializes MINIDUMP_MISC_INFO_N based on \a process_snapshot.
|
||||
@ -135,8 +138,6 @@ class MinidumpMiscInfoWriter final : public internal::MinidumpStreamWriter {
|
||||
|
||||
MINIDUMP_MISC_INFO_N misc_info_;
|
||||
bool has_xstate_data_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpMiscInfoWriter);
|
||||
};
|
||||
|
||||
//! \brief Conversion functions from a native UTF16 C-string to a char16_t
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_string_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -38,6 +37,12 @@ class MinidumpModuleCrashpadInfoWriter final
|
||||
: public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpModuleCrashpadInfoWriter();
|
||||
|
||||
MinidumpModuleCrashpadInfoWriter(const MinidumpModuleCrashpadInfoWriter&) =
|
||||
delete;
|
||||
MinidumpModuleCrashpadInfoWriter& operator=(
|
||||
const MinidumpModuleCrashpadInfoWriter&) = delete;
|
||||
|
||||
~MinidumpModuleCrashpadInfoWriter() override;
|
||||
|
||||
//! \brief Initializes MinidumpModuleCrashpadInfo based on \a module_snapshot.
|
||||
@ -107,8 +112,6 @@ class MinidumpModuleCrashpadInfoWriter final
|
||||
std::unique_ptr<MinidumpUTF8StringListWriter> list_annotations_;
|
||||
std::unique_ptr<MinidumpSimpleStringDictionaryWriter> simple_annotations_;
|
||||
std::unique_ptr<MinidumpAnnotationListWriter> annotation_objects_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCrashpadInfoWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpModuleCrashpadInfoList object in a minidump
|
||||
@ -117,6 +120,12 @@ class MinidumpModuleCrashpadInfoListWriter final
|
||||
: public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpModuleCrashpadInfoListWriter();
|
||||
|
||||
MinidumpModuleCrashpadInfoListWriter(
|
||||
const MinidumpModuleCrashpadInfoListWriter&) = delete;
|
||||
MinidumpModuleCrashpadInfoListWriter& operator=(
|
||||
const MinidumpModuleCrashpadInfoListWriter&) = delete;
|
||||
|
||||
~MinidumpModuleCrashpadInfoListWriter() override;
|
||||
|
||||
//! \brief Adds an initialized MinidumpModuleCrashpadInfo for modules in \a
|
||||
@ -171,8 +180,6 @@ class MinidumpModuleCrashpadInfoListWriter final
|
||||
module_crashpad_infos_;
|
||||
std::vector<MinidumpModuleCrashpadInfoLink> module_crashpad_info_links_;
|
||||
MinidumpModuleCrashpadInfoList module_crashpad_info_list_base_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCrashpadInfoListWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -42,13 +41,15 @@ class MinidumpUTF16StringWriter;
|
||||
//! MINIDUMP_MODULE::CvRecord in minidump files.
|
||||
class MinidumpModuleCodeViewRecordWriter : public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpModuleCodeViewRecordWriter(
|
||||
const MinidumpModuleCodeViewRecordWriter&) = delete;
|
||||
MinidumpModuleCodeViewRecordWriter& operator=(
|
||||
const MinidumpModuleCodeViewRecordWriter&) = delete;
|
||||
|
||||
~MinidumpModuleCodeViewRecordWriter() override;
|
||||
|
||||
protected:
|
||||
MinidumpModuleCodeViewRecordWriter() : MinidumpWritable() {}
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordWriter);
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
@ -59,6 +60,11 @@ template <typename CodeViewRecordType>
|
||||
class MinidumpModuleCodeViewRecordPDBLinkWriter
|
||||
: public MinidumpModuleCodeViewRecordWriter {
|
||||
public:
|
||||
MinidumpModuleCodeViewRecordPDBLinkWriter(
|
||||
const MinidumpModuleCodeViewRecordPDBLinkWriter&) = delete;
|
||||
MinidumpModuleCodeViewRecordPDBLinkWriter& operator=(
|
||||
const MinidumpModuleCodeViewRecordPDBLinkWriter&) = delete;
|
||||
|
||||
//! \brief Sets the name of the `.pdb` file being linked to.
|
||||
void SetPDBName(const std::string& pdb_name) { pdb_name_ = pdb_name; }
|
||||
|
||||
@ -79,8 +85,6 @@ class MinidumpModuleCodeViewRecordPDBLinkWriter
|
||||
private:
|
||||
CodeViewRecordType codeview_record_;
|
||||
std::string pdb_name_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordPDBLinkWriter);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
@ -97,13 +101,15 @@ class MinidumpModuleCodeViewRecordPDB20Writer final
|
||||
: internal::MinidumpModuleCodeViewRecordPDBLinkWriter<
|
||||
CodeViewRecordPDB20>() {}
|
||||
|
||||
MinidumpModuleCodeViewRecordPDB20Writer(
|
||||
const MinidumpModuleCodeViewRecordPDB20Writer&) = delete;
|
||||
MinidumpModuleCodeViewRecordPDB20Writer& operator=(
|
||||
const MinidumpModuleCodeViewRecordPDB20Writer&) = delete;
|
||||
|
||||
~MinidumpModuleCodeViewRecordPDB20Writer() override;
|
||||
|
||||
//! \brief Sets CodeViewRecordPDB20::timestamp and CodeViewRecordPDB20::age.
|
||||
void SetTimestampAndAge(time_t timestamp, uint32_t age);
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordPDB20Writer);
|
||||
};
|
||||
|
||||
//! \brief The writer for a CodeViewRecordPDB70 object in a minidump file.
|
||||
@ -115,6 +121,11 @@ class MinidumpModuleCodeViewRecordPDB70Writer final
|
||||
: internal::MinidumpModuleCodeViewRecordPDBLinkWriter<
|
||||
CodeViewRecordPDB70>() {}
|
||||
|
||||
MinidumpModuleCodeViewRecordPDB70Writer(
|
||||
const MinidumpModuleCodeViewRecordPDB70Writer&) = delete;
|
||||
MinidumpModuleCodeViewRecordPDB70Writer& operator=(
|
||||
const MinidumpModuleCodeViewRecordPDB70Writer&) = delete;
|
||||
|
||||
~MinidumpModuleCodeViewRecordPDB70Writer() override;
|
||||
|
||||
//! \brief Initializes the CodeViewRecordPDB70 based on \a module_snapshot.
|
||||
@ -131,9 +142,6 @@ class MinidumpModuleCodeViewRecordPDB70Writer final
|
||||
codeview_record()->uuid = uuid;
|
||||
codeview_record()->age = age;
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordPDB70Writer);
|
||||
};
|
||||
|
||||
//! \brief The writer for a CodeViewRecordBuildID object in a minidump file.
|
||||
@ -141,6 +149,12 @@ class MinidumpModuleCodeViewRecordBuildIDWriter final
|
||||
: public MinidumpModuleCodeViewRecordWriter {
|
||||
public:
|
||||
MinidumpModuleCodeViewRecordBuildIDWriter();
|
||||
|
||||
MinidumpModuleCodeViewRecordBuildIDWriter(
|
||||
const MinidumpModuleCodeViewRecordBuildIDWriter&) = delete;
|
||||
MinidumpModuleCodeViewRecordBuildIDWriter& operator=(
|
||||
const MinidumpModuleCodeViewRecordBuildIDWriter&) = delete;
|
||||
|
||||
~MinidumpModuleCodeViewRecordBuildIDWriter() override;
|
||||
|
||||
//! \brief Sets the build ID used for symbol lookup.
|
||||
@ -152,8 +166,6 @@ class MinidumpModuleCodeViewRecordBuildIDWriter final
|
||||
bool WriteObject(FileWriterInterface* file_writer) override;
|
||||
|
||||
std::vector<uint8_t> build_id_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordBuildIDWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for an IMAGE_DEBUG_MISC object in a minidump file.
|
||||
@ -163,6 +175,12 @@ class MinidumpModuleMiscDebugRecordWriter final
|
||||
: public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpModuleMiscDebugRecordWriter();
|
||||
|
||||
MinidumpModuleMiscDebugRecordWriter(
|
||||
const MinidumpModuleMiscDebugRecordWriter&) = delete;
|
||||
MinidumpModuleMiscDebugRecordWriter& operator=(
|
||||
const MinidumpModuleMiscDebugRecordWriter&) = delete;
|
||||
|
||||
~MinidumpModuleMiscDebugRecordWriter() override;
|
||||
|
||||
//! \brief Sets IMAGE_DEBUG_MISC::DataType.
|
||||
@ -189,8 +207,6 @@ class MinidumpModuleMiscDebugRecordWriter final
|
||||
IMAGE_DEBUG_MISC image_debug_misc_;
|
||||
std::string data_;
|
||||
std::u16string data_utf16_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleMiscDebugRecordWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MINIDUMP_MODULE object in a minidump file.
|
||||
@ -202,6 +218,10 @@ class MinidumpModuleMiscDebugRecordWriter final
|
||||
class MinidumpModuleWriter final : public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpModuleWriter();
|
||||
|
||||
MinidumpModuleWriter(const MinidumpModuleWriter&) = delete;
|
||||
MinidumpModuleWriter& operator=(const MinidumpModuleWriter&) = delete;
|
||||
|
||||
~MinidumpModuleWriter() override;
|
||||
|
||||
//! \brief Initializes the MINIDUMP_MODULE based on \a module_snapshot.
|
||||
@ -320,8 +340,6 @@ class MinidumpModuleWriter final : public internal::MinidumpWritable {
|
||||
std::unique_ptr<internal::MinidumpUTF16StringWriter> name_;
|
||||
std::unique_ptr<MinidumpModuleCodeViewRecordWriter> codeview_record_;
|
||||
std::unique_ptr<MinidumpModuleMiscDebugRecordWriter> misc_debug_record_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MINIDUMP_MODULE_LIST stream in a minidump file,
|
||||
@ -329,6 +347,10 @@ class MinidumpModuleWriter final : public internal::MinidumpWritable {
|
||||
class MinidumpModuleListWriter final : public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpModuleListWriter();
|
||||
|
||||
MinidumpModuleListWriter(const MinidumpModuleListWriter&) = delete;
|
||||
MinidumpModuleListWriter& operator=(const MinidumpModuleListWriter&) = delete;
|
||||
|
||||
~MinidumpModuleListWriter() override;
|
||||
|
||||
//! \brief Adds an initialized MINIDUMP_MODULE for each module in \a
|
||||
@ -363,8 +385,6 @@ class MinidumpModuleListWriter final : public internal::MinidumpStreamWriter {
|
||||
private:
|
||||
std::vector<std::unique_ptr<MinidumpModuleWriter>> modules_;
|
||||
MINIDUMP_MODULE_LIST module_list_base_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpModuleListWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
|
||||
@ -33,6 +32,10 @@ namespace internal {
|
||||
class MinidumpRVAListWriter : public MinidumpWritable {
|
||||
protected:
|
||||
MinidumpRVAListWriter();
|
||||
|
||||
MinidumpRVAListWriter(const MinidumpRVAListWriter&) = delete;
|
||||
MinidumpRVAListWriter& operator=(const MinidumpRVAListWriter&) = delete;
|
||||
|
||||
~MinidumpRVAListWriter() override;
|
||||
|
||||
//! \brief Adds an ::RVA referencing an MinidumpWritable to the
|
||||
@ -68,8 +71,6 @@ class MinidumpRVAListWriter : public MinidumpWritable {
|
||||
std::unique_ptr<MinidumpRVAList> rva_list_base_;
|
||||
std::vector<std::unique_ptr<MinidumpWritable>> children_;
|
||||
std::vector<RVA> child_rvas_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpRVAListWriter);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -31,15 +31,17 @@ namespace {
|
||||
class TestMinidumpRVAListWriter final : public internal::MinidumpRVAListWriter {
|
||||
public:
|
||||
TestMinidumpRVAListWriter() : MinidumpRVAListWriter() {}
|
||||
|
||||
TestMinidumpRVAListWriter(const TestMinidumpRVAListWriter&) = delete;
|
||||
TestMinidumpRVAListWriter& operator=(const TestMinidumpRVAListWriter&) =
|
||||
delete;
|
||||
|
||||
~TestMinidumpRVAListWriter() override {}
|
||||
|
||||
void AddChild(uint32_t value) {
|
||||
auto child = std::make_unique<TestUInt32MinidumpWritable>(value);
|
||||
MinidumpRVAListWriter::AddChild(std::move(child));
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(TestMinidumpRVAListWriter);
|
||||
};
|
||||
|
||||
TEST(MinidumpRVAListWriter, Empty) {
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_string_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -41,6 +40,12 @@ class MinidumpSimpleStringDictionaryEntryWriter final
|
||||
: public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpSimpleStringDictionaryEntryWriter();
|
||||
|
||||
MinidumpSimpleStringDictionaryEntryWriter(
|
||||
const MinidumpSimpleStringDictionaryEntryWriter&) = delete;
|
||||
MinidumpSimpleStringDictionaryEntryWriter& operator=(
|
||||
const MinidumpSimpleStringDictionaryEntryWriter&) = delete;
|
||||
|
||||
~MinidumpSimpleStringDictionaryEntryWriter() override;
|
||||
|
||||
//! \brief Returns a MinidumpSimpleStringDictionaryEntry referencing this
|
||||
@ -76,8 +81,6 @@ class MinidumpSimpleStringDictionaryEntryWriter final
|
||||
struct MinidumpSimpleStringDictionaryEntry entry_;
|
||||
internal::MinidumpUTF8StringWriter key_;
|
||||
internal::MinidumpUTF8StringWriter value_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpSimpleStringDictionaryEntryWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpSimpleStringDictionary object in a minidump
|
||||
@ -89,6 +92,12 @@ class MinidumpSimpleStringDictionaryWriter final
|
||||
: public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpSimpleStringDictionaryWriter();
|
||||
|
||||
MinidumpSimpleStringDictionaryWriter(
|
||||
const MinidumpSimpleStringDictionaryWriter&) = delete;
|
||||
MinidumpSimpleStringDictionaryWriter& operator=(
|
||||
const MinidumpSimpleStringDictionaryWriter&) = delete;
|
||||
|
||||
~MinidumpSimpleStringDictionaryWriter() override;
|
||||
|
||||
//! \brief Adds an initialized MinidumpSimpleStringDictionaryEntryWriter for
|
||||
@ -138,8 +147,6 @@ class MinidumpSimpleStringDictionaryWriter final
|
||||
|
||||
std::unique_ptr<MinidumpSimpleStringDictionary>
|
||||
simple_string_dictionary_base_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpSimpleStringDictionaryWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
|
||||
@ -32,6 +31,9 @@ namespace internal {
|
||||
//! MinidumpFileWriter object.
|
||||
class MinidumpStreamWriter : public MinidumpWritable {
|
||||
public:
|
||||
MinidumpStreamWriter(const MinidumpStreamWriter&) = delete;
|
||||
MinidumpStreamWriter& operator=(const MinidumpStreamWriter&) = delete;
|
||||
|
||||
~MinidumpStreamWriter() override;
|
||||
|
||||
//! \brief Returns an object’s stream type.
|
||||
@ -56,8 +58,6 @@ class MinidumpStreamWriter : public MinidumpWritable {
|
||||
|
||||
private:
|
||||
MINIDUMP_DIRECTORY directory_list_entry_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpStreamWriter);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_rva_list_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -55,6 +54,10 @@ template <typename Traits>
|
||||
class MinidumpStringWriter : public MinidumpWritable {
|
||||
public:
|
||||
MinidumpStringWriter();
|
||||
|
||||
MinidumpStringWriter(const MinidumpStringWriter&) = delete;
|
||||
MinidumpStringWriter& operator=(const MinidumpStringWriter&) = delete;
|
||||
|
||||
~MinidumpStringWriter() override;
|
||||
|
||||
protected:
|
||||
@ -78,8 +81,6 @@ class MinidumpStringWriter : public MinidumpWritable {
|
||||
private:
|
||||
std::unique_ptr<MinidumpStringType> string_base_;
|
||||
StringType string_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpStringWriter);
|
||||
};
|
||||
|
||||
//! \brief Writes a variable-length UTF-16-encoded MINIDUMP_STRING to a minidump
|
||||
@ -91,6 +92,11 @@ class MinidumpUTF16StringWriter final
|
||||
: public MinidumpStringWriter<MinidumpStringWriterUTF16Traits> {
|
||||
public:
|
||||
MinidumpUTF16StringWriter() : MinidumpStringWriter() {}
|
||||
|
||||
MinidumpUTF16StringWriter(const MinidumpUTF16StringWriter&) = delete;
|
||||
MinidumpUTF16StringWriter& operator=(const MinidumpUTF16StringWriter&) =
|
||||
delete;
|
||||
|
||||
~MinidumpUTF16StringWriter() override;
|
||||
|
||||
//! \brief Converts a UTF-8 string to UTF-16 and sets it as the string to be
|
||||
@ -98,9 +104,6 @@ class MinidumpUTF16StringWriter final
|
||||
//!
|
||||
//! \note Valid in #kStateMutable.
|
||||
void SetUTF8(const std::string& string_utf8);
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpUTF16StringWriter);
|
||||
};
|
||||
|
||||
//! \brief Writes a variable-length UTF-8-encoded MinidumpUTF8String to a
|
||||
@ -112,6 +115,10 @@ class MinidumpUTF8StringWriter final
|
||||
: public MinidumpStringWriter<MinidumpStringWriterUTF8Traits> {
|
||||
public:
|
||||
MinidumpUTF8StringWriter() : MinidumpStringWriter() {}
|
||||
|
||||
MinidumpUTF8StringWriter(const MinidumpUTF8StringWriter&) = delete;
|
||||
MinidumpUTF8StringWriter& operator=(const MinidumpUTF8StringWriter&) = delete;
|
||||
|
||||
~MinidumpUTF8StringWriter() override;
|
||||
|
||||
//! \brief Sets the string to be written.
|
||||
@ -123,9 +130,6 @@ class MinidumpUTF8StringWriter final
|
||||
//!
|
||||
//! \note Valid in any state.
|
||||
const std::string& UTF8() const { return string(); }
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpUTF8StringWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MinidumpRVAList object in a minidump file,
|
||||
@ -134,6 +138,10 @@ template <typename MinidumpStringWriterType>
|
||||
class MinidumpStringListWriter final : public MinidumpRVAListWriter {
|
||||
public:
|
||||
MinidumpStringListWriter();
|
||||
|
||||
MinidumpStringListWriter(const MinidumpStringListWriter&) = delete;
|
||||
MinidumpStringListWriter& operator=(const MinidumpStringListWriter&) = delete;
|
||||
|
||||
~MinidumpStringListWriter() override;
|
||||
|
||||
//! \brief Adds a new \a Traits::MinidumpStringWriterType for each element in
|
||||
@ -166,9 +174,6 @@ class MinidumpStringListWriter final : public MinidumpRVAListWriter {
|
||||
//!
|
||||
//! \return `true` if the object is useful, `false` otherwise.
|
||||
bool IsUseful() const;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpStringListWriter);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -41,6 +40,10 @@ class MinidumpUTF16StringWriter;
|
||||
class MinidumpSystemInfoWriter final : public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpSystemInfoWriter();
|
||||
|
||||
MinidumpSystemInfoWriter(const MinidumpSystemInfoWriter&) = delete;
|
||||
MinidumpSystemInfoWriter& operator=(const MinidumpSystemInfoWriter&) = delete;
|
||||
|
||||
~MinidumpSystemInfoWriter() override;
|
||||
|
||||
//! \brief Initializes MINIDUMP_SYSTEM_INFO based on \a system_snapshot.
|
||||
@ -188,8 +191,6 @@ class MinidumpSystemInfoWriter final : public internal::MinidumpStreamWriter {
|
||||
private:
|
||||
MINIDUMP_SYSTEM_INFO system_info_;
|
||||
std::unique_ptr<internal::MinidumpUTF16StringWriter> csd_version_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpSystemInfoWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/cxx17_backports.h"
|
||||
#include "base/macros.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "snapshot/test/test_thread_snapshot.h"
|
||||
|
||||
@ -35,6 +34,9 @@ class MinidumpThreadIDMapTest : public testing::Test {
|
||||
test_thread_snapshots_() {
|
||||
}
|
||||
|
||||
MinidumpThreadIDMapTest(const MinidumpThreadIDMapTest&) = delete;
|
||||
MinidumpThreadIDMapTest& operator=(const MinidumpThreadIDMapTest&) = delete;
|
||||
|
||||
~MinidumpThreadIDMapTest() override {}
|
||||
|
||||
// testing::Test:
|
||||
@ -72,8 +74,6 @@ class MinidumpThreadIDMapTest : public testing::Test {
|
||||
private:
|
||||
std::vector<const ThreadSnapshot*> thread_snapshots_;
|
||||
TestThreadSnapshot test_thread_snapshots_[5];
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpThreadIDMapTest);
|
||||
};
|
||||
|
||||
TEST_F(MinidumpThreadIDMapTest, NoThreads) {
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_thread_id_map.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -44,6 +43,10 @@ class ThreadSnapshot;
|
||||
class MinidumpThreadWriter final : public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpThreadWriter();
|
||||
|
||||
MinidumpThreadWriter(const MinidumpThreadWriter&) = delete;
|
||||
MinidumpThreadWriter& operator=(const MinidumpThreadWriter&) = delete;
|
||||
|
||||
~MinidumpThreadWriter() override;
|
||||
|
||||
//! \brief Initializes the MINIDUMP_THREAD based on \a thread_snapshot.
|
||||
@ -131,8 +134,6 @@ class MinidumpThreadWriter final : public internal::MinidumpWritable {
|
||||
MINIDUMP_THREAD thread_;
|
||||
std::unique_ptr<SnapshotMinidumpMemoryWriter> stack_;
|
||||
std::unique_ptr<MinidumpContextWriter> context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpThreadWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MINIDUMP_THREAD_LIST stream in a minidump file,
|
||||
@ -140,6 +141,10 @@ class MinidumpThreadWriter final : public internal::MinidumpWritable {
|
||||
class MinidumpThreadListWriter final : public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpThreadListWriter();
|
||||
|
||||
MinidumpThreadListWriter(const MinidumpThreadListWriter&) = delete;
|
||||
MinidumpThreadListWriter& operator=(const MinidumpThreadListWriter&) = delete;
|
||||
|
||||
~MinidumpThreadListWriter() override;
|
||||
|
||||
//! \brief Adds an initialized MINIDUMP_THREAD for each thread in \a
|
||||
@ -205,8 +210,6 @@ class MinidumpThreadListWriter final : public internal::MinidumpStreamWriter {
|
||||
std::vector<std::unique_ptr<MinidumpThreadWriter>> threads_;
|
||||
MinidumpMemoryListWriter* memory_list_writer_; // weak
|
||||
MINIDUMP_THREAD_LIST thread_list_base_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpThreadListWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_string_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -41,6 +40,11 @@ namespace crashpad {
|
||||
class MinidumpUnloadedModuleWriter final : public internal::MinidumpWritable {
|
||||
public:
|
||||
MinidumpUnloadedModuleWriter();
|
||||
|
||||
MinidumpUnloadedModuleWriter(const MinidumpUnloadedModuleWriter&) = delete;
|
||||
MinidumpUnloadedModuleWriter& operator=(const MinidumpUnloadedModuleWriter&) =
|
||||
delete;
|
||||
|
||||
~MinidumpUnloadedModuleWriter() override;
|
||||
|
||||
//! \brief Initializes the MINIDUMP_UNLOADED_MODULE based on \a
|
||||
@ -97,8 +101,6 @@ class MinidumpUnloadedModuleWriter final : public internal::MinidumpWritable {
|
||||
private:
|
||||
MINIDUMP_UNLOADED_MODULE unloaded_module_;
|
||||
std::unique_ptr<internal::MinidumpUTF16StringWriter> name_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpUnloadedModuleWriter);
|
||||
};
|
||||
|
||||
//! \brief The writer for a MINIDUMP_UNLOADED_MODULE_LIST stream in a minidump
|
||||
@ -107,6 +109,12 @@ class MinidumpUnloadedModuleListWriter final
|
||||
: public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpUnloadedModuleListWriter();
|
||||
|
||||
MinidumpUnloadedModuleListWriter(const MinidumpUnloadedModuleListWriter&) =
|
||||
delete;
|
||||
MinidumpUnloadedModuleListWriter& operator=(
|
||||
const MinidumpUnloadedModuleListWriter&) = delete;
|
||||
|
||||
~MinidumpUnloadedModuleListWriter() override;
|
||||
|
||||
//! \brief Adds an initialized MINIDUMP_UNLOADED_MODULE for each unloaded
|
||||
@ -145,8 +153,6 @@ class MinidumpUnloadedModuleListWriter final
|
||||
private:
|
||||
std::vector<std::unique_ptr<MinidumpUnloadedModuleWriter>> unloaded_modules_;
|
||||
MINIDUMP_UNLOADED_MODULE_LIST unloaded_module_list_base_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpUnloadedModuleListWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "base/macros.h"
|
||||
|
||||
#include "minidump/minidump_extensions.h"
|
||||
|
||||
@ -54,6 +53,12 @@ class MinidumpUserExtensionStreamDataSource {
|
||||
//!
|
||||
//! \param[in] stream_type The type of the user extension stream.
|
||||
explicit MinidumpUserExtensionStreamDataSource(uint32_t stream_type);
|
||||
|
||||
MinidumpUserExtensionStreamDataSource(
|
||||
const MinidumpUserExtensionStreamDataSource&) = delete;
|
||||
MinidumpUserExtensionStreamDataSource& operator=(
|
||||
const MinidumpUserExtensionStreamDataSource&) = delete;
|
||||
|
||||
virtual ~MinidumpUserExtensionStreamDataSource();
|
||||
|
||||
MinidumpStreamType stream_type() const { return stream_type_; }
|
||||
@ -75,8 +80,6 @@ class MinidumpUserExtensionStreamDataSource {
|
||||
|
||||
private:
|
||||
MinidumpStreamType stream_type_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpUserExtensionStreamDataSource);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -33,6 +33,9 @@ class MinidumpUserStreamWriter::SnapshotContentsWriter final
|
||||
explicit SnapshotContentsWriter(const MemorySnapshot* snapshot)
|
||||
: snapshot_(snapshot), writer_(nullptr) {}
|
||||
|
||||
SnapshotContentsWriter(const SnapshotContentsWriter&) = delete;
|
||||
SnapshotContentsWriter& operator=(const SnapshotContentsWriter&) = delete;
|
||||
|
||||
bool WriteContents(FileWriterInterface* writer) override {
|
||||
DCHECK(!writer_);
|
||||
|
||||
@ -52,8 +55,6 @@ class MinidumpUserStreamWriter::SnapshotContentsWriter final
|
||||
private:
|
||||
const MemorySnapshot* snapshot_;
|
||||
FileWriterInterface* writer_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SnapshotContentsWriter);
|
||||
};
|
||||
|
||||
class MinidumpUserStreamWriter::ExtensionStreamContentsWriter final
|
||||
@ -64,6 +65,10 @@ class MinidumpUserStreamWriter::ExtensionStreamContentsWriter final
|
||||
std::unique_ptr<MinidumpUserExtensionStreamDataSource> data_source)
|
||||
: data_source_(std::move(data_source)), writer_(nullptr) {}
|
||||
|
||||
ExtensionStreamContentsWriter(const ExtensionStreamContentsWriter&) = delete;
|
||||
ExtensionStreamContentsWriter& operator=(
|
||||
const ExtensionStreamContentsWriter&) = delete;
|
||||
|
||||
bool WriteContents(FileWriterInterface* writer) override {
|
||||
DCHECK(!writer_);
|
||||
|
||||
@ -80,8 +85,6 @@ class MinidumpUserStreamWriter::ExtensionStreamContentsWriter final
|
||||
private:
|
||||
std::unique_ptr<MinidumpUserExtensionStreamDataSource> data_source_;
|
||||
FileWriterInterface* writer_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExtensionStreamContentsWriter);
|
||||
};
|
||||
|
||||
MinidumpUserStreamWriter::MinidumpUserStreamWriter() : stream_type_() {}
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_stream_writer.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -35,6 +34,10 @@ namespace crashpad {
|
||||
class MinidumpUserStreamWriter final : public internal::MinidumpStreamWriter {
|
||||
public:
|
||||
MinidumpUserStreamWriter();
|
||||
|
||||
MinidumpUserStreamWriter(const MinidumpUserStreamWriter&) = delete;
|
||||
MinidumpUserStreamWriter& operator=(const MinidumpUserStreamWriter&) = delete;
|
||||
|
||||
~MinidumpUserStreamWriter() override;
|
||||
|
||||
//! \brief Initializes a MINIDUMP_USER_STREAM based on \a stream.
|
||||
@ -70,8 +73,6 @@ class MinidumpUserStreamWriter final : public internal::MinidumpStreamWriter {
|
||||
std::unique_ptr<ContentsWriter> contents_writer_;
|
||||
|
||||
MinidumpStreamType stream_type_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpUserStreamWriter);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "util/file/file_io.h"
|
||||
|
||||
namespace crashpad {
|
||||
@ -35,6 +34,9 @@ namespace internal {
|
||||
//! file.
|
||||
class MinidumpWritable {
|
||||
public:
|
||||
MinidumpWritable(const MinidumpWritable&) = delete;
|
||||
MinidumpWritable& operator=(const MinidumpWritable&) = delete;
|
||||
|
||||
virtual ~MinidumpWritable();
|
||||
|
||||
//! \brief Writes an object and all of its children to a minidump file.
|
||||
@ -270,8 +272,6 @@ class MinidumpWritable {
|
||||
|
||||
size_t leading_pad_bytes_;
|
||||
State state_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MinidumpWritable);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "util/file/string_file.h"
|
||||
|
||||
@ -37,6 +36,9 @@ class BaseTestMinidumpWritable : public crashpad::internal::MinidumpWritable {
|
||||
has_phase_(false),
|
||||
verified_(false) {}
|
||||
|
||||
BaseTestMinidumpWritable(const BaseTestMinidumpWritable&) = delete;
|
||||
BaseTestMinidumpWritable& operator=(const BaseTestMinidumpWritable&) = delete;
|
||||
|
||||
~BaseTestMinidumpWritable() { EXPECT_TRUE(verified_); }
|
||||
|
||||
void SetAlignment(size_t alignment) {
|
||||
@ -113,14 +115,16 @@ class BaseTestMinidumpWritable : public crashpad::internal::MinidumpWritable {
|
||||
bool has_alignment_;
|
||||
bool has_phase_;
|
||||
bool verified_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BaseTestMinidumpWritable);
|
||||
};
|
||||
|
||||
class TestStringMinidumpWritable final : public BaseTestMinidumpWritable {
|
||||
public:
|
||||
TestStringMinidumpWritable() : BaseTestMinidumpWritable(), data_() {}
|
||||
|
||||
TestStringMinidumpWritable(const TestStringMinidumpWritable&) = delete;
|
||||
TestStringMinidumpWritable& operator=(const TestStringMinidumpWritable&) =
|
||||
delete;
|
||||
|
||||
~TestStringMinidumpWritable() {}
|
||||
|
||||
void SetData(const std::string& string) { data_ = string; }
|
||||
@ -140,8 +144,6 @@ class TestStringMinidumpWritable final : public BaseTestMinidumpWritable {
|
||||
|
||||
private:
|
||||
std::string data_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestStringMinidumpWritable);
|
||||
};
|
||||
|
||||
TEST(MinidumpWritable, MinidumpWritable) {
|
||||
@ -487,6 +489,9 @@ class TestRVAMinidumpWritable final : public BaseTestMinidumpWritable {
|
||||
public:
|
||||
TestRVAMinidumpWritable() : BaseTestMinidumpWritable(), rva_() {}
|
||||
|
||||
TestRVAMinidumpWritable(const TestRVAMinidumpWritable&) = delete;
|
||||
TestRVAMinidumpWritable& operator=(const TestRVAMinidumpWritable&) = delete;
|
||||
|
||||
~TestRVAMinidumpWritable() {}
|
||||
|
||||
void SetRVA(MinidumpWritable* other) { other->RegisterRVA(&rva_); }
|
||||
@ -505,8 +510,6 @@ class TestRVAMinidumpWritable final : public BaseTestMinidumpWritable {
|
||||
|
||||
private:
|
||||
RVA rva_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestRVAMinidumpWritable);
|
||||
};
|
||||
|
||||
RVA RVAAtIndex(const std::string& string, size_t index) {
|
||||
@ -620,6 +623,11 @@ class TestLocationDescriptorMinidumpWritable final
|
||||
TestLocationDescriptorMinidumpWritable()
|
||||
: BaseTestMinidumpWritable(), location_descriptor_(), string_() {}
|
||||
|
||||
TestLocationDescriptorMinidumpWritable(
|
||||
const TestLocationDescriptorMinidumpWritable&) = delete;
|
||||
TestLocationDescriptorMinidumpWritable& operator=(
|
||||
const TestLocationDescriptorMinidumpWritable&) = delete;
|
||||
|
||||
~TestLocationDescriptorMinidumpWritable() {}
|
||||
|
||||
void SetLocationDescriptor(MinidumpWritable* other) {
|
||||
@ -652,8 +660,6 @@ class TestLocationDescriptorMinidumpWritable final
|
||||
private:
|
||||
MINIDUMP_LOCATION_DESCRIPTOR location_descriptor_;
|
||||
std::string string_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestLocationDescriptorMinidumpWritable);
|
||||
};
|
||||
|
||||
struct LocationDescriptorAndData {
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
|
||||
namespace crashpad {
|
||||
namespace internal {
|
||||
@ -30,6 +29,10 @@ namespace internal {
|
||||
//! of classes.
|
||||
class MinidumpWriterUtil final {
|
||||
public:
|
||||
MinidumpWriterUtil() = delete;
|
||||
MinidumpWriterUtil(const MinidumpWriterUtil&) = delete;
|
||||
MinidumpWriterUtil& operator=(const MinidumpWriterUtil&) = delete;
|
||||
|
||||
//! \brief Assigns a `time_t` value, logging a warning if the result overflows
|
||||
//! the destination buffer and will be truncated.
|
||||
//!
|
||||
@ -78,9 +81,6 @@ class MinidumpWriterUtil final {
|
||||
static void AssignUTF8ToUTF16(char16_t* destination,
|
||||
size_t destination_size,
|
||||
const std::string& source);
|
||||
|
||||
private:
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(MinidumpWriterUtil);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/test/test_memory_snapshot.h"
|
||||
#include "util/file/file_writer.h"
|
||||
|
||||
@ -38,14 +37,16 @@ namespace test {
|
||||
class TestMinidumpMemoryWriter final : public SnapshotMinidumpMemoryWriter {
|
||||
public:
|
||||
TestMinidumpMemoryWriter(uint64_t base_address, size_t size, uint8_t value);
|
||||
|
||||
TestMinidumpMemoryWriter(const TestMinidumpMemoryWriter&) = delete;
|
||||
TestMinidumpMemoryWriter& operator=(const TestMinidumpMemoryWriter&) = delete;
|
||||
|
||||
~TestMinidumpMemoryWriter();
|
||||
|
||||
void SetShouldFailRead(bool should_fail);
|
||||
|
||||
private:
|
||||
TestMemorySnapshot test_snapshot_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestMinidumpMemoryWriter);
|
||||
};
|
||||
|
||||
//! \brief Verifies, via Google Test assertions, that a
|
||||
|
@ -38,13 +38,16 @@ class BufferExtensionStreamDataSource final
|
||||
const void* data,
|
||||
size_t data_size);
|
||||
|
||||
BufferExtensionStreamDataSource(const BufferExtensionStreamDataSource&) =
|
||||
delete;
|
||||
BufferExtensionStreamDataSource& operator=(
|
||||
const BufferExtensionStreamDataSource&) = delete;
|
||||
|
||||
size_t StreamDataSize() override;
|
||||
bool ReadStreamData(Delegate* delegate) override;
|
||||
|
||||
private:
|
||||
std::vector<uint8_t> data_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BufferExtensionStreamDataSource);
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "minidump/minidump_extensions.h"
|
||||
#include "minidump/minidump_writable.h"
|
||||
@ -277,6 +276,10 @@ class TestUInt32MinidumpWritable final : public internal::MinidumpWritable {
|
||||
//! \brief Constructs the object to write a `uint32_t` with value \a value.
|
||||
explicit TestUInt32MinidumpWritable(uint32_t value);
|
||||
|
||||
TestUInt32MinidumpWritable(const TestUInt32MinidumpWritable&) = delete;
|
||||
TestUInt32MinidumpWritable& operator=(const TestUInt32MinidumpWritable&) =
|
||||
delete;
|
||||
|
||||
~TestUInt32MinidumpWritable() override;
|
||||
|
||||
protected:
|
||||
@ -286,8 +289,6 @@ class TestUInt32MinidumpWritable final : public internal::MinidumpWritable {
|
||||
|
||||
private:
|
||||
uint32_t value_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestUInt32MinidumpWritable);
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/cpu_context.h"
|
||||
#include "util/numeric/checked_range.h"
|
||||
|
||||
@ -65,6 +64,10 @@ class CaptureMemory {
|
||||
const CheckedRange<uint64_t, uint64_t>& range) = 0;
|
||||
};
|
||||
|
||||
CaptureMemory() = delete;
|
||||
CaptureMemory(const CaptureMemory&) = delete;
|
||||
CaptureMemory& operator=(const CaptureMemory&) = delete;
|
||||
|
||||
//! \brief For all registers that appear to be pointer-like in \a context,
|
||||
//! captures a small amount of memory near their pointed to location.
|
||||
//!
|
||||
@ -88,9 +91,6 @@ class CaptureMemory {
|
||||
//! process and adding new ranges.
|
||||
static void PointedToByMemoryRange(const MemorySnapshot& memory,
|
||||
Delegate* delegate);
|
||||
|
||||
private:
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(CaptureMemory);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "client/crashpad_info.h"
|
||||
@ -63,6 +62,11 @@ class ScopedUnsetCrashpadInfoOptions {
|
||||
: crashpad_info_(crashpad_info) {
|
||||
}
|
||||
|
||||
ScopedUnsetCrashpadInfoOptions(const ScopedUnsetCrashpadInfoOptions&) =
|
||||
delete;
|
||||
ScopedUnsetCrashpadInfoOptions& operator=(
|
||||
const ScopedUnsetCrashpadInfoOptions&) = delete;
|
||||
|
||||
~ScopedUnsetCrashpadInfoOptions() {
|
||||
crashpad_info_->set_crashpad_handler_behavior(TriState::kUnset);
|
||||
crashpad_info_->set_system_crash_reporter_forwarding(TriState::kUnset);
|
||||
@ -72,8 +76,6 @@ class ScopedUnsetCrashpadInfoOptions {
|
||||
|
||||
private:
|
||||
CrashpadInfo* crashpad_info_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedUnsetCrashpadInfoOptions);
|
||||
};
|
||||
|
||||
CrashpadInfoClientOptions SelfProcessSnapshotAndGetCrashpadOptions() {
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "util/misc/address_types.h"
|
||||
#include "util/misc/initialization_state_dcheck.h"
|
||||
#include "util/misc/tri_state.h"
|
||||
@ -32,6 +31,10 @@ namespace crashpad {
|
||||
class CrashpadInfoReader {
|
||||
public:
|
||||
CrashpadInfoReader();
|
||||
|
||||
CrashpadInfoReader(const CrashpadInfoReader&) = delete;
|
||||
CrashpadInfoReader& operator=(const CrashpadInfoReader&) = delete;
|
||||
|
||||
~CrashpadInfoReader();
|
||||
|
||||
//! \brief Initializes this object.
|
||||
@ -66,8 +69,6 @@ class CrashpadInfoReader {
|
||||
std::unique_ptr<InfoContainer> container_;
|
||||
bool is_64_bit_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashpadInfoReader);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -49,6 +49,9 @@ class ScopedUnsetCrashpadInfo {
|
||||
explicit ScopedUnsetCrashpadInfo(CrashpadInfo* crashpad_info)
|
||||
: crashpad_info_(crashpad_info) {}
|
||||
|
||||
ScopedUnsetCrashpadInfo(const ScopedUnsetCrashpadInfo&) = delete;
|
||||
ScopedUnsetCrashpadInfo& operator=(const ScopedUnsetCrashpadInfo&) = delete;
|
||||
|
||||
~ScopedUnsetCrashpadInfo() {
|
||||
crashpad_info_->set_crashpad_handler_behavior(TriState::kUnset);
|
||||
crashpad_info_->set_system_crash_reporter_forwarding(TriState::kUnset);
|
||||
@ -61,8 +64,6 @@ class ScopedUnsetCrashpadInfo {
|
||||
|
||||
private:
|
||||
CrashpadInfo* crashpad_info_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedUnsetCrashpadInfo);
|
||||
};
|
||||
|
||||
class CrashpadInfoTestDataSetup {
|
||||
@ -80,6 +81,10 @@ class CrashpadInfoTestDataSetup {
|
||||
kGatherIndirectlyReferencedMemory, kIndirectlyReferencedMemoryCap);
|
||||
}
|
||||
|
||||
CrashpadInfoTestDataSetup(const CrashpadInfoTestDataSetup&) = delete;
|
||||
CrashpadInfoTestDataSetup& operator=(const CrashpadInfoTestDataSetup&) =
|
||||
delete;
|
||||
|
||||
void GetAddresses(VMAddress* info_address,
|
||||
VMAddress* extra_memory_address,
|
||||
VMAddress* simple_annotations_address,
|
||||
@ -96,8 +101,6 @@ class CrashpadInfoTestDataSetup {
|
||||
SimpleAddressRangeBag extra_memory_;
|
||||
SimpleStringDictionary simple_annotations_;
|
||||
AnnotationList annotation_list_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashpadInfoTestDataSetup);
|
||||
};
|
||||
|
||||
void ExpectCrashpadInfo(ProcessType process,
|
||||
@ -184,6 +187,9 @@ class ReadFromChildTest : public MultiprocessExec {
|
||||
SetChildTestMainFunction("ReadFromChildTestMain");
|
||||
}
|
||||
|
||||
ReadFromChildTest(const ReadFromChildTest&) = delete;
|
||||
ReadFromChildTest& operator=(const ReadFromChildTest&) = delete;
|
||||
|
||||
~ReadFromChildTest() = default;
|
||||
|
||||
private:
|
||||
@ -215,8 +221,6 @@ class ReadFromChildTest : public MultiprocessExec {
|
||||
simple_annotations_address,
|
||||
annotations_list_address);
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ReadFromChildTest);
|
||||
};
|
||||
|
||||
TEST(CrashpadInfoReader, ReadFromChild) {
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/annotation_snapshot.h"
|
||||
#include "util/misc/address_types.h"
|
||||
#include "util/process/process_memory_range.h"
|
||||
@ -37,6 +36,9 @@ class ImageAnnotationReader {
|
||||
//! \param[in] memory A memory reader for the remote process.
|
||||
explicit ImageAnnotationReader(const ProcessMemoryRange* memory);
|
||||
|
||||
ImageAnnotationReader(const ImageAnnotationReader&) = delete;
|
||||
ImageAnnotationReader& operator=(const ImageAnnotationReader&) = delete;
|
||||
|
||||
~ImageAnnotationReader();
|
||||
|
||||
//! \brief Reads annotations that are organized as key-value pairs, where all
|
||||
@ -67,8 +69,6 @@ class ImageAnnotationReader {
|
||||
std::vector<AnnotationSnapshot>* annotations) const;
|
||||
|
||||
const ProcessMemoryRange* memory_; // weak
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ImageAnnotationReader);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -163,6 +163,9 @@ class ReadFromChildTest : public MultiprocessExec {
|
||||
SetChildTestMainFunction("ReadAnnotationsFromChildTestMain");
|
||||
}
|
||||
|
||||
ReadFromChildTest(const ReadFromChildTest&) = delete;
|
||||
ReadFromChildTest& operator=(const ReadFromChildTest&) = delete;
|
||||
|
||||
~ReadFromChildTest() = default;
|
||||
|
||||
private:
|
||||
@ -182,8 +185,6 @@ class ReadFromChildTest : public MultiprocessExec {
|
||||
ExpectAnnotations(
|
||||
ChildProcess(), am_64_bit, simple_map_address, annotations_address);
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ReadFromChildTest);
|
||||
};
|
||||
|
||||
TEST(ImageAnnotationReader, ReadFromChild) {
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <map>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "util/misc/address_types.h"
|
||||
#include "util/misc/reinterpret_bytes.h"
|
||||
#include "util/process/process_memory_range.h"
|
||||
@ -31,6 +30,10 @@ namespace crashpad {
|
||||
class ElfDynamicArrayReader {
|
||||
public:
|
||||
ElfDynamicArrayReader();
|
||||
|
||||
ElfDynamicArrayReader(const ElfDynamicArrayReader&) = delete;
|
||||
ElfDynamicArrayReader& operator=(const ElfDynamicArrayReader&) = delete;
|
||||
|
||||
~ElfDynamicArrayReader();
|
||||
|
||||
//! \brief Initializes the reader.
|
||||
@ -66,8 +69,6 @@ class ElfDynamicArrayReader {
|
||||
|
||||
private:
|
||||
std::map<uint64_t, uint64_t> values_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElfDynamicArrayReader);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -57,6 +57,12 @@ class ElfImageReader::ProgramHeaderTableSpecific
|
||||
: public ElfImageReader::ProgramHeaderTable {
|
||||
public:
|
||||
ProgramHeaderTableSpecific<PhdrType>() {}
|
||||
|
||||
ProgramHeaderTableSpecific<PhdrType>(
|
||||
const ProgramHeaderTableSpecific<PhdrType>&) = delete;
|
||||
ProgramHeaderTableSpecific<PhdrType>& operator=(
|
||||
const ProgramHeaderTableSpecific<PhdrType>&) = delete;
|
||||
|
||||
~ProgramHeaderTableSpecific<PhdrType>() {}
|
||||
|
||||
bool Initialize(const ProcessMemoryRange& memory,
|
||||
@ -183,8 +189,6 @@ class ElfImageReader::ProgramHeaderTableSpecific
|
||||
private:
|
||||
std::vector<PhdrType> table_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ProgramHeaderTableSpecific<PhdrType>);
|
||||
};
|
||||
|
||||
ElfImageReader::NoteReader::~NoteReader() = default;
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/elf/elf_dynamic_array_reader.h"
|
||||
#include "snapshot/elf/elf_symbol_table_reader.h"
|
||||
#include "util/misc/address_types.h"
|
||||
@ -46,6 +45,9 @@ class ElfImageReader {
|
||||
//! ElfImageReader::Notes() or ElfImageReader::NotesWithNameAndType().
|
||||
class NoteReader {
|
||||
public:
|
||||
NoteReader(const NoteReader&) = delete;
|
||||
NoteReader& operator=(const NoteReader&) = delete;
|
||||
|
||||
~NoteReader();
|
||||
|
||||
//! \brief The return value for NextNote().
|
||||
@ -111,11 +113,13 @@ class ElfImageReader {
|
||||
bool use_filter_;
|
||||
bool is_valid_;
|
||||
bool retry_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NoteReader);
|
||||
};
|
||||
|
||||
ElfImageReader();
|
||||
|
||||
ElfImageReader(const ElfImageReader&) = delete;
|
||||
ElfImageReader& operator=(const ElfImageReader&) = delete;
|
||||
|
||||
~ElfImageReader();
|
||||
|
||||
//! \brief Initializes the reader.
|
||||
@ -285,8 +289,6 @@ class ElfImageReader {
|
||||
InitializationStateDcheck initialized_;
|
||||
InitializationState dynamic_array_initialized_;
|
||||
InitializationState symbol_table_initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElfImageReader);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "util/misc/address_types.h"
|
||||
#include "util/process/process_memory_range.h"
|
||||
|
||||
@ -63,6 +62,10 @@ class ElfSymbolTableReader {
|
||||
ElfImageReader* elf_reader,
|
||||
VMAddress address,
|
||||
VMSize num_entries);
|
||||
|
||||
ElfSymbolTableReader(const ElfSymbolTableReader&) = delete;
|
||||
ElfSymbolTableReader& operator=(const ElfSymbolTableReader&) = delete;
|
||||
|
||||
~ElfSymbolTableReader();
|
||||
|
||||
//! \brief Lookup information about a symbol.
|
||||
@ -80,8 +83,6 @@ class ElfSymbolTableReader {
|
||||
ElfImageReader* const elf_reader_; // weak
|
||||
const VMAddress base_address_;
|
||||
const VMSize num_entries_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElfSymbolTableReader);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "client/crashpad_info.h"
|
||||
#include "snapshot/crashpad_info_client_options.h"
|
||||
#include "snapshot/crashpad_types/crashpad_info_reader.h"
|
||||
@ -50,6 +49,10 @@ class ModuleSnapshotElf final : public ModuleSnapshot {
|
||||
ModuleSnapshot::ModuleType type,
|
||||
ProcessMemoryRange* process_memory_range,
|
||||
const ProcessMemory* process_memory);
|
||||
|
||||
ModuleSnapshotElf(const ModuleSnapshotElf&) = delete;
|
||||
ModuleSnapshotElf& operator=(const ModuleSnapshotElf&) = delete;
|
||||
|
||||
~ModuleSnapshotElf() override;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -98,8 +101,6 @@ class ModuleSnapshotElf final : public ModuleSnapshot {
|
||||
InitializationStateDcheck initialized_;
|
||||
// Too const-y: https://crashpad.chromium.org/bug/9.
|
||||
mutable std::vector<std::unique_ptr<const UserMinidumpStream>> streams_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ModuleSnapshotElf);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -35,6 +35,10 @@ namespace internal {
|
||||
class ExceptionSnapshotFuchsia final : public ExceptionSnapshot {
|
||||
public:
|
||||
ExceptionSnapshotFuchsia();
|
||||
|
||||
ExceptionSnapshotFuchsia(const ExceptionSnapshotFuchsia&) = delete;
|
||||
ExceptionSnapshotFuchsia& operator=(const ExceptionSnapshotFuchsia&) = delete;
|
||||
|
||||
~ExceptionSnapshotFuchsia() override;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -73,8 +77,6 @@ class ExceptionSnapshotFuchsia final : public ExceptionSnapshot {
|
||||
uint32_t exception_;
|
||||
uint32_t exception_info_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExceptionSnapshotFuchsia);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -28,6 +28,10 @@ namespace crashpad {
|
||||
class MemoryMapFuchsia {
|
||||
public:
|
||||
MemoryMapFuchsia();
|
||||
|
||||
MemoryMapFuchsia(const MemoryMapFuchsia&) = delete;
|
||||
MemoryMapFuchsia& operator=(const MemoryMapFuchsia&) = delete;
|
||||
|
||||
~MemoryMapFuchsia();
|
||||
|
||||
//! \brief Initializes this object with information about the mapped memory
|
||||
@ -53,8 +57,6 @@ class MemoryMapFuchsia {
|
||||
private:
|
||||
std::vector<zx_info_maps_t> map_entries_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MemoryMapFuchsia);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "snapshot/elf/elf_image_reader.h"
|
||||
#include "snapshot/fuchsia/memory_map_fuchsia.h"
|
||||
@ -88,6 +87,10 @@ class ProcessReaderFuchsia {
|
||||
};
|
||||
|
||||
ProcessReaderFuchsia();
|
||||
|
||||
ProcessReaderFuchsia(const ProcessReaderFuchsia&) = delete;
|
||||
ProcessReaderFuchsia& operator=(const ProcessReaderFuchsia&) = delete;
|
||||
|
||||
~ProcessReaderFuchsia();
|
||||
|
||||
//! \brief Initializes this object. This method must be called before any
|
||||
@ -138,8 +141,6 @@ class ProcessReaderFuchsia {
|
||||
bool initialized_threads_ = false;
|
||||
bool initialized_memory_map_ = false;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ProcessReaderFuchsia);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -92,6 +92,10 @@ class BasicChildTest : public MultiprocessExec {
|
||||
BasicChildTest() : MultiprocessExec() {
|
||||
SetChildTestMainFunction("ProcessReaderBasicChildTestMain");
|
||||
}
|
||||
|
||||
BasicChildTest(const BasicChildTest&) = delete;
|
||||
BasicChildTest& operator=(const BasicChildTest&) = delete;
|
||||
|
||||
~BasicChildTest() {}
|
||||
|
||||
private:
|
||||
@ -106,8 +110,6 @@ class BasicChildTest : public MultiprocessExec {
|
||||
ASSERT_TRUE(process_reader.Memory()->ReadCString(addr, &read_string));
|
||||
EXPECT_EQ(read_string, kTestMemory);
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BasicChildTest);
|
||||
};
|
||||
|
||||
TEST(ProcessReaderFuchsia, ChildBasic) {
|
||||
@ -156,6 +158,10 @@ class ThreadsChildTest : public MultiprocessExec {
|
||||
ThreadsChildTest() : MultiprocessExec() {
|
||||
SetChildTestMainFunction("ProcessReaderChildThreadsTestMain");
|
||||
}
|
||||
|
||||
ThreadsChildTest(const ThreadsChildTest&) = delete;
|
||||
ThreadsChildTest& operator=(const ThreadsChildTest&) = delete;
|
||||
|
||||
~ThreadsChildTest() {}
|
||||
|
||||
private:
|
||||
@ -178,8 +184,6 @@ class ThreadsChildTest : public MultiprocessExec {
|
||||
EXPECT_LE(threads[i].stack_regions[0].size(), i * 4096u);
|
||||
}
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ThreadsChildTest);
|
||||
};
|
||||
|
||||
// TODO(scottmg): US-553. ScopedTaskSuspend fails sometimes, with a 50ms
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/crashpad_info_client_options.h"
|
||||
#include "snapshot/elf/elf_image_reader.h"
|
||||
#include "snapshot/elf/module_snapshot_elf.h"
|
||||
@ -45,6 +44,10 @@ namespace crashpad {
|
||||
class ProcessSnapshotFuchsia : public ProcessSnapshot {
|
||||
public:
|
||||
ProcessSnapshotFuchsia();
|
||||
|
||||
ProcessSnapshotFuchsia(const ProcessSnapshotFuchsia&) = delete;
|
||||
ProcessSnapshotFuchsia& operator=(const ProcessSnapshotFuchsia&) = delete;
|
||||
|
||||
~ProcessSnapshotFuchsia() override;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -145,8 +148,6 @@ class ProcessSnapshotFuchsia : public ProcessSnapshot {
|
||||
UUID client_id_;
|
||||
timeval snapshot_time_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotFuchsia);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -103,6 +103,10 @@ class AddressSpaceTest : public MultiprocessExec {
|
||||
AddressSpaceTest() : MultiprocessExec() {
|
||||
SetChildTestMainFunction("AddressSpaceChildTestMain");
|
||||
}
|
||||
|
||||
AddressSpaceTest(const AddressSpaceTest&) = delete;
|
||||
AddressSpaceTest& operator=(const AddressSpaceTest&) = delete;
|
||||
|
||||
~AddressSpaceTest() {}
|
||||
|
||||
private:
|
||||
@ -131,8 +135,6 @@ class AddressSpaceTest : public MultiprocessExec {
|
||||
t.minidump_perm);
|
||||
}
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AddressSpaceTest);
|
||||
};
|
||||
|
||||
TEST(ProcessSnapshotFuchsiaTest, AddressSpaceMapping) {
|
||||
@ -171,6 +173,10 @@ class InvalidStackPointerTest : public MultiprocessExec {
|
||||
SetExpectedChildTermination(kTerminationNormal,
|
||||
ZX_TASK_RETCODE_SYSCALL_KILL);
|
||||
}
|
||||
|
||||
InvalidStackPointerTest(const InvalidStackPointerTest&) = delete;
|
||||
InvalidStackPointerTest& operator=(const InvalidStackPointerTest&) = delete;
|
||||
|
||||
~InvalidStackPointerTest() {}
|
||||
|
||||
private:
|
||||
@ -215,8 +221,6 @@ class InvalidStackPointerTest : public MultiprocessExec {
|
||||
// As we've corrupted the child, don't let it run again.
|
||||
ASSERT_EQ(ChildProcess()->kill(), ZX_OK);
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(InvalidStackPointerTest);
|
||||
};
|
||||
|
||||
// This is a test for a specific failure detailed in
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "snapshot/system_snapshot.h"
|
||||
#include "util/misc/initialization_state_dcheck.h"
|
||||
@ -33,6 +32,10 @@ namespace internal {
|
||||
class SystemSnapshotFuchsia final : public SystemSnapshot {
|
||||
public:
|
||||
SystemSnapshotFuchsia();
|
||||
|
||||
SystemSnapshotFuchsia(const SystemSnapshotFuchsia&) = delete;
|
||||
SystemSnapshotFuchsia& operator=(const SystemSnapshotFuchsia&) = delete;
|
||||
|
||||
~SystemSnapshotFuchsia() override;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -77,8 +80,6 @@ class SystemSnapshotFuchsia final : public SystemSnapshot {
|
||||
CpuidReader cpuid_;
|
||||
#endif // ARCH_CPU_X86_FAMILY
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SystemSnapshotFuchsia);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <stdint.h>
|
||||
#include <zircon/types.h>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "snapshot/cpu_context.h"
|
||||
#include "snapshot/fuchsia/process_reader_fuchsia.h"
|
||||
@ -34,6 +33,10 @@ namespace internal {
|
||||
class ThreadSnapshotFuchsia final : public ThreadSnapshot {
|
||||
public:
|
||||
ThreadSnapshotFuchsia();
|
||||
|
||||
ThreadSnapshotFuchsia(const ThreadSnapshotFuchsia&) = delete;
|
||||
ThreadSnapshotFuchsia& operator=(const ThreadSnapshotFuchsia&) = delete;
|
||||
|
||||
~ThreadSnapshotFuchsia() override;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -71,8 +74,6 @@ class ThreadSnapshotFuchsia final : public ThreadSnapshot {
|
||||
zx_koid_t thread_id_;
|
||||
zx_vaddr_t thread_specific_data_address_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ThreadSnapshotFuchsia);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "snapshot/cpu_context.h"
|
||||
#include "snapshot/exception_snapshot.h"
|
||||
@ -37,6 +36,12 @@ namespace internal {
|
||||
class ExceptionSnapshotIOSIntermediateDump final : public ExceptionSnapshot {
|
||||
public:
|
||||
ExceptionSnapshotIOSIntermediateDump();
|
||||
|
||||
ExceptionSnapshotIOSIntermediateDump(
|
||||
const ExceptionSnapshotIOSIntermediateDump&) = delete;
|
||||
ExceptionSnapshotIOSIntermediateDump& operator=(
|
||||
const ExceptionSnapshotIOSIntermediateDump&) = delete;
|
||||
|
||||
~ExceptionSnapshotIOSIntermediateDump() override;
|
||||
|
||||
//! \brief Initialize the snapshot as a signal exception.
|
||||
@ -102,8 +107,6 @@ class ExceptionSnapshotIOSIntermediateDump final : public ExceptionSnapshot {
|
||||
uint32_t exception_;
|
||||
uint32_t exception_info_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExceptionSnapshotIOSIntermediateDump);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef CRASHPAD_SNAPSHOT_IOS_INTERMEDIATE_DUMP_MEMORY_SNAPSHOT_IOS_INTERMEDIATEDUMP_H_
|
||||
#define CRASHPAD_SNAPSHOT_IOS_INTERMEDIATE_DUMP_MEMORY_SNAPSHOT_IOS_INTERMEDIATEDUMP_H_
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/memory_snapshot.h"
|
||||
#include "util/misc/address_types.h"
|
||||
#include "util/misc/initialization_state_dcheck.h"
|
||||
@ -27,6 +26,12 @@ namespace internal {
|
||||
class MemorySnapshotIOSIntermediateDump final : public MemorySnapshot {
|
||||
public:
|
||||
MemorySnapshotIOSIntermediateDump() = default;
|
||||
|
||||
MemorySnapshotIOSIntermediateDump(const MemorySnapshotIOSIntermediateDump&) =
|
||||
delete;
|
||||
MemorySnapshotIOSIntermediateDump& operator=(
|
||||
const MemorySnapshotIOSIntermediateDump&) = delete;
|
||||
|
||||
~MemorySnapshotIOSIntermediateDump() = default;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -52,8 +57,6 @@ class MemorySnapshotIOSIntermediateDump final : public MemorySnapshot {
|
||||
vm_address_t data_;
|
||||
vm_size_t size_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MemorySnapshotIOSIntermediateDump);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/crashpad_info_client_options.h"
|
||||
#include "snapshot/module_snapshot.h"
|
||||
#include "util/ios/ios_intermediate_dump_map.h"
|
||||
@ -37,6 +36,12 @@ namespace internal {
|
||||
class ModuleSnapshotIOSIntermediateDump final : public ModuleSnapshot {
|
||||
public:
|
||||
ModuleSnapshotIOSIntermediateDump();
|
||||
|
||||
ModuleSnapshotIOSIntermediateDump(const ModuleSnapshotIOSIntermediateDump&) =
|
||||
delete;
|
||||
ModuleSnapshotIOSIntermediateDump& operator=(
|
||||
const ModuleSnapshotIOSIntermediateDump&) = delete;
|
||||
|
||||
~ModuleSnapshotIOSIntermediateDump() override;
|
||||
|
||||
//! \brief Initialize the snapshot
|
||||
@ -84,8 +89,6 @@ class ModuleSnapshotIOSIntermediateDump final : public ModuleSnapshot {
|
||||
std::vector<AnnotationSnapshot> annotation_objects_;
|
||||
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ModuleSnapshotIOSIntermediateDump);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -39,6 +39,11 @@ class ProcessSnapshotIOSIntermediateDump final : public ProcessSnapshot {
|
||||
public:
|
||||
ProcessSnapshotIOSIntermediateDump() = default;
|
||||
|
||||
ProcessSnapshotIOSIntermediateDump(
|
||||
const ProcessSnapshotIOSIntermediateDump&) = delete;
|
||||
ProcessSnapshotIOSIntermediateDump& operator=(
|
||||
const ProcessSnapshotIOSIntermediateDump&) = delete;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
//!
|
||||
//! \param[in] dump_path A class containing various system data points.
|
||||
@ -103,8 +108,6 @@ class ProcessSnapshotIOSIntermediateDump final : public ProcessSnapshot {
|
||||
std::map<std::string, std::string> annotations_simple_map_;
|
||||
timeval snapshot_time_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotIOSIntermediateDump);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/system_snapshot.h"
|
||||
#include "util/ios/ios_intermediate_dump_map.h"
|
||||
#include "util/ios/ios_system_data_collector.h"
|
||||
@ -33,6 +32,12 @@ namespace internal {
|
||||
class SystemSnapshotIOSIntermediateDump final : public SystemSnapshot {
|
||||
public:
|
||||
SystemSnapshotIOSIntermediateDump();
|
||||
|
||||
SystemSnapshotIOSIntermediateDump(const SystemSnapshotIOSIntermediateDump&) =
|
||||
delete;
|
||||
SystemSnapshotIOSIntermediateDump& operator=(
|
||||
const SystemSnapshotIOSIntermediateDump&) = delete;
|
||||
|
||||
~SystemSnapshotIOSIntermediateDump() override;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -87,8 +92,6 @@ class SystemSnapshotIOSIntermediateDump final : public SystemSnapshot {
|
||||
std::string standard_name_;
|
||||
std::string daylight_name_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SystemSnapshotIOSIntermediateDump);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef CRASHPAD_SNAPSHOT_IOS_INTERMEDIATE_DUMP_THREAD_SNAPSHOT_IOS_INTERMEDIATEDUMP_H_
|
||||
#define CRASHPAD_SNAPSHOT_IOS_INTERMEDIATE_DUMP_THREAD_SNAPSHOT_IOS_INTERMEDIATEDUMP_H_
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "snapshot/cpu_context.h"
|
||||
#include "snapshot/ios/memory_snapshot_ios_intermediate_dump.h"
|
||||
@ -30,6 +29,12 @@ namespace internal {
|
||||
class ThreadSnapshotIOSIntermediateDump final : public ThreadSnapshot {
|
||||
public:
|
||||
ThreadSnapshotIOSIntermediateDump();
|
||||
|
||||
ThreadSnapshotIOSIntermediateDump(const ThreadSnapshotIOSIntermediateDump&) =
|
||||
delete;
|
||||
ThreadSnapshotIOSIntermediateDump& operator=(
|
||||
const ThreadSnapshotIOSIntermediateDump&) = delete;
|
||||
|
||||
~ThreadSnapshotIOSIntermediateDump() override;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -67,8 +72,6 @@ class ThreadSnapshotIOSIntermediateDump final : public ThreadSnapshot {
|
||||
std::vector<std::unique_ptr<internal::MemorySnapshotIOSIntermediateDump>>
|
||||
extra_memory_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ThreadSnapshotIOSIntermediateDump);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "util/linux/address_types.h"
|
||||
#include "util/misc/initialization_state_dcheck.h"
|
||||
#include "util/process/process_memory_range.h"
|
||||
@ -48,6 +47,10 @@ class DebugRendezvous {
|
||||
};
|
||||
|
||||
DebugRendezvous();
|
||||
|
||||
DebugRendezvous(const DebugRendezvous&) = delete;
|
||||
DebugRendezvous& operator=(const DebugRendezvous&) = delete;
|
||||
|
||||
~DebugRendezvous();
|
||||
|
||||
//! \brief Initializes this object by reading an `r_debug` struct from a
|
||||
@ -79,8 +82,6 @@ class DebugRendezvous {
|
||||
std::vector<LinkEntry> modules_;
|
||||
LinkEntry executable_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DebugRendezvous);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -239,6 +239,10 @@ TEST(DebugRendezvous, Self) {
|
||||
class ChildTest : public Multiprocess {
|
||||
public:
|
||||
ChildTest() {}
|
||||
|
||||
ChildTest(const ChildTest&) = delete;
|
||||
ChildTest& operator=(const ChildTest&) = delete;
|
||||
|
||||
~ChildTest() {}
|
||||
|
||||
private:
|
||||
@ -250,8 +254,6 @@ class ChildTest : public Multiprocess {
|
||||
}
|
||||
|
||||
void MultiprocessChild() { CheckedReadFileAtEOF(ReadPipeHandle()); }
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ChildTest);
|
||||
};
|
||||
|
||||
TEST(DebugRendezvous, Child) {
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "snapshot/cpu_context.h"
|
||||
#include "snapshot/exception_snapshot.h"
|
||||
@ -37,6 +36,10 @@ namespace internal {
|
||||
class ExceptionSnapshotLinux final : public ExceptionSnapshot {
|
||||
public:
|
||||
ExceptionSnapshotLinux();
|
||||
|
||||
ExceptionSnapshotLinux(const ExceptionSnapshotLinux&) = delete;
|
||||
ExceptionSnapshotLinux& operator=(const ExceptionSnapshotLinux&) = delete;
|
||||
|
||||
~ExceptionSnapshotLinux() override;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -93,8 +96,6 @@ class ExceptionSnapshotLinux final : public ExceptionSnapshot {
|
||||
uint32_t signal_number_;
|
||||
uint32_t signal_code_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExceptionSnapshotLinux);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include "base/bit_cast.h"
|
||||
#include "base/cxx17_backports.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "snapshot/cpu_architecture.h"
|
||||
@ -333,6 +332,9 @@ class ScopedSigactionRestore {
|
||||
public:
|
||||
ScopedSigactionRestore() : old_action_(), signo_(-1), valid_(false) {}
|
||||
|
||||
ScopedSigactionRestore(const ScopedSigactionRestore&) = delete;
|
||||
ScopedSigactionRestore& operator=(const ScopedSigactionRestore&) = delete;
|
||||
|
||||
~ScopedSigactionRestore() { Reset(); }
|
||||
|
||||
bool Reset() {
|
||||
@ -361,12 +363,14 @@ class ScopedSigactionRestore {
|
||||
struct sigaction old_action_;
|
||||
int signo_;
|
||||
bool valid_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedSigactionRestore);
|
||||
};
|
||||
|
||||
class RaiseTest {
|
||||
public:
|
||||
RaiseTest() = delete;
|
||||
RaiseTest(const RaiseTest&) = delete;
|
||||
RaiseTest& operator=(const RaiseTest&) = delete;
|
||||
|
||||
static void Run() {
|
||||
test_complete_ = false;
|
||||
|
||||
@ -406,8 +410,6 @@ class RaiseTest {
|
||||
|
||||
static constexpr uint32_t kSigno = SIGUSR1;
|
||||
static bool test_complete_;
|
||||
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(RaiseTest);
|
||||
};
|
||||
bool RaiseTest::test_complete_ = false;
|
||||
|
||||
@ -418,6 +420,10 @@ TEST(ExceptionSnapshotLinux, Raise) {
|
||||
class TimerTest {
|
||||
public:
|
||||
TimerTest() : event_(), timer_(-1), test_complete_(false) { test_ = this; }
|
||||
|
||||
TimerTest(const TimerTest&) = delete;
|
||||
TimerTest& operator=(const TimerTest&) = delete;
|
||||
|
||||
~TimerTest() { test_ = nullptr; }
|
||||
|
||||
void Run() {
|
||||
@ -479,8 +485,6 @@ class TimerTest {
|
||||
|
||||
static constexpr uint32_t kSigno = SIGALRM;
|
||||
static TimerTest* test_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TimerTest);
|
||||
};
|
||||
TimerTest* TimerTest::test_;
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/elf/elf_image_reader.h"
|
||||
#include "snapshot/module_snapshot.h"
|
||||
#include "util/linux/address_types.h"
|
||||
@ -99,6 +98,10 @@ class ProcessReaderLinux {
|
||||
};
|
||||
|
||||
ProcessReaderLinux();
|
||||
|
||||
ProcessReaderLinux(const ProcessReaderLinux&) = delete;
|
||||
ProcessReaderLinux& operator=(const ProcessReaderLinux&) = delete;
|
||||
|
||||
~ProcessReaderLinux();
|
||||
|
||||
//! \brief Initializes this object.
|
||||
@ -175,8 +178,6 @@ class ProcessReaderLinux {
|
||||
bool initialized_threads_;
|
||||
bool initialized_modules_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ProcessReaderLinux);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -103,6 +103,10 @@ constexpr char kTestMemory[] = "Read me from another process";
|
||||
class BasicChildTest : public Multiprocess {
|
||||
public:
|
||||
BasicChildTest() : Multiprocess() {}
|
||||
|
||||
BasicChildTest(const BasicChildTest&) = delete;
|
||||
BasicChildTest& operator=(const BasicChildTest&) = delete;
|
||||
|
||||
~BasicChildTest() {}
|
||||
|
||||
private:
|
||||
@ -129,8 +133,6 @@ class BasicChildTest : public Multiprocess {
|
||||
}
|
||||
|
||||
void MultiprocessChild() override { CheckedReadFileAtEOF(ReadPipeHandle()); }
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BasicChildTest);
|
||||
};
|
||||
|
||||
TEST(ProcessReaderLinux, ChildBasic) {
|
||||
@ -151,6 +153,9 @@ class TestThreadPool {
|
||||
|
||||
TestThreadPool() : threads_() {}
|
||||
|
||||
TestThreadPool(const TestThreadPool&) = delete;
|
||||
TestThreadPool& operator=(const TestThreadPool&) = delete;
|
||||
|
||||
~TestThreadPool() {
|
||||
for (const auto& thread : threads_) {
|
||||
thread->exit_semaphore.Signal();
|
||||
@ -252,8 +257,6 @@ class TestThreadPool {
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<Thread>> threads_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TestThreadPool);
|
||||
};
|
||||
|
||||
using ThreadMap = std::map<pid_t, TestThreadPool::ThreadExpectation>;
|
||||
@ -307,6 +310,10 @@ class ChildThreadTest : public Multiprocess {
|
||||
public:
|
||||
ChildThreadTest(size_t stack_size = 0)
|
||||
: Multiprocess(), stack_size_(stack_size) {}
|
||||
|
||||
ChildThreadTest(const ChildThreadTest&) = delete;
|
||||
ChildThreadTest& operator=(const ChildThreadTest&) = delete;
|
||||
|
||||
~ChildThreadTest() {}
|
||||
|
||||
private:
|
||||
@ -375,8 +382,6 @@ class ChildThreadTest : public Multiprocess {
|
||||
|
||||
static constexpr size_t kThreadCount = 3;
|
||||
const size_t stack_size_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ChildThreadTest);
|
||||
};
|
||||
|
||||
TEST(ProcessReaderLinux, ChildWithThreads) {
|
||||
@ -393,6 +398,10 @@ TEST(ProcessReaderLinux, ChildThreadsWithSmallUserStacks) {
|
||||
class ChildWithSplitStackTest : public Multiprocess {
|
||||
public:
|
||||
ChildWithSplitStackTest() : Multiprocess(), page_size_(getpagesize()) {}
|
||||
|
||||
ChildWithSplitStackTest(const ChildWithSplitStackTest&) = delete;
|
||||
ChildWithSplitStackTest& operator=(const ChildWithSplitStackTest&) = delete;
|
||||
|
||||
~ChildWithSplitStackTest() {}
|
||||
|
||||
private:
|
||||
@ -465,8 +474,6 @@ class ChildWithSplitStackTest : public Multiprocess {
|
||||
}
|
||||
|
||||
const size_t page_size_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ChildWithSplitStackTest);
|
||||
};
|
||||
|
||||
// AddressSanitizer with use-after-return detection causes stack variables to
|
||||
@ -587,6 +594,10 @@ TEST(ProcessReaderLinux, SelfModules) {
|
||||
class ChildModuleTest : public Multiprocess {
|
||||
public:
|
||||
ChildModuleTest() : Multiprocess(), module_soname_("test_module_soname") {}
|
||||
|
||||
ChildModuleTest(const ChildModuleTest&) = delete;
|
||||
ChildModuleTest& operator=(const ChildModuleTest&) = delete;
|
||||
|
||||
~ChildModuleTest() = default;
|
||||
|
||||
private:
|
||||
@ -620,8 +631,6 @@ class ChildModuleTest : public Multiprocess {
|
||||
}
|
||||
|
||||
const std::string module_soname_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ChildModuleTest);
|
||||
};
|
||||
|
||||
TEST(ProcessReaderLinux, ChildModules) {
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "snapshot/crashpad_info_client_options.h"
|
||||
#include "snapshot/elf/module_snapshot_elf.h"
|
||||
#include "snapshot/linux/exception_snapshot_linux.h"
|
||||
@ -49,6 +48,10 @@ namespace crashpad {
|
||||
class ProcessSnapshotLinux final : public ProcessSnapshot {
|
||||
public:
|
||||
ProcessSnapshotLinux();
|
||||
|
||||
ProcessSnapshotLinux(const ProcessSnapshotLinux&) = delete;
|
||||
ProcessSnapshotLinux& operator=(const ProcessSnapshotLinux&) = delete;
|
||||
|
||||
~ProcessSnapshotLinux() override;
|
||||
|
||||
//! \brief Initializes the object.
|
||||
@ -147,8 +150,6 @@ class ProcessSnapshotLinux final : public ProcessSnapshot {
|
||||
ProcessReaderLinux process_reader_;
|
||||
ProcessMemoryRange memory_range_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotLinux);
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user