From 112c927371b8253040a38da697372a3fd67ad520 Mon Sep 17 00:00:00 2001 From: Ken Werner Date: Wed, 17 Aug 2011 14:19:04 +0000 Subject: [PATCH] ARM: Ensure unw_step returns whatever find_proc_info() returns This allows the test-proc-info test case to pass on ARM. Signed-off-by: Ken Werner --- src/arm/Gstep.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/arm/Gstep.c b/src/arm/Gstep.c index 270058b2..1dae78ed 100644 --- a/src/arm/Gstep.c +++ b/src/arm/Gstep.c @@ -45,13 +45,15 @@ arm_exidx_step (struct cursor *c) c->dwarf.loc[UNW_ARM_R15] = DWARF_NULL_LOC; if ((ret = tdep_find_proc_info (&c->dwarf, c->dwarf.ip, 1)) < 0) - return -UNW_ENOINFO; + return ret; if (c->dwarf.pi.format != UNW_INFO_FORMAT_ARM_EXIDX) return -UNW_ENOINFO; ret = arm_exidx_extract (&c->dwarf, buf); - if (ret < 0) + if (ret == -UNW_ESTOPUNWIND) + return 0; + else if (ret < 0) return ret; ret = arm_exidx_decode (buf, ret, &c->dwarf); @@ -189,10 +191,10 @@ unw_step (unw_cursor_t *cursor) if (UNW_TRY_METHOD (UNW_ARM_METHOD_EXIDX)) { ret = arm_exidx_step (c); - if (ret >= 0) + if (ret > 0) return 1; - if (ret == -UNW_ESTOPUNWIND) - return 0; + if (ret == -UNW_ESTOPUNWIND || ret == 0) + return ret; } /* Fall back on APCS frame parsing.