Hi danalbert, rengolin, jroelofs,
Implement an undocumented _US_FORCE_UNWIND state for force
unwinding.
http://reviews.llvm.org/D7031
Files:
src/cxa_personality.cpp
Index: src/cxa_personality.cpp
===================================================================
--- src/cxa_personality.cpp
+++ src/cxa_personality.cpp
@@ -1101,9 +1101,17 @@
_Unwind_SetGR(context, REG_UCB,
reinterpret_cast<uint32_t>(unwind_exception));
#endif
+ // Check the undocumented force unwinding behavior
+ const unsigned _US_FORCE_UNWIND = 8u;
+ bool is_force_unwinding = static_cast<unsigned>(state) & _US_FORCE_UNWIND;
+ state = static_cast<_Unwind_State>(static_cast<unsigned>(state) &
~_US_FORCE_UNWIND);
+
scan_results results;
switch (state) {
case _US_VIRTUAL_UNWIND_FRAME:
+ if (is_force_unwinding)
+ return continue_unwind(unwind_exception, context);
+
// Phase 1 search: All we're looking for in phase 1 is a handler that
halts unwinding
scan_eh_tab(results, _UA_SEARCH_PHASE, native_exception,
unwind_exception, context);
if (results.reason == _URC_HANDLER_FOUND)
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
Index: src/cxa_personality.cpp
===================================================================
--- src/cxa_personality.cpp
+++ src/cxa_personality.cpp
@@ -1101,9 +1101,17 @@
_Unwind_SetGR(context, REG_UCB, reinterpret_cast<uint32_t>(unwind_exception));
#endif
+ // Check the undocumented force unwinding behavior
+ const unsigned _US_FORCE_UNWIND = 8u;
+ bool is_force_unwinding = static_cast<unsigned>(state) & _US_FORCE_UNWIND;
+ state = static_cast<_Unwind_State>(static_cast<unsigned>(state) & ~_US_FORCE_UNWIND);
+
scan_results results;
switch (state) {
case _US_VIRTUAL_UNWIND_FRAME:
+ if (is_force_unwinding)
+ return continue_unwind(unwind_exception, context);
+
// Phase 1 search: All we're looking for in phase 1 is a handler that halts unwinding
scan_eh_tab(results, _UA_SEARCH_PHASE, native_exception, unwind_exception, context);
if (results.reason == _URC_HANDLER_FOUND)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits