• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-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 #ifndef DFX_SIGNAL_HANDLER_H
16 #define DFX_SIGNAL_HANDLER_H
17 
18 #include <inttypes.h>
19 #include <signal.h>
20 #include <ucontext.h>
21 #include "dfx_define.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 struct ProcessDumpRequest {
27     int32_t type;
28     int32_t tid;
29     int32_t recycleTid;
30     int32_t pid;
31     int32_t vmPid;
32     uint32_t uid;
33     uint64_t reserved;
34     uint64_t timeStamp;
35     siginfo_t siginfo;
36     ucontext_t context;
37     char threadName[NAME_LEN];
38     char processName[NAME_LEN];
39     char lastFatalMessage[MAX_FATAL_MSG_SIZE];
40     TraceInfo traceInfo;
41 };
42 
43 void DFX_InstallSignalHandler(void);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 #endif
49