1 | Starting program: /Users/Shared/libunwind_test/test_throw.libcxx.i386 |
---|
2 | unable to read unknown load command 0x24 |
---|
3 | unable to read unknown load command 0x26 |
---|
4 | unable to read unknown load command 0x24 |
---|
5 | unable to read unknown load command 0x26 |
---|
6 | unable to read unknown load command 0x24 |
---|
7 | unable to read unknown load command 0x26 |
---|
8 | Reading symbols for shared libraries ++++. done |
---|
9 | |
---|
10 | Breakpoint 1, 0x00001da4 in main () |
---|
11 | (gdb) step |
---|
12 | Single stepping until exit from function main, |
---|
13 | which has no line number information. |
---|
14 | unable to read unknown load command 0x24 |
---|
15 | __cxa_allocate_exception (thrown_size=4) at ../src/cxa_exception.cpp:160 |
---|
16 | 160 size_t actual_size = cxa_exception_size_from_exception_thrown_size(thrown_size); |
---|
17 | (gdb) |
---|
18 | Current language: auto; currently c++ |
---|
19 | __cxxabiv1::cxa_exception_size_from_exception_thrown_size (size=4) at ../src/cxa_exception.cpp:76 |
---|
20 | 76 return size + sizeof (__cxa_exception); |
---|
21 | (gdb) |
---|
22 | 76 return size + sizeof (__cxa_exception); |
---|
23 | (gdb) |
---|
24 | __cxa_allocate_exception (thrown_size=4) at ../src/cxa_exception.cpp:161 |
---|
25 | 161 __cxa_exception* exception_header = static_cast<__cxa_exception*>(do_malloc(actual_size)); |
---|
26 | (gdb) |
---|
27 | __cxxabiv1::do_malloc (size=84) at ../src/cxa_exception.cpp:111 |
---|
28 | 111 void *ptr = std::malloc(size); |
---|
29 | (gdb) |
---|
30 | 112 if (NULL == ptr) // if malloc fails, fall back to emergency stash |
---|
31 | (gdb) |
---|
32 | 114 return ptr; |
---|
33 | (gdb) |
---|
34 | 114 return ptr; |
---|
35 | (gdb) |
---|
36 | __cxa_allocate_exception (thrown_size=4) at ../src/cxa_exception.cpp:162 |
---|
37 | 162 if (NULL == exception_header) |
---|
38 | (gdb) |
---|
39 | 164 std::memset(exception_header, 0, actual_size); |
---|
40 | (gdb) |
---|
41 | 165 return thrown_object_from_cxa_exception(exception_header); |
---|
42 | (gdb) |
---|
43 | __cxxabiv1::thrown_object_from_cxa_exception (exception_header=0x300180) at ../src/cxa_exception.cpp:57 |
---|
44 | 57 return static_cast<void*>(exception_header + 1); |
---|
45 | (gdb) |
---|
46 | 57 return static_cast<void*>(exception_header + 1); |
---|
47 | (gdb) |
---|
48 | __cxa_allocate_exception (thrown_size=4) at ../src/cxa_exception.cpp:165 |
---|
49 | 165 return thrown_object_from_cxa_exception(exception_header); |
---|
50 | (gdb) |
---|
51 | 0x00001dd9 in main () |
---|
52 | (gdb) |
---|
53 | Single stepping until exit from function main, |
---|
54 | which has no line number information. |
---|
55 | unable to read unknown load command 0x24 |
---|
56 | __cxa_throw (thrown_object=0x3001d0, tinfo=0x270908, dest=0) at ../src/cxa_exception.cpp:223 |
---|
57 | 223 __cxa_eh_globals *globals = __cxa_get_globals(); |
---|
58 | (gdb) |
---|
59 | unable to read unknown load command 0x24 |
---|
60 | __cxa_get_globals () at ../src/cxa_exception_storage.cpp:75 |
---|
61 | 75 __cxa_eh_globals* retVal = __cxa_get_globals_fast (); |
---|
62 | (gdb) |
---|
63 | 78 if ( NULL == retVal ) { |
---|
64 | (gdb) |
---|
65 | 80 (std::calloc (1, sizeof (__cxa_eh_globals))); |
---|
66 | (gdb) |
---|
67 | 79 retVal = static_cast<__cxa_eh_globals*> |
---|
68 | (gdb) |
---|
69 | 81 if ( NULL == retVal ) |
---|
70 | (gdb) |
---|
71 | 83 if ( 0 != pthread_setspecific ( key_, retVal ) ) |
---|
72 | (gdb) |
---|
73 | 85 } |
---|
74 | (gdb) |
---|
75 | 86 return retVal; |
---|
76 | (gdb) |
---|
77 | 86 return retVal; |
---|
78 | (gdb) |
---|
79 | __cxa_throw (thrown_object=0x3001d0, tinfo=0x270908, dest=0) at ../src/cxa_exception.cpp:223 |
---|
80 | 223 __cxa_eh_globals *globals = __cxa_get_globals(); |
---|
81 | (gdb) |
---|
82 | 224 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object); |
---|
83 | (gdb) |
---|
84 | __cxxabiv1::cxa_exception_from_thrown_object (thrown_object=0x3001d0) at ../src/cxa_exception.cpp:47 |
---|
85 | 47 return static_cast<__cxa_exception*>(thrown_object) - 1; |
---|
86 | (gdb) |
---|
87 | 47 return static_cast<__cxa_exception*>(thrown_object) - 1; |
---|
88 | (gdb) |
---|
89 | __cxa_throw (thrown_object=0x3001d0, tinfo=0x270908, dest=0) at ../src/cxa_exception.cpp:224 |
---|
90 | 224 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object); |
---|
91 | (gdb) |
---|
92 | 226 exception_header->unexpectedHandler = std::get_unexpected(); |
---|
93 | (gdb) |
---|
94 | unable to read unknown load command 0x24 |
---|
95 | std::get_unexpected () at ../src/cxa_handlers.cpp:29 |
---|
96 | 29 return __sync_fetch_and_add(&__cxa_unexpected_handler, (unexpected_handler)0); |
---|
97 | (gdb) |
---|
98 | 29 return __sync_fetch_and_add(&__cxa_unexpected_handler, (unexpected_handler)0); |
---|
99 | (gdb) |
---|
100 | __cxa_throw (thrown_object=0x3001d0, tinfo=0x270908, dest=0) at ../src/cxa_exception.cpp:226 |
---|
101 | 226 exception_header->unexpectedHandler = std::get_unexpected(); |
---|
102 | (gdb) |
---|
103 | 227 exception_header->terminateHandler = std::get_terminate(); |
---|
104 | (gdb) |
---|
105 | std::get_terminate () at ../src/cxa_handlers.cpp:54 |
---|
106 | 54 return __sync_fetch_and_add(&__cxa_terminate_handler, (terminate_handler)0); |
---|
107 | (gdb) |
---|
108 | 54 return __sync_fetch_and_add(&__cxa_terminate_handler, (terminate_handler)0); |
---|
109 | (gdb) |
---|
110 | __cxa_throw (thrown_object=0x3001d0, tinfo=0x270908, dest=0) at ../src/cxa_exception.cpp:227 |
---|
111 | 227 exception_header->terminateHandler = std::get_terminate(); |
---|
112 | (gdb) |
---|
113 | 228 exception_header->exceptionType = tinfo; |
---|
114 | (gdb) |
---|
115 | 229 exception_header->exceptionDestructor = dest; |
---|
116 | (gdb) |
---|
117 | 230 setExceptionClass(&exception_header->unwindHeader); |
---|
118 | (gdb) |
---|
119 | __cxxabiv1::setExceptionClass (unwind_exception=0x3001b0) at ../src/cxa_exception.cpp:80 |
---|
120 | 80 unwind_exception->exception_class = kOurExceptionClass; |
---|
121 | (gdb) |
---|
122 | 81 } |
---|
123 | (gdb) |
---|
124 | __cxa_throw (thrown_object=0x3001d0, tinfo=0x270908, dest=0) at ../src/cxa_exception.cpp:231 |
---|
125 | 231 exception_header->referenceCount = 1; // This is a newly allocated exception, no need for thread safety. |
---|
126 | (gdb) |
---|
127 | 232 globals->uncaughtExceptions += 1; // Not atomically, since globals are thread-local |
---|
128 | (gdb) |
---|
129 | 234 exception_header->unwindHeader.exception_cleanup = exception_cleanup_func; |
---|
130 | (gdb) |
---|
131 | 238 _Unwind_RaiseException(&exception_header->unwindHeader); |
---|
132 | (gdb) |
---|
133 | |
---|
134 | |
---|
135 | |
---|
136 | |
---|
137 | |
---|
138 | 242 failed_throw(exception_header); |
---|
139 | (gdb) |
---|
140 | 242 failed_throw(exception_header); |
---|
141 | (gdb) |
---|
142 | __cxxabiv1::failed_throw (exception_header=0x300180) at ../src/cxa_exception.cpp:148 |
---|
143 | 148 (void) __cxa_begin_catch(&exception_header->unwindHeader); |
---|
144 | (gdb) |
---|
145 | __cxa_begin_catch (unwind_arg=0x3001b0) at ../src/cxa_exception.cpp:384 |
---|
146 | 384 _Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(unwind_arg); |
---|
147 | (gdb) |
---|
148 | 385 bool native_exception = isOurExceptionClass(unwind_exception); |
---|
149 | (gdb) |
---|
150 | __cxxabiv1::isOurExceptionClass (unwind_exception=0x3001b0) at ../src/cxa_exception.cpp:89 |
---|
151 | 89 return (unwind_exception->exception_class & get_vendor_and_language) == |
---|
152 | (gdb) |
---|
153 | 89 return (unwind_exception->exception_class & get_vendor_and_language) == |
---|
154 | (gdb) |
---|
155 | __cxa_begin_catch (unwind_arg=0x3001b0) at ../src/cxa_exception.cpp:386 |
---|
156 | 386 __cxa_eh_globals* globals = __cxa_get_globals(); |
---|
157 | (gdb) |
---|
158 | __cxa_get_globals () at ../src/cxa_exception_storage.cpp:75 |
---|
159 | 75 __cxa_eh_globals* retVal = __cxa_get_globals_fast (); |
---|
160 | (gdb) |
---|
161 | 78 if ( NULL == retVal ) { |
---|
162 | (gdb) |
---|
163 | 86 return retVal; |
---|
164 | (gdb) |
---|
165 | 86 return retVal; |
---|
166 | (gdb) |
---|
167 | __cxa_begin_catch (unwind_arg=0x3001b0) at ../src/cxa_exception.cpp:393 |
---|
168 | 393 static_cast<_Unwind_Exception*>(unwind_exception) |
---|
169 | (gdb) |
---|
170 | 391 cxa_exception_from_exception_unwind_exception |
---|
171 | (gdb) |
---|
172 | __cxxabiv1::cxa_exception_from_exception_unwind_exception (unwind_exception=0x3001b0) at ../src/cxa_exception.cpp:68 |
---|
173 | 68 return cxa_exception_from_thrown_object(unwind_exception + 1 ); |
---|
174 | (gdb) |
---|
175 | __cxxabiv1::cxa_exception_from_thrown_object (thrown_object=0x3001d0) at ../src/cxa_exception.cpp:47 |
---|
176 | 47 return static_cast<__cxa_exception*>(thrown_object) - 1; |
---|
177 | (gdb) |
---|
178 | 47 return static_cast<__cxa_exception*>(thrown_object) - 1; |
---|
179 | (gdb) |
---|
180 | __cxxabiv1::cxa_exception_from_exception_unwind_exception (unwind_exception=0x3001b0) at ../src/cxa_exception.cpp:68 |
---|
181 | 68 return cxa_exception_from_thrown_object(unwind_exception + 1 ); |
---|
182 | (gdb) |
---|
183 | __cxa_begin_catch (unwind_arg=0x3001b0) at ../src/cxa_exception.cpp:390 |
---|
184 | 390 __cxa_exception* exception_header = |
---|
185 | (gdb) |
---|
186 | 395 if (native_exception) |
---|
187 | (gdb) |
---|
188 | 398 exception_header->handlerCount = exception_header->handlerCount < 0 ? |
---|
189 | (gdb) |
---|
190 | 399 -exception_header->handlerCount + 1 : exception_header->handlerCount + 1; |
---|
191 | (gdb) |
---|
192 | 398 exception_header->handlerCount = exception_header->handlerCount < 0 ? |
---|
193 | (gdb) |
---|
194 | 402 if (exception_header != globals->caughtExceptions) |
---|
195 | (gdb) |
---|
196 | 404 exception_header->nextException = globals->caughtExceptions; |
---|
197 | (gdb) |
---|
198 | 405 globals->caughtExceptions = exception_header; |
---|
199 | (gdb) |
---|
200 | 406 } |
---|
201 | (gdb) |
---|
202 | 407 globals->uncaughtExceptions -= 1; // Not atomically, since globals are thread-local |
---|
203 | (gdb) |
---|
204 | 411 return exception_header->adjustedPtr; |
---|
205 | (gdb) |
---|
206 | 421 } |
---|
207 | (gdb) |
---|
208 | __cxxabiv1::failed_throw (exception_header=0x300180) at ../src/cxa_exception.cpp:149 |
---|
209 | 149 std::__terminate(exception_header->terminateHandler); |
---|
210 | (gdb) |
---|
211 | 149 std::__terminate(exception_header->terminateHandler); |
---|
212 | (gdb) |
---|
213 | unable to read unknown load command 0x24 |
---|
214 | std::__terminate (func=0x1ff210 <default_terminate_handler()>) at ../src/cxa_handlers.cpp:68 |
---|
215 | 68 func(); |
---|
216 | (gdb) |
---|
217 | default_terminate_handler () at ../src/cxa_default_handlers.cpp:29 |
---|
218 | 29 __cxa_eh_globals* globals = __cxa_get_globals_fast(); |
---|
219 | (gdb) |
---|
220 | 30 if (globals) |
---|
221 | (gdb) |
---|
222 | 32 __cxa_exception* exception_header = globals->caughtExceptions; |
---|
223 | (gdb) |
---|
224 | 34 if (exception_header) |
---|
225 | (gdb) |
---|
226 | 37 reinterpret_cast<_Unwind_Exception*>(exception_header + 1) - 1; |
---|
227 | (gdb) |
---|
228 | 36 _Unwind_Exception* unwind_exception = |
---|
229 | (gdb) |
---|
230 | 39 (unwind_exception->exception_class & get_vendor_and_language) == |
---|
231 | (gdb) |
---|
232 | 38 bool native_exception = |
---|
233 | (gdb) |
---|
234 | 41 if (native_exception) |
---|
235 | (gdb) |
---|
236 | 44 unwind_exception->exception_class == kOurDependentExceptionClass ? |
---|
237 | (gdb) |
---|
238 | 46 exception_header + 1; |
---|
239 | (gdb) |
---|
240 | 44 unwind_exception->exception_class == kOurDependentExceptionClass ? |
---|
241 | (gdb) |
---|
242 | 43 void* thrown_object = |
---|
243 | (gdb) |
---|
244 | 48 static_cast<const __shim_type_info*>(exception_header->exceptionType); |
---|
245 | (gdb) |
---|
246 | 47 const __shim_type_info* thrown_type = |
---|
247 | (gdb) |
---|
248 | 52 size_t len = sizeof(buf); |
---|
249 | (gdb) |
---|
250 | 53 const char* name = __cxa_demangle(thrown_type->name(), buf, &len, &status); |
---|
251 | (gdb) |
---|
252 | std::type_info::name () at typeinfo:97 |
---|
253 | 97 #ifndef _LIBCPP_NONUNIQUE_RTTI_BIT |
---|
254 | (gdb) |
---|
255 | unable to read unknown load command 0x24 |
---|
256 | |
---|
257 | Die: DW_TAG_<unknown> (abbrev = 104, offset = 280975) |
---|
258 | has children: FALSE |
---|
259 | attributes: |
---|
260 | DW_AT_type (DW_FORM_ref4) constant ref: 237932 (adjusted) |
---|
261 | warning: Got an error handling event: "Dwarf Error: Cannot find type of die [in module /usr/lib/libc++abi.dylib]". |
---|
262 | (gdb) |
---|
263 | unable to read unknown load command 0x24 |
---|
264 | |
---|
265 | Die: DW_TAG_<unknown> (abbrev = 104, offset = 280975) |
---|
266 | has children: FALSE |
---|
267 | attributes: |
---|
268 | DW_AT_type (DW_FORM_ref4) constant ref: 237932 (adjusted) |
---|
269 | Dwarf Error: Cannot find type of die [in module /usr/lib/libc++abi.dylib] |
---|
270 | (gdb) |
---|
271 | unable to read unknown load command 0x24 |
---|
272 | |
---|
273 | Die: DW_TAG_<unknown> (abbrev = 104, offset = 280975) |
---|
274 | has children: FALSE |
---|
275 | attributes: |
---|
276 | DW_AT_type (DW_FORM_ref4) constant ref: 237932 (adjusted) |
---|
277 | |
---|
278 | - that error repeat many times until |
---|
279 | |
---|
280 | (gdb) continue |
---|
281 | Continuing. |
---|
282 | libc++abi.dylib: terminating with uncaught exception of type char const* |
---|
283 | unable to read unknown load command 0x24 |
---|
284 | Die: DW_TAG_<unknown> (abbrev = 104, offset = 280975) |
---|
285 | has children: FALSE |
---|
286 | attributes: |
---|
287 | DW_AT_type (DW_FORM_ref4) constant ref: 237932 (adjusted) |
---|