Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 : #include "cloud_v5_platform.h"
11 :
12 : #include "adump_platform_registry.h"
13 : #include "kernel_pc_fixer.h"
14 : #include "register_config.h"
15 :
16 : namespace Adx {
17 :
18 : ADUMP_PLATFORM_REGISTER(FeaturesSupportInterface, PlatformType::CHIP_CLOUD_V5, CloudV5Features);
19 : ADUMP_PLATFORM_REGISTER(CoredumpInterface, PlatformType::CHIP_CLOUD_V5, CloudV5Coredump);
20 : ADUMP_PLATFORM_REGISTER(ExceptionDumpInterface, PlatformType::CHIP_CLOUD_V5, CloudV5Exception);
21 : ADUMP_PLATFORM_REGISTER(DataDumpInterface, PlatformType::CHIP_CLOUD_V5, CloudV5DataDump);
22 :
23 0 : CloudV5Features::CloudV5Features()
24 : {
25 0 : supported_ = {
26 : AdumpPlatformFeature::FEATURE_DATA_DUMP,
27 : AdumpPlatformFeature::FEATURE_OVERFLOW_DUMP,
28 : AdumpPlatformFeature::FEATURE_EXCEPTION_DUMP_L0,
29 : AdumpPlatformFeature::FEATURE_EXCEPTION_DUMP_L1,
30 : AdumpPlatformFeature::FEATURE_CORE_DUMP,
31 0 : };
32 0 : }
33 :
34 1 : std::unique_ptr<PcFixerInterface> CloudV5Coredump::CreatePcFixer() const
35 : {
36 1 : return std::unique_ptr<PcFixerInterface>(new (std::nothrow) CloudV5PcFixer());
37 : }
38 :
39 2 : std::shared_ptr<RegisterInterface> CloudV5Coredump::CreateRegister() const
40 : {
41 2 : return std::make_shared<CloudV5Register>();
42 : }
43 :
44 : } // namespace Adx
|