chromium/third_party/crashpad/crashpad/handler/linux/cros_crash_report_exception_handler.cc

// Copyright 2019 The Crashpad Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "handler/linux/cros_crash_report_exception_handler.h"

#include <vector>

#include "base/logging.h"
#include "base/strings/stringprintf.h"
#if defined(CRASHPAD_IS_IN_CHROMIUM)
#include "base/system/sys_info.h"
#endif // CRASHPAD_IS_IN_CHROMIUM
#include "client/settings.h"
#include "handler/linux/capture_snapshot.h"
#include "handler/minidump_to_upload_parameters.h"
#include "minidump/minidump_file_writer.h"
#include "snapshot/linux/process_snapshot_linux.h"
#include "snapshot/minidump/process_snapshot_minidump.h"
#include "snapshot/sanitized/process_snapshot_sanitized.h"
#include "util/file/file_writer.h"
#include "util/linux/direct_ptrace_connection.h"
#include "util/linux/ptrace_client.h"
#include "util/misc/metrics.h"
#include "util/misc/uuid.h"
#include "util/posix/spawn_subprocess.h"

namespace crashpad {

namespace {

// Returns the process name for a pid.
const std::string GetProcessNameFromPid(pid_t pid) {}

bool WriteAnnotationsAndMinidump(
    const std::map<std::string, std::string>& parameters,
    MinidumpFileWriter& minidump,
    FileWriter& file_writer) {}

}  // namespace

CrosCrashReportExceptionHandler::CrosCrashReportExceptionHandler(
    CrashReportDatabase* database,
    const std::map<std::string, std::string>* process_annotations,
    const UserStreamDataSources* user_stream_data_sources)
    :{}

CrosCrashReportExceptionHandler::~CrosCrashReportExceptionHandler() = default;

bool CrosCrashReportExceptionHandler::HandleException(
    pid_t client_process_id,
    uid_t client_uid,
    const ExceptionHandlerProtocol::ClientInformation& info,
    VMAddress requesting_thread_stack_address,
    pid_t* requesting_thread_id,
    UUID* local_report_id) {}

bool CrosCrashReportExceptionHandler::HandleExceptionWithBroker(
    pid_t client_process_id,
    uid_t client_uid,
    const ExceptionHandlerProtocol::ClientInformation& info,
    int broker_sock,
    UUID* local_report_id) {}

bool CrosCrashReportExceptionHandler::HandleExceptionWithConnection(
    PtraceConnection* connection,
    const ExceptionHandlerProtocol::ClientInformation& info,
    uid_t client_uid,
    VMAddress requesting_thread_stack_address,
    pid_t* requesting_thread_id,
    UUID* local_report_id) {}

}  // namespace crashpad