mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-30 01:06:56 +08:00
59c5d848e5
1) Add PtraceConnection which serves as the base class for specific types of connections Crashpad uses to trace processes. 2) Add DirectPtraceConnection which is used when the handler process has `ptrace` capabilities for the target process. 3) Move `ptrace` logic into Ptracer. This class isolates `ptrace` call logic for use by various PtraceConnection implementations. Bug: crashpad:30 Change-Id: I98083134a9f7d9f085e4cc816d2b85ffd6d73162 Reviewed-on: https://chromium-review.googlesource.com/671659 Commit-Queue: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Leonard Mosescu <mosescu@chromium.org>
39 lines
1.0 KiB
C++
39 lines
1.0 KiB
C++
// Copyright 2017 The Crashpad Authors. All rights reserved.
|
|
//
|
|
// 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 "util/linux/thread_info.h"
|
|
|
|
#include <string.h>
|
|
|
|
namespace crashpad {
|
|
|
|
ThreadContext::ThreadContext() {
|
|
memset(this, 0, sizeof(*this));
|
|
}
|
|
|
|
ThreadContext::~ThreadContext() {}
|
|
|
|
FloatContext::FloatContext() {
|
|
memset(this, 0, sizeof(*this));
|
|
}
|
|
|
|
FloatContext::~FloatContext() {}
|
|
|
|
ThreadInfo::ThreadInfo()
|
|
: thread_context(), float_context(), thread_specific_data_address(0) {}
|
|
|
|
ThreadInfo::~ThreadInfo() {}
|
|
|
|
} // namespace crashpad
|