// // Copyright 2022 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // backtrace_utils.h: // Tools to extract the backtrace from the ANGLE code during execution. // #ifndef COMMON_BACKTRACEUTILS_H_ #define COMMON_BACKTRACEUTILS_H_ #include <string> #include <vector> #include "debug.h" #include "hash_utils.h" namespace angle { // Used to store the backtrace information, such as the stack addresses and symbols. class BacktraceInfo { … }; // Used to obtain the stack addresses and symbols from the device, when // angle_enable_unwind_backtrace_support is enabled on Android. Otherwise , it returns an empty // object. BacktraceInfo getBacktraceInfo(); // Used to print the stack addresses and symbols embedded in the BacktraceInfo object. void printBacktraceInfo(BacktraceInfo backtraceInfo); } // namespace angle // Introduce std::hash for BacktraceInfo so it can be used as key for angle::HashMap. namespace std { template <> struct hash<angle::BacktraceInfo> { … }; } // namespace std #endif // COMMON_BACKTRACEUTILS_H_