12c43cff01d1271be451671567955158629b23670Christopher Ferris/* 22c43cff01d1271be451671567955158629b23670Christopher Ferris * Copyright (C) 2013 The Android Open Source Project 32c43cff01d1271be451671567955158629b23670Christopher Ferris * 42c43cff01d1271be451671567955158629b23670Christopher Ferris * Licensed under the Apache License, Version 2.0 (the "License"); 52c43cff01d1271be451671567955158629b23670Christopher Ferris * you may not use this file except in compliance with the License. 62c43cff01d1271be451671567955158629b23670Christopher Ferris * You may obtain a copy of the License at 72c43cff01d1271be451671567955158629b23670Christopher Ferris * 82c43cff01d1271be451671567955158629b23670Christopher Ferris * http://www.apache.org/licenses/LICENSE-2.0 92c43cff01d1271be451671567955158629b23670Christopher Ferris * 102c43cff01d1271be451671567955158629b23670Christopher Ferris * Unless required by applicable law or agreed to in writing, software 112c43cff01d1271be451671567955158629b23670Christopher Ferris * distributed under the License is distributed on an "AS IS" BASIS, 122c43cff01d1271be451671567955158629b23670Christopher Ferris * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 132c43cff01d1271be451671567955158629b23670Christopher Ferris * See the License for the specific language governing permissions and 142c43cff01d1271be451671567955158629b23670Christopher Ferris * limitations under the License. 152c43cff01d1271be451671567955158629b23670Christopher Ferris */ 162c43cff01d1271be451671567955158629b23670Christopher Ferris 172c43cff01d1271be451671567955158629b23670Christopher Ferris#ifndef _LIBBACKTRACE_BACKTRACE_PTRACE_H 182c43cff01d1271be451671567955158629b23670Christopher Ferris#define _LIBBACKTRACE_BACKTRACE_PTRACE_H 192c43cff01d1271be451671567955158629b23670Christopher Ferris 202c43cff01d1271be451671567955158629b23670Christopher Ferris#include <stdint.h> 212c43cff01d1271be451671567955158629b23670Christopher Ferris#include <sys/types.h> 222c43cff01d1271be451671567955158629b23670Christopher Ferris 232c43cff01d1271be451671567955158629b23670Christopher Ferris#include <backtrace/Backtrace.h> 242c43cff01d1271be451671567955158629b23670Christopher Ferris 252c43cff01d1271be451671567955158629b23670Christopher Ferrisclass BacktraceMap; 262c43cff01d1271be451671567955158629b23670Christopher Ferris 272c43cff01d1271be451671567955158629b23670Christopher Ferrisclass BacktracePtrace : public Backtrace { 282c43cff01d1271be451671567955158629b23670Christopher Ferrispublic: 292c43cff01d1271be451671567955158629b23670Christopher Ferris BacktracePtrace(pid_t pid, pid_t tid, BacktraceMap* map) : Backtrace(pid, tid, map) {} 302c43cff01d1271be451671567955158629b23670Christopher Ferris virtual ~BacktracePtrace() {} 312c43cff01d1271be451671567955158629b23670Christopher Ferris 322c43cff01d1271be451671567955158629b23670Christopher Ferris size_t Read(uintptr_t addr, uint8_t* buffer, size_t bytes); 332c43cff01d1271be451671567955158629b23670Christopher Ferris 342c43cff01d1271be451671567955158629b23670Christopher Ferris bool ReadWord(uintptr_t ptr, word_t* out_value); 352c43cff01d1271be451671567955158629b23670Christopher Ferris}; 362c43cff01d1271be451671567955158629b23670Christopher Ferris 372c43cff01d1271be451671567955158629b23670Christopher Ferris#endif // _LIBBACKTRACE_BACKTRACE_PTRACE_H 38