1 /* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef HIVIEW_FAULT_LOG_INFO_H 16 #define HIVIEW_FAULT_LOG_INFO_H 17 #include <cinttypes> 18 #include <list> 19 #include <map> 20 #include <string> 21 22 namespace OHOS { 23 namespace HiviewDFX { 24 struct FaultLogInfo { 25 int64_t time {0}; 26 int32_t id {0}; 27 int32_t pid {0}; 28 int32_t faultLogType {0}; 29 int32_t fd = {-1}; 30 std::string module; 31 std::string reason; 32 std::string summary; 33 std::string logPath; 34 std::map<std::string, std::string> sectionMap; 35 std::list<std::string> additionalLogs; 36 }; 37 38 enum FaultLogType { 39 ALL = 0, 40 CPP_CRASH = 2, 41 JS_CRASH, 42 APP_FREEZE, 43 SYS_FREEZE, 44 RUST_PANIC, 45 }; 46 } // namespace HiviewDFX 47 } // namespace OHOS 48 #endif // HIVIEW_FAULT_LOG_INFO_H 49