1 /* 2 * 3 * honggfuzz - tracing processes with ptrace() 4 * ----------------------------------------- 5 * 6 * Author: Robert Swiecki <swiecki (at) google.com> 7 * 8 * Copyright 2010-2017 by Google Inc. All Rights Reserved. 9 * 10 * Licensed under the Apache License, Version 2.0 (the "License"); you may 11 * not use this file except in compliance with the License. You may obtain 12 * a copy of the License at 13 * 14 * http://www.apache.org/licenses/LICENSE-2.0 15 * 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an "AS IS" BASIS, 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 19 * implied. See the License for the specific language governing 20 * permissions and limitations under the License. 21 * 22 */ 23 24 #ifndef _HF_LINUX_TRACE_H_ 25 #define _HF_LINUX_TRACE_H_ 26 27 #include <inttypes.h> 28 29 #include "honggfuzz.h" 30 31 #define _HF_DYNFILE_SUB_MASK 0xFFFUL // Zero-set two MSB 32 33 /* Constant prefix used for single frame crashes stackhash masking */ 34 #define _HF_SINGLE_FRAME_MASK 0xBADBAD0000000000 35 36 extern bool arch_traceWaitForPidStop(pid_t pid); 37 extern bool arch_traceEnable(run_t* run); 38 extern void arch_traceAnalyze(run_t* run, int status, pid_t pid); 39 extern void arch_traceExitAnalyze(run_t* run, pid_t pid); 40 extern bool arch_traceAttach(run_t* run, pid_t pid); 41 extern void arch_traceDetach(pid_t pid); 42 extern void arch_traceGetCustomPerf(run_t* run, pid_t pid, uint64_t* cnt); 43 extern void arch_traceSetCustomPerf(run_t* run, pid_t pid, uint64_t cnt); 44 extern void arch_traceSignalsInit(honggfuzz_t* hfuzz); 45 46 #endif 47