From patchwork Mon Aug 29 16:19:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken Werner X-Patchwork-Id: 3769 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 171FE23E54 for ; Mon, 29 Aug 2011 16:19:49 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 3A17BA18126 for ; Mon, 29 Aug 2011 16:19:48 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 18so6763318fxd.11 for ; Mon, 29 Aug 2011 09:19:48 -0700 (PDT) Received: by 10.223.76.201 with SMTP id d9mr7245134fak.119.1314634788113; Mon, 29 Aug 2011 09:19:48 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs102291lab; Mon, 29 Aug 2011 09:19:47 -0700 (PDT) Received: by 10.213.29.74 with SMTP id p10mr2475140ebc.48.1314634786837; Mon, 29 Aug 2011 09:19:46 -0700 (PDT) Received: from mtagate7.uk.ibm.com (mtagate7.uk.ibm.com [194.196.100.167]) by mx.google.com with ESMTPS id p55si3984352eef.136.2011.08.29.09.19.46 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Aug 2011 09:19:46 -0700 (PDT) Received-SPF: neutral (google.com: 194.196.100.167 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) client-ip=194.196.100.167; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.196.100.167 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) smtp.mail=ken.werner@linaro.org Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate7.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p7TGJj6o030934 for ; Mon, 29 Aug 2011 16:19:45 GMT Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p7TGJjUw2265230 for ; Mon, 29 Aug 2011 17:19:45 +0100 Received: from d06av03.portsmouth.uk.ibm.com (localhost.localdomain [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p7TGJima030724 for ; Mon, 29 Aug 2011 10:19:44 -0600 Received: from leonard.boeblingen.de.ibm.com (dyn-9-152-224-36.boeblingen.de.ibm.com [9.152.224.36]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p7TGJi7o030714; Mon, 29 Aug 2011 10:19:44 -0600 From: Ken Werner To: libunwind-devel@nongnu.org Subject: [PATCH 1/2] ARM: Exit unw_step in case DWARF based unwinding was successful Date: Mon, 29 Aug 2011 18:19:43 +0200 Message-Id: <1314634784-7847-2-git-send-email-ken.werner@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1314634784-7847-1-git-send-email-ken.werner@linaro.org> References: <1314634784-7847-1-git-send-email-ken.werner@linaro.org> 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 --- src/arm/Gstep.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) 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) {