aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch
blob: 80de8c6843db09273abf068ca3b13455278a57d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
From fa7a3b7312307acad0045549d5f306e7fd117804 Mon Sep 17 00:00:00 2001
From: Felix Janda <felix.janda@posteo.de>
Date: Sun, 1 Feb 2015 14:34:44 +0100
Subject: [PATCH 5/6] Import necessary definitions from stab.h

---
 configure.ac                        |   1 -
 src/common/android/include/stab.h   | 100 ------------------------------------
 src/common/common.gyp               |   1 -
 src/common/stabs_reader.cc          |   1 -
 src/common/stabs_reader.h           |  13 +++--
 src/common/stabs_reader_unittest.cc |   1 -
 6 files changed, 10 insertions(+), 107 deletions(-)
 delete mode 100644 src/common/android/include/stab.h

diff --git a/configure.ac b/configure.ac
index 2223920..0e55cd9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,7 +73,6 @@ AC_HEADER_STDC
 AC_SYS_LARGEFILE
 m4_include(m4/ax_pthread.m4)
 AX_PTHREAD
-AC_CHECK_HEADERS([a.out.h])
 
 # Only build Linux client libs when compiling for Linux
 case $host in
diff --git a/src/common/android/include/stab.h b/src/common/android/include/stab.h
deleted file mode 100644
index cd92902..0000000
--- a/src/common/android/include/stab.h
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) 2012, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
-#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
-
-#include <sys/cdefs.h>
-
-#ifdef __BIONIC_HAVE_STAB_H
-#include <stab.h>
-#else
-
-#ifdef __cplusplus
-extern "C" {
-#endif  // __cplusplus
-
-#define _STAB_CODE_LIST       \
-  _STAB_CODE_DEF(UNDF,0x00)   \
-  _STAB_CODE_DEF(GSYM,0x20)   \
-  _STAB_CODE_DEF(FNAME,0x22)  \
-  _STAB_CODE_DEF(FUN,0x24)    \
-  _STAB_CODE_DEF(STSYM,0x26)  \
-  _STAB_CODE_DEF(LCSYM,0x28)  \
-  _STAB_CODE_DEF(MAIN,0x2a)   \
-  _STAB_CODE_DEF(PC,0x30)     \
-  _STAB_CODE_DEF(NSYMS,0x32)  \
-  _STAB_CODE_DEF(NOMAP,0x34)  \
-  _STAB_CODE_DEF(OBJ,0x38)    \
-  _STAB_CODE_DEF(OPT,0x3c)    \
-  _STAB_CODE_DEF(RSYM,0x40)   \
-  _STAB_CODE_DEF(M2C,0x42)    \
-  _STAB_CODE_DEF(SLINE,0x44)  \
-  _STAB_CODE_DEF(DSLINE,0x46) \
-  _STAB_CODE_DEF(BSLINE,0x48) \
-  _STAB_CODE_DEF(BROWS,0x48)  \
-  _STAB_CODE_DEF(DEFD,0x4a)   \
-  _STAB_CODE_DEF(EHDECL,0x50) \
-  _STAB_CODE_DEF(MOD2,0x50)   \
-  _STAB_CODE_DEF(CATCH,0x54)  \
-  _STAB_CODE_DEF(SSYM,0x60)   \
-  _STAB_CODE_DEF(SO,0x64)     \
-  _STAB_CODE_DEF(LSYM,0x80)   \
-  _STAB_CODE_DEF(BINCL,0x82)  \
-  _STAB_CODE_DEF(SOL,0x84)    \
-  _STAB_CODE_DEF(PSYM,0xa0)   \
-  _STAB_CODE_DEF(EINCL,0xa2)  \
-  _STAB_CODE_DEF(ENTRY,0xa4)  \
-  _STAB_CODE_DEF(LBRAC,0xc0)  \
-  _STAB_CODE_DEF(EXCL,0xc2)   \
-  _STAB_CODE_DEF(SCOPE,0xc4)  \
-  _STAB_CODE_DEF(RBRAC,0xe0)  \
-  _STAB_CODE_DEF(BCOMM,0xe2)  \
-  _STAB_CODE_DEF(ECOMM,0xe4)  \
-  _STAB_CODE_DEF(ECOML,0xe8)  \
-  _STAB_CODE_DEF(NBTEXT,0xf0) \
-  _STAB_CODE_DEF(NBDATA,0xf2) \
-  _STAB_CODE_DEF(NBBSS,0xf4)  \
-  _STAB_CODE_DEF(NBSTS,0xf6)  \
-  _STAB_CODE_DEF(NBLCS,0xf8)  \
-  _STAB_CODE_DEF(LENG,0xfe)
-
-enum __stab_debug_code {
-#define _STAB_CODE_DEF(x,y)  N_##x = y,
-_STAB_CODE_LIST
-#undef _STAB_CODE_DEF
-};
-
-#ifdef __cplusplus
-}  // extern "C"
-#endif  // __cplusplus
-
-#endif  // __BIONIC_HAVE_STAB_H
-
-#endif  // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
diff --git a/src/common/common.gyp b/src/common/common.gyp
index f01ede5..c49ff85 100644
--- a/src/common/common.gyp
+++ b/src/common/common.gyp
@@ -46,7 +46,6 @@
         'android/include/elf.h',
         'android/include/link.h',
         'android/include/sgidefs.h',
-        'android/include/stab.h',
         'android/include/sys/procfs.h',
         'android/include/sys/signal.h',
         'android/include/sys/user.h',
diff --git a/src/common/stabs_reader.cc b/src/common/stabs_reader.cc
index 6019fc7..9562caa 100644
--- a/src/common/stabs_reader.cc
+++ b/src/common/stabs_reader.cc
@@ -34,7 +34,6 @@
 #include "common/stabs_reader.h"
 
 #include <assert.h>
-#include <stab.h>
 #include <string.h>
 
 #include <string>
diff --git a/src/common/stabs_reader.h b/src/common/stabs_reader.h
index d89afc0..591f007 100644
--- a/src/common/stabs_reader.h
+++ b/src/common/stabs_reader.h
@@ -53,12 +53,19 @@
 #include <config.h>
 #endif
 
-#ifdef HAVE_A_OUT_H
-#include <a.out.h>
-#endif
 #ifdef HAVE_MACH_O_NLIST_H
 #include <mach-o/nlist.h>
 #endif
+// Definitions from <stab.h> and <a.out.h> for systems which
+// do not have them
+#undef N_UNDF
+#define N_UNDF 0x0
+#define N_FUN 0x24
+#define N_SLINE 0x44
+#define N_SO 0x64
+#define N_LSYM 0x80
+#define N_BINCL 0x82
+#define N_SOL 0x84
 
 #include <string>
 #include <vector>
diff --git a/src/common/stabs_reader_unittest.cc b/src/common/stabs_reader_unittest.cc
index a84da1c..854ac42 100644
--- a/src/common/stabs_reader_unittest.cc
+++ b/src/common/stabs_reader_unittest.cc
@@ -33,7 +33,6 @@
 
 #include <assert.h>
 #include <errno.h>
-#include <stab.h>
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
-- 
2.0.5