• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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 
16 #ifndef DFX_PROCESSDUMP_TEST_H
17 #define DFX_PROCESSDUMP_TEST_H
18 
19 #include <gtest/gtest.h>
20 
21 #include "dfx_define.h"
22 
23 #if defined(__arm__)
24     #define REGISTERS           "r0:","r1:","r2:","r3:","r4:","r5:","r6:",\
25                                 "r7:","r8:","r9:","r10:","fp:","ip:","sp:","lr:","pc:"
26     #define REGISTERS_NUM       16
27     #define REGISTERS_LENGTH    10
28 #elif defined(__aarch64__)
29     #define REGISTERS           "x0:","x1:","x2:","x3:","x4:","x5:","x6:","x7:","x8:",\
30                                 "x9:","x10:","x11:","x12:","x13:","x14:","x15:","x16:",\
31                                 "x17:","x18:","x19:","x20:","x21:","x22:","x23:","x24:",\
32                                 "x25:","x26:","x27:","x28:","x29:","lr:","sp:","pc:"
33     #define REGISTERS_NUM       33
34     #define REGISTERS_LENGTH    18
35 #endif
36 
37 namespace OHOS {
38 namespace HiviewDFX {
39 class DfxProcessDumpTest : public testing::Test {
40 public:
41     static void SetUpTestCase(void);
42     static void TearDownTestCase(void);
43     void SetUp();
44     void TearDown();
45 };
46 } // namespace HiviewDFX
47 } // namespace OHOS
48 #endif // DFX_PROCESSDUMP_TEST_H