diff mbox

[1/2] ARM: Exit unw_step in case DWARF based unwinding was successful

Message ID 1314634784-7847-2-git-send-email-ken.werner@linaro.org
State Accepted
Commit 912db91b053a86092515caff4ed8e2447864c8cb
Headers show

Commit Message

Ken Werner Aug. 29, 2011, 4:19 p.m. UTC
Prevents unw_step from trying to unwind the stack using the ARM specific
unwind tables in case the DWARF based unwinding was successful.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
---
 src/arm/Gstep.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/src/arm/Gstep.c b/src/arm/Gstep.c
index 1dae78e..149a65a 100644
--- a/src/arm/Gstep.c
+++ b/src/arm/Gstep.c
@@ -177,8 +177,10 @@  unw_step (unw_cursor_t *cursor)
       ret = dwarf_step (&c->dwarf);
       Debug(1, "dwarf_step()=%d\n", ret);
 
-      if (unlikely (ret == -UNW_ESTOPUNWIND))
-        return ret;
+      if (likely (ret > 0))
+	return 1;
+      else if (unlikely (ret == -UNW_ESTOPUNWIND))
+	return ret;
 
     if (ret < 0 && ret != -UNW_ENOINFO)
       {