diff mbox

[ARM] Call dwarf_step only if CONFIG_DEBUG_FRAME is defined

Message ID 1321639215-14537-2-git-send-email-ken.werner@linaro.org
State Accepted
Commit d84e5d5d2485b7c37bdf31794c77ed000f34faf5
Headers show

Commit Message

Ken Werner Nov. 18, 2011, 6 p.m. UTC
The ARM EABI does not use the .eh_frame and .eh_frame_hdr sections for unwinding. Therefore it doesn't make sense to call dwarf_step if CONFIG_DEBUG_FRAME is not defined.
---
 src/arm/Gstep.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/src/arm/Gstep.c b/src/arm/Gstep.c
index 149a65a..3b7bdbe 100644
--- a/src/arm/Gstep.c
+++ b/src/arm/Gstep.c
@@ -171,6 +171,7 @@  unw_step (unw_cursor_t *cursor)
   if (unw_is_signal_frame (cursor))
      return unw_handle_signal_frame (cursor);
 
+#ifdef CONFIG_DEBUG_FRAME
   /* First, try DWARF-based unwinding. */
   if (UNW_TRY_METHOD(UNW_ARM_METHOD_DWARF))
     {
@@ -188,6 +189,7 @@  unw_step (unw_cursor_t *cursor)
         return ret;
       }
     }
+#endif /* CONFIG_DEBUG_FRAME */
 
   /* Next, try extbl-based unwinding. */
   if (UNW_TRY_METHOD (UNW_ARM_METHOD_EXIDX))