• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef _DEBUGGERD_TEST_HOST_SIGNAL_FIXUP_H
18 #define _DEBUGGERD_TEST_HOST_SIGNAL_FIXUP_H
19 
20 #include <signal.h>
21 
22 #if !defined(__BIONIC__)
23 
24 // In order to compile parts of debuggerd for the host, we need to
25 // define these values.
26 
27 #if !defined(NSIGILL)
28 #define NSIGILL ILL_BADSTK
29 #endif
30 
31 #if !defined(BUS_MCEERR_AR)
32 #define BUS_MCEERR_AR 4
33 #endif
34 #if !defined(BUS_MCEERR_AO)
35 #define BUS_MCEERR_AO 5
36 #endif
37 #if !defined(NSIGBUS)
38 #define NSIGBUS BUS_MCEERR_AO
39 #endif
40 
41 #if !defined(NSIGFPE)
42 #define NSIGFPE FPE_FLTSUB
43 #endif
44 
45 #if !defined(NSIGSEGV)
46 #define NSIGSEGV SEGV_ACCERR
47 #endif
48 
49 #if !defined(TRAP_BRANCH)
50 #define TRAP_BRANCH 3
51 #endif
52 #if !defined(TRAP_HWBKPT)
53 #define TRAP_HWBKPT 4
54 #endif
55 #if !defined(NSIGTRAP)
56 #define NSIGTRAP TRAP_HWBKPT
57 #endif
58 
59 #if !defined(SI_DETHREAD)
60 #define SI_DETHREAD -7
61 #endif
62 
63 #endif
64 
65 #endif // _DEBUGGERD_TEST_HOST_SIGNAL_FIXUP_H
66