rmaprath created this revision.
rmaprath added reviewers: jroelofs, logan.
rmaprath added subscribers: cfe-commits, logan.
Hi Jon,
Spotted some obviously unused code in `Unwind-EHABI.cpp` while working on
something else. This seem to have been introduced in revision
`9f323e0fca08a0d60c51c4d0927cd1485b064913` by @logan. Didn't want to commit
straight-away as I haven't touched the unwinder code yet. Feel free to commit
on my behalf.
Thanks.
/ Asiri
http://reviews.llvm.org/D19910
Files:
src/Unwind-EHABI.cpp
Index: src/Unwind-EHABI.cpp
===================================================================
--- src/Unwind-EHABI.cpp
+++ src/Unwind-EHABI.cpp
@@ -450,24 +450,6 @@
// Walk each frame looking for a place to stop.
for (bool handlerNotFound = true; handlerNotFound;) {
-
-#if !_LIBUNWIND_ARM_EHABI
- // Ask libuwind to get next frame (skip over first which is
- // _Unwind_RaiseException).
- int stepResult = unw_step(&cursor1);
- if (stepResult == 0) {
- _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step() reached
"
- "bottom => _URC_END_OF_STACK\n",
- static_cast<void *>(exception_object));
- return _URC_END_OF_STACK;
- } else if (stepResult < 0) {
- _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step failed =>
"
- "_URC_FATAL_PHASE1_ERROR\n",
- static_cast<void *>(exception_object));
- return _URC_FATAL_PHASE1_ERROR;
- }
-#endif
-
// See if frame has code to run (has personality routine).
unw_proc_info_t frameInfo;
if (unw_get_proc_info(&cursor1, &frameInfo) != UNW_ESUCCESS) {
@@ -566,9 +548,6 @@
// Walk each frame until we reach where search phase said to stop.
while (true) {
- // Ask libuwind to get next frame (skip over first which is
- // _Unwind_RaiseException or _Unwind_Resume).
- //
// Resume only ever makes sense for 1 frame.
_Unwind_State state =
resume ? _US_UNWIND_FRAME_RESUME : _US_UNWIND_FRAME_STARTING;
@@ -585,21 +564,6 @@
resume = false;
}
-#if !_LIBUNWIND_ARM_EHABI
- int stepResult = unw_step(&cursor2);
- if (stepResult == 0) {
- _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step() reached
"
- "bottom => _URC_END_OF_STACK\n",
- static_cast<void *>(exception_object));
- return _URC_END_OF_STACK;
- } else if (stepResult < 0) {
- _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step failed =>
"
- "_URC_FATAL_PHASE1_ERROR\n",
- static_cast<void *>(exception_object));
- return _URC_FATAL_PHASE2_ERROR;
- }
-#endif
-
// Get info about this frame.
unw_word_t sp;
unw_proc_info_t frameInfo;
Index: src/Unwind-EHABI.cpp
===================================================================
--- src/Unwind-EHABI.cpp
+++ src/Unwind-EHABI.cpp
@@ -450,24 +450,6 @@
// Walk each frame looking for a place to stop.
for (bool handlerNotFound = true; handlerNotFound;) {
-
-#if !_LIBUNWIND_ARM_EHABI
- // Ask libuwind to get next frame (skip over first which is
- // _Unwind_RaiseException).
- int stepResult = unw_step(&cursor1);
- if (stepResult == 0) {
- _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step() reached "
- "bottom => _URC_END_OF_STACK\n",
- static_cast<void *>(exception_object));
- return _URC_END_OF_STACK;
- } else if (stepResult < 0) {
- _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step failed => "
- "_URC_FATAL_PHASE1_ERROR\n",
- static_cast<void *>(exception_object));
- return _URC_FATAL_PHASE1_ERROR;
- }
-#endif
-
// See if frame has code to run (has personality routine).
unw_proc_info_t frameInfo;
if (unw_get_proc_info(&cursor1, &frameInfo) != UNW_ESUCCESS) {
@@ -566,9 +548,6 @@
// Walk each frame until we reach where search phase said to stop.
while (true) {
- // Ask libuwind to get next frame (skip over first which is
- // _Unwind_RaiseException or _Unwind_Resume).
- //
// Resume only ever makes sense for 1 frame.
_Unwind_State state =
resume ? _US_UNWIND_FRAME_RESUME : _US_UNWIND_FRAME_STARTING;
@@ -585,21 +564,6 @@
resume = false;
}
-#if !_LIBUNWIND_ARM_EHABI
- int stepResult = unw_step(&cursor2);
- if (stepResult == 0) {
- _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step() reached "
- "bottom => _URC_END_OF_STACK\n",
- static_cast<void *>(exception_object));
- return _URC_END_OF_STACK;
- } else if (stepResult < 0) {
- _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step failed => "
- "_URC_FATAL_PHASE1_ERROR\n",
- static_cast<void *>(exception_object));
- return _URC_FATAL_PHASE2_ERROR;
- }
-#endif
-
// Get info about this frame.
unw_word_t sp;
unw_proc_info_t frameInfo;
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits